generated from AlgebraicJulia/AlgebraicTemplate.jl
-
Notifications
You must be signed in to change notification settings - Fork 8
131 lines (127 loc) · 3.99 KB
/
julia_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Julia CI/CD
on:
schedule:
- cron: 0 0 * * *
push:
branches: ["main"]
tags: ["*"]
pull_request:
workflow_dispatch:
inputs:
action:
description: "Action"
required: true
default: "test"
type: choice
options:
- test
- release
version:
description: "Tag and release version:"
required: false
docs:
description: "Whether or not to build and deploy Documenter.jl docs"
default: true
required: false
type: boolean
permissions:
actions: read
checks: read
contents: write
deployments: read
discussions: read
issues: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
jobs:
test:
if: github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.action == 'test')
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: # use matrix notation for linux for easily testing more versions/architectures
version: [ "1.10", "1.11" ]
os: [ubuntu-latest]
arch: ["x64"]
include:
# test macOS and Windows with latest Julia only
- os: macOS-latest
arch: arm64
version: "1.11"
- os: windows-latest
arch: x64
version: "1.11"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: "Install Graphviz"
uses: ts-graphviz/setup-graphviz@v1
with:
ubuntu-skip-apt-update: "true"
macos-skip-brew-update: "true"
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- uses: julia-actions/julia-buildpkg@v1
- name: "Run tests (windows)"
uses: julia-actions/julia-runtest@v1
if: matrix.os == 'windows-latest'
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
if: matrix.os != 'windows-latest'
env:
JULIA_COPY_STACKS: 1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
env:
# GR backend fix for Plots, discussed in https://github.com/jheinen/GR.jl/issues/422
GKSwstype: nul
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: "1.10.0"
- name: "Install Graphviz"
uses: ts-graphviz/setup-graphviz@v1
with:
ubuntu-skip-apt-update: "true"
macos-skip-brew-update: "true"
- name: "Install LaTeX"
run: |
sudo apt-get update
sudo apt-get install pdf2svg texlive-latex-base texlive-latex-extra texlive-binaries texlive-pictures texlive-luatex
- name: "Install Julia dependencies"
run: julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate();'
- name: "Build and deploy docs"
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CompatHelper:
if: github.event_name == 'schedule'
uses: AlgebraicJulia/.github/.github/workflows/julia_compat.yml@main
secrets: inherit
Release:
if: github.event_name == 'workflow_dispatch' && inputs.action == 'release' && inputs.version != ''
uses: AlgebraicJulia/.github/.github/workflows/julia_release.yml@main
secrets: inherit