-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (110 loc) · 4.08 KB
/
ci.yml
File metadata and controls
113 lines (110 loc) · 4.08 KB
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
name: CI
on:
pull_request:
branches:
- 'master'
- 'release-*'
push:
branches:
- 'master'
- 'release-*'
tags: '*'
concurrency:
# Skip intermediate builds: all builds except for builds on the `main` or `release-*` branches
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- '1.11'
- '1.12'
- 'nightly'
os:
- ubuntu-latest
- windows-latest
- macos-15-intel # Intel
- macos-latest # Apple Silicon
julia-wordsize:
# The value here only affects the version of Julia binary that we download.
# It does not affect the architecture of the GitHub Runner (virtual machine) that
# we run on.
- '32' # 32-bit Julia. Only available on x86_64. Not available on aarch64.
- '64' # 64-bit Julia.
exclude:
# Killing workers doesn't work on Windows in Julia 1.10:
- os: windows-latest
version: '1.10'
# We don't have 32-bit builds of Julia for Intel macOS:
- os: macos-15-intel # Intel
julia-wordsize: '32'
#
# We don't have 32-bit builds of Julia for Apple Silicon macOS:
- os: macos-latest # Apple Silicon
julia-wordsize: '32'
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
# If `julia-wordsize` is 32, then we set `arch` to `x86`, because we know that
# 32-bit builds of Julia are only available for x86.
#
# If `julia-wordsize` is 64, then we set `arch` to `${{ runner.arch }}`, which
# GitHub will automatically expand to the correct value (`x86_64` or `aarch64`)
# based on the architecture of the underlying GitHub Runner (virtual machine).
arch: ${{ github.ref == '32' && 'x86' || runner.arch }}
- uses: actions/cache@v5
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-${{ matrix.os }}
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- name: Decide what the value of JULIA_NUM_THREADS should be
id: decide-numthreads-str
run: |
if Base.VERSION >= v"1.12-"
# The x,y format for threadpools requires Julia 1.9 or above.
# However, Julia didn't begin starting with 1 interactive thread by default until Julia 1.12
# So we don't need to bother with this on Julia 1.11 and earlier
value = "1,0"
else
value = "1"
end
open(ENV["GITHUB_OUTPUT"], "a") do io
name = "numthreads"
line = "$(name)=$(value)"
println(io, line)
end
shell: julia --color=yes {0}
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: ${{ steps.decide-numthreads-str.outputs.numthreads }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs/ docs/make.jl