forked from EnzymeAD/Enzyme.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (151 loc) · 4.87 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
name: CI
on:
pull_request:
push:
branches:
- main
- release-*
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.libEnzyme }} libEnzyme - assertions=${{ matrix.assertions }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1.7'
- '1.8'
- '~1.9.0-0'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
assertions:
- false
libEnzyme: [local, packaged]
exclude:
- os: windows-latest
arch: x64
libEnzyme: local
include:
- os: ubuntu-latest
arch: x86
libEnzyme: packaged
version: '1.6'
assertions: false
- os: ubuntu-latest
arch: x86
libEnzyme: packaged
version: '1.7'
assertions: false
- os: ubuntu-latest
arch: x86
libEnzyme: packaged
version: '1.8'
assertions: false
- os: ubuntu-latest
arch: x86
libEnzyme: packaged
version: '~1.9.0-0'
assertions: false
# special test with LLVM assertions enabled
# TODO: enable this across all versions
# (needs LLVM.jl fixes, and julia-actions/setup-julia support)
# - os: ubuntu-latest
# arch: x64
# libEnzyme: packaged
# version: '1.7'
# assertions: true
# - os: ubuntu-latest
# arch: x64
# libEnzyme: packaged
# version: '1.8'
# assertions: true
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
if: ${{ ! matrix.assertions }}
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Download Julia with assertions
if: ${{ matrix.assertions }}
env:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
run: |
wget https://julialangnightlies.s3.amazonaws.com/assert_bin/linux/$arch/$version/julia-latest-linux64.tar.gz
tar -xvzf julia-latest-linux64.tar.gz
rm -rf julia-latest-linux64.tar.gz
echo $PWD/julia-*/bin >> $GITHUB_PATH
- uses: actions/cache@v1
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-
${{ runner.os }}-
- name: add EnzymeCore
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/EnzymeCore")
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
- name: Build libEnzyme
if: ${{ matrix.libEnzyme == 'local' && matrix.os != 'macOS-latest'}}
run: |
julia --project=deps -e 'using Pkg; Pkg.instantiate()'
julia --project=deps deps/build_local.jl
cp LocalPreferences.toml test/
- name: Build libEnzyme MacOS
if: ${{ matrix.libEnzyme == 'local' && matrix.os == 'macOS-latest'}}
run: |
julia --project=deps -e 'using Pkg; Pkg.instantiate()'
SDKROOT=`xcrun --show-sdk-path` julia --project=deps deps/build_local.jl
cp LocalPreferences.toml test/
- uses: julia-actions/julia-buildpkg@v1
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
- uses: julia-actions/julia-runtest@v1
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(path="lib/EnzymeCore")
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using Enzyme
DocMeta.setdocmeta!(Enzyme, :DocTestSetup, :(using Enzyme); recursive=true)
doctest(Enzyme)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}