-
Notifications
You must be signed in to change notification settings - Fork 170
80 lines (75 loc) · 2.27 KB
/
Copy pathenzyme-julia.yml
File metadata and controls
80 lines (75 loc) · 2.27 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
name: Julia Enzyme CI
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build:
name: Enzyme CI Julia ${{ matrix.version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- '1.11'
- '1.12'
os:
- ubuntu-latest
arch:
- 'default'
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
repository: 'EnzymeAD/Enzyme.jl'
path: ./jl
ref: main
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: Set environment variable to build libEnzyme
if: ${{ runner.os == 'macOS' }}
run: |
echo "SDKROOT=$(xcrun --show-sdk-path)" >> "${GITHUB_ENV}"
- name: Build libEnzyme
run: |
julia --color=yes --project=jl/deps -e 'using Pkg; Pkg.instantiate()'
julia --color=yes --project=jl/deps jl/deps/build_local.jl ./enzyme
- name: Dev EnzymeCore
run: julia --color=yes --project=jl -e 'using Pkg; Pkg.develop(path="jl/lib/EnzymeCore")'
- uses: julia-actions/julia-buildpkg@v1
with:
project: jl
- name: "Set test arguments"
shell: bash
run: |
# Run tests in verbose mode
TEST_ARGS=(--verbose)
# if [[ ${{ runner.os }} == 'macOS' ]]; then
# # Encourage ParallelTestRunner to use two jobs on macOS, rather
# # than the single one it'd use by default.
# TEST_ARGS+=(--jobs=2)
# fi
echo "runtest_test_args=${TEST_ARGS[@]}" >> "${GITHUB_ENV}"
- uses: julia-actions/julia-runtest@v1
with:
project: jl
test_args: ${{ env.runtest_test_args }}