-
-
Notifications
You must be signed in to change notification settings - Fork 194
169 lines (166 loc) · 6.89 KB
/
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: CI
on:
pull_request:
push:
branches:
- 'master'
- 'release-*'
tags: '*'
merge_group: # GitHub Merge Queue
concurrency:
# Skip intermediate builds: all builds except for builds on the `master` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
finalize:
if: always() # this line is important to keep the `finalize` job from being marked as skipped; do not change or delete this line
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- ci_started
- test
- docs
- build-mylib
steps:
- run: |
echo ci_started: ${{ needs.ci_started.result }}
echo test: ${{ needs.test.result }}
echo docs: ${{ needs.docs.result }}
echo build-mylib: ${{ needs.build-mylib.result }}
- run: exit 1
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
ci_started:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: exit 0
test:
timeout-minutes: 90
runs-on: ${{ matrix.github-runner }}
strategy:
max-parallel: 20 # leave space for other runs in the JuliaLang org, given these tests are long
fail-fast: false
matrix:
julia-version:
- '1.6' # previous LTS
- '1.9'
- '1.10' # current LTS
- '1.11' # current stable
#
# 'pre' will install the latest prerelease build (RCs, betas, and alphas).
# Uncomment this line when there is an active prerelease available.
# Comment this line out when there is no prerelease available (to save CI time).
# - 'pre'
#
# Note: we have a separate workflow (.github/workflows/ci.nightly.yml)
# for Julia nightly.
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.
github-runner:
- ubuntu-latest
- windows-latest
- macos-13 # macos-13 = Intel.
- macos-14 # macos-14 = Apple Silicon.
coverage:
- 'true'
- 'false' # needed for Julia 1.9+ to test from a session using pkgimages
exclude:
# For now, we'll disable testing 32-bit Julia 1.9 on all operating systems.
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 .
- julia-version: '1.9'
julia-wordsize: '32'
# For now, we'll disable testing 32-bit Julia 1.9 on Windows.
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 on Windows.
- github-runner: windows-latest
julia-version: '1.9'
julia-wordsize: '32'
#
# Julia 1.6 did not support Apple Silicon:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-version: '1.6'
#
# We don't have 32-bit builds of Julia for Intel macOS:
- github-runner: macos-13 # macos-13 = Intel.
julia-wordsize: '32'
#
# We don't have 32-bit builds of Julia for Apple Silicon macOS:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-wordsize: '32'
#
# We don't need to run the coverage=false job for Julia < 1.9:
- julia-version: '1.6'
coverage: 'false'
- julia-version: '1.7'
coverage: 'false'
- julia-version: '1.8'
coverage: 'false'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
with:
version: ${{ matrix.julia-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: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5
- uses: julia-actions/julia-runtest@d0c4f093badade621cd041bba567d1e832480ac2 # v1.10.0
with:
coverage: ${{ matrix.coverage }}
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38 # v1.2.2
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
file: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
docs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
with:
version: '1'
- name: Build and deploy docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'
build-mylib:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
# Only run 1 of the `build-mylib` job at a time, so that this job doesn't take over
# too many CI resources, and also to leave space for other runs in the JuliaLang org.
max-parallel: 1
fail-fast: false
matrix:
julia-version:
- '1.10' # current LTS
- '1.11' # current stable
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5
- uses: julia-actions/julia-buildpkg@90dd6f23eb49626e4e6612cb9d64d456f86e6a1c # v1.6.0
with:
project: 'examples/MyLib'
- uses: julia-actions/julia-buildpkg@90dd6f23eb49626e4e6612cb9d64d456f86e6a1c # v1.6.0
with:
project: 'examples/MyLib/build'
- run: |
cd examples/MyLib
make
- run: ./examples/MyLib/my_application.out
env:
LD_LIBRARY_PATH: 'examples/MyLib/MyLibCompiled/lib'