9
9
branches :
10
10
- main
11
11
- release-*
12
- tags : ' *'
12
+ tags : [ '*']
13
13
paths :
14
14
- ' .github/workflows/CI-localjll.yml'
15
15
- ' deps/**'
@@ -21,157 +21,23 @@ concurrency:
21
21
cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
22
22
23
23
jobs :
24
- test :
25
- name : Julia ${{ matrix.version }} - ${{ matrix.os }} - local libReactant - ${{ github.event_name }}
26
- runs-on : ${{ matrix.os }}
27
- container :
28
- image : ${{ contains(matrix.os, 'linux') && 'ghcr.io/enzymead/reactant-docker-images@sha256:7004a6ebbdd77bd047900b2bffc542e8576864056dc27a9c94d30666d6f7ea01' || '' }}
24
+ test-localjll :
29
25
strategy :
30
26
fail-fast : false
31
27
matrix :
32
28
version :
33
- - ' 1.10'
34
- - ' 1.11'
29
+ - " 1.10"
30
+ - " 1.11"
35
31
os :
36
32
- linux-x86-n2-32
37
33
- macOS-latest
38
34
exclude :
39
35
- os : macOS-latest
40
- version : ' 1.10'
41
- steps :
42
- - name : Free Disk Space
43
- uses : jlumbroso/free-disk-space@main
44
- with :
45
- tool-cache : false
46
- if : ${{ startsWith(matrix.os, 'ubuntu-') }}
47
- - name : Clean `/opt`
48
- run : sudo rm -rf /opt/*
49
- if : ${{ startsWith(matrix.os, 'ubuntu-') }}
50
- - uses : actions/checkout@v5
51
- - name : Set and create TMPDIR
52
- # We have to use `${GITHUB_WORKSPACE}` instead of `github.workspace` because GitHub
53
- # is terrible and the two don't match inside containers:
54
- # https://github.com/actions/runner/issues/2058
55
- run : |
56
- export TMPDIR="${GITHUB_WORKSPACE}/tmp"
57
- echo "TMPDIR=${TMPDIR}" >> "${GITHUB_ENV}"
58
-
59
- mkdir -pv "${TMPDIR}"
60
- - uses : julia-actions/setup-julia@v2
61
- with :
62
- version : ${{ matrix.version }}
63
- - name : Load Julia packages from cache
64
- id : julia-cache
65
- uses : julia-actions/cache@v2
66
- -
uses :
bazel-contrib/[email protected]
67
- name : Set up Bazel
68
- with :
69
- # Avoid downloading Bazel every time.
70
- bazelisk-cache : true
71
- # Store build cache per workflow.
72
- disk-cache : ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.version }}
73
- # Share repository cache between workflows.
74
- repository-cache : true
75
- bazelisk-version : 1.x
76
- - name : Prepare build on macOS
77
- if : ${{ startsWith(matrix.os, 'macOS-') }}
78
- run : |
79
- echo "SDKROOT=$(xcrun --show-sdk-path)" >> "${GITHUB_ENV}"
80
- - name : Install numpy
81
- if : ${{ startsWith(matrix.os, 'macOS-') }}
82
- run : |
83
- python -m pip install numpy
84
- - name : Build libReactant
85
- timeout-minutes : 120
86
- run : |
87
- julia --color=yes --project=deps -e 'using Pkg; Pkg.instantiate()'
88
- julia --color=yes --project=deps deps/build_local.jl
89
- cp LocalPreferences.toml test/
90
- - name : " Setup Runtime Preferences"
91
- run : |
92
- import Pkg
93
- Pkg.Registry.update()
94
- Pkg.instantiate()
95
- using Preferences
96
- Preferences.set_preferences!("Reactant", "xla_runtime" => "PJRT"; force=true)
97
- shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
98
- env :
99
- JULIA_PKG_PRECOMPILE_AUTO : 0
100
- - name : " Install Dependencies"
101
- run : |
102
- import Pkg
103
- Pkg.Registry.update()
104
- # Install packages present in subdirectories
105
- dev_pks = Pkg.PackageSpec[]
106
- for path in ("lib/ReactantCore",)
107
- push!(dev_pks, Pkg.PackageSpec(; path))
108
- end
109
- Pkg.develop(dev_pks)
110
- shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
111
- # Only in Julia v1.10 we need to install `ReactantCore` manually.
112
- if : ${{ matrix.version == '1.10' }}
113
- env :
114
- JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
115
- - name : " Run Tests: PJRT"
116
- timeout-minutes : 200
117
- run : |
118
- import Pkg
119
- Pkg.Registry.update()
120
- Pkg.test(; coverage="user")
121
- shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
122
- env :
123
- JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
124
- XLA_FLAGS : " --xla_force_host_platform_device_count=12"
125
- JULIA_DEBUG : " Reactant,Reactant_jll"
126
- - name : Upload MLIR modules (PJRT)
127
- uses : actions/upload-artifact@v4
128
- timeout-minutes : 10
129
- if : ${{ always() }}
130
- with :
131
- name : " mlir-localjll-PJRT-${{ matrix.version }}-${{ matrix.os }}-${{ github.event_name }}"
132
- path : " **/*.mlir"
133
- retention-days : 90
134
- overwrite : false
135
- - name : " Setup Runtime Preferences"
136
- run : |
137
- import Pkg
138
- Pkg.Registry.update()
139
- Pkg.instantiate()
140
- using Preferences
141
- Preferences.set_preferences!("Reactant", "xla_runtime" => "IFRT"; force=true)
142
- shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
143
- env :
144
- JULIA_PKG_PRECOMPILE_AUTO : 0
145
- - name : " Run Tests: IFRT"
146
- timeout-minutes : 200
147
- run : |
148
- import Pkg
149
- Pkg.Registry.update()
150
- Pkg.test(; coverage="user")
151
- shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
152
- env :
153
- JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
154
- XLA_FLAGS : " --xla_force_host_platform_device_count=12"
155
- JULIA_DEBUG : " Reactant,Reactant_jll"
156
- - name : Upload MLIR modules (IFRT)
157
- uses : actions/upload-artifact@v4
158
- timeout-minutes : 10
159
- if : ${{ always() }}
160
- with :
161
- name : " mlir-localjll-IFRT-${{ matrix.version }}-${{ matrix.os }}-${{ github.event_name }}"
162
- path : " **/*.mlir"
163
- retention-days : 90
164
- overwrite : false
165
- - name : Save Julia depot cache on cancel or failure
166
- id : julia-cache-save
167
- if : cancelled() || failure()
168
- uses : actions/cache/save@v4
169
- with :
170
- path : |
171
- ${{ steps.julia-cache.outputs.cache-paths }}
172
- key : ${{ steps.julia-cache.outputs.cache-key }}
173
- - uses : julia-actions/julia-processcoverage@v1
174
- - uses : codecov/codecov-action@v5
175
- with :
176
- files : lcov.info
177
- token : ${{ secrets.CODECOV_TOKEN }}
36
+ version : " 1.10"
37
+ uses : ./.github/workflows/CommonCI.yml
38
+ with :
39
+ julia_version : ${{ matrix.version }}
40
+ os : ${{ matrix.os }}
41
+ runtime : " both"
42
+ assertions : false
43
+ localjll : true
0 commit comments