35
35
required : false
36
36
default : false
37
37
type : boolean
38
+ project :
39
+ description : " Project"
40
+ required : false
41
+ default : " ."
42
+ type : string
38
43
39
44
jobs :
40
45
test :
@@ -130,11 +135,24 @@ jobs:
130
135
end
131
136
Pkg.develop(dev_pks)
132
137
shell : julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
133
- # Only in Julia v1.10 we need to install `ReactantCore` manually.
134
138
if : ${{ inputs.julia_version == '1.10' || inputs.julia_version == 'lts' }}
135
139
env :
136
140
JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
137
141
142
+ - name : Install Project
143
+ if : ${{ inputs.project != '.' }}
144
+ run : |
145
+ import Pkg
146
+ PKg.activate(get(ENV, "JULIA_PROJECT", nothing))
147
+ if VERSION < v"1.11-"
148
+ Pkg.develop([PackageSpec(; path="."), PackageSpec(; path="lib/ReactantCore")])
149
+ end
150
+ Pkg.instantiate()
151
+ shell : julia --color=yes --code-coverage=user --depwarn=yes {0}
152
+ env :
153
+ JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
154
+ JULIA_PROJECT : ${{ inputs.project }}
155
+
138
156
# Run the tests (pjrt or ifrt or both)
139
157
- name : " Setup Runtime Preferences (PJRT)"
140
158
if : ${{ inputs.runtime == 'pjrt' || inputs.runtime == 'both' }}
@@ -145,8 +163,9 @@ jobs:
145
163
contents : |
146
164
[Reactant]
147
165
xla_runtime = "PJRT"
166
+
148
167
- name : " Run Tests (PJRT)"
149
- if : ${{ inputs.runtime == 'pjrt' || inputs.runtime == 'both' }}
168
+ if : ${{ ( inputs.runtime == 'pjrt' || inputs.runtime == 'both') && inputs.project == '. ' }}
150
169
timeout-minutes : 60
151
170
run : |
152
171
import Pkg
@@ -162,6 +181,14 @@ jobs:
162
181
REACTANT_TEST_GROUP : ${{ inputs.test_group }}
163
182
XLA_FLAGS : " --xla_force_host_platform_device_count=12"
164
183
JULIA_DEBUG : " Reactant,Reactant_jll"
184
+ - name : " Run Integration Tests (PJRT)"
185
+ if : ${{ (inputs.runtime == 'pjrt' || inputs.runtime == 'both') && inputs.project != '.' }}
186
+ timeout-minutes : 30
187
+ run : julia --color=yes --project=test/integration/${{ inputs.project }} --threads=auto --check-bounds=yes -O1 test/integration/${{ inputs.project }}/runtests.jl
188
+ shell : bash
189
+ env :
190
+ JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
191
+ JULIA_DEBUG : " Reactant,Reactant_jll"
165
192
166
193
- name : " Setup Runtime Preferences (IFRT)"
167
194
if : ${{ inputs.runtime == 'ifrt' || inputs.runtime == 'both' }}
@@ -172,8 +199,9 @@ jobs:
172
199
contents : |
173
200
[Reactant]
174
201
xla_runtime = "IFRT"
202
+
175
203
- name : " Run Tests (IFRT)"
176
- if : ${{ inputs.runtime == 'ifrt' || inputs.runtime == 'both' }}
204
+ if : ${{ ( inputs.runtime == 'ifrt' || inputs.runtime == 'both') && inputs.projec == '. ' }}
177
205
timeout-minutes : 60
178
206
run : |
179
207
import Pkg
@@ -189,6 +217,14 @@ jobs:
189
217
REACTANT_TEST_GROUP : ${{ inputs.test_group }}
190
218
XLA_FLAGS : " --xla_force_host_platform_device_count=12"
191
219
JULIA_DEBUG : " Reactant,Reactant_jll"
220
+ - name : " Run Integration Tests (IFRT)"
221
+ if : ${{ (inputs.runtime == 'ifrt' || inputs.runtime == 'both') && inputs.project != '.' }}
222
+ timeout-minutes : 30
223
+ run : julia --color=yes --project=test/integration/${{ inputs.project }} --threads=auto --check-bounds=yes -O1 test/integration/${{ inputs.project }}/runtests.jl
224
+ shell : bash
225
+ env :
226
+ JULIA_PKG_SERVER_REGISTRY_PREFERENCE : eager
227
+ JULIA_DEBUG : " Reactant,Reactant_jll"
192
228
193
229
- name : " Upload MLIR modules"
194
230
uses : actions/upload-artifact@v4
0 commit comments