5454 # ## Determine platforms to include
5555 # ##
5656
57- select :
58- name : ' Select platforms '
57+ prepare :
58+ name : ' Prepare the run '
5959 runs-on : ubuntu-22.04
6060 env :
6161 # List of platforms to exclude by default
7373 docs : ${{ steps.include.outputs.docs }}
7474
7575 steps :
76- # This function must be inlined in main.yml, or we'd be forced to checkout the repo
76+ - name : ' Checkout the scripts'
77+ uses : actions/checkout@v4
78+ with :
79+ sparse-checkout : |
80+ .github
81+ make/conf/github-actions.conf
82+
83+ - name : ' Build JTReg'
84+ id : jtreg
85+ uses : ./.github/actions/build-jtreg
86+
87+ # TODO: Now that we are checking out the repo scripts, we can put the following code
88+ # into a separate file
7789 - name : ' Check what jobs to run'
7890 id : include
7991 run : |
@@ -149,18 +161,18 @@ jobs:
149161
150162 build-linux-x64 :
151163 name : linux-x64
152- needs : select
164+ needs : prepare
153165 uses : ./.github/workflows/build-linux.yml
154166 with :
155167 platform : linux-x64
156168 gcc-major-version : ' 10'
157169 configure-arguments : ${{ github.event.inputs.configure-arguments }}
158170 make-arguments : ${{ github.event.inputs.make-arguments }}
159- if : needs.select .outputs.linux-x64 == 'true'
171+ if : needs.prepare .outputs.linux-x64 == 'true'
160172
161173 build-linux-x86-hs :
162174 name : linux-x86-hs
163- needs : select
175+ needs : prepare
164176 uses : ./.github/workflows/build-linux.yml
165177 with :
166178 platform : linux-x86
@@ -174,11 +186,11 @@ jobs:
174186 extra-conf-options : ' --with-target-bits=32 --enable-fallback-linker --enable-libffi-bundling'
175187 configure-arguments : ${{ github.event.inputs.configure-arguments }}
176188 make-arguments : ${{ github.event.inputs.make-arguments }}
177- if : needs.select .outputs.linux-x86-hs == 'true'
189+ if : needs.prepare .outputs.linux-x86-hs == 'true'
178190
179191 build-linux-x64-hs-nopch :
180192 name : linux-x64-hs-nopch
181- needs : select
193+ needs : prepare
182194 uses : ./.github/workflows/build-linux.yml
183195 with :
184196 platform : linux-x64
@@ -188,11 +200,11 @@ jobs:
188200 extra-conf-options : ' --disable-precompiled-headers'
189201 configure-arguments : ${{ github.event.inputs.configure-arguments }}
190202 make-arguments : ${{ github.event.inputs.make-arguments }}
191- if : needs.select .outputs.linux-x64-variants == 'true'
203+ if : needs.prepare .outputs.linux-x64-variants == 'true'
192204
193205 build-linux-x64-hs-zero :
194206 name : linux-x64-hs-zero
195- needs : select
207+ needs : prepare
196208 uses : ./.github/workflows/build-linux.yml
197209 with :
198210 platform : linux-x64
@@ -202,11 +214,11 @@ jobs:
202214 extra-conf-options : ' --with-jvm-variants=zero --disable-precompiled-headers'
203215 configure-arguments : ${{ github.event.inputs.configure-arguments }}
204216 make-arguments : ${{ github.event.inputs.make-arguments }}
205- if : needs.select .outputs.linux-x64-variants == 'true'
217+ if : needs.prepare .outputs.linux-x64-variants == 'true'
206218
207219 build-linux-x64-hs-minimal :
208220 name : linux-x64-hs-minimal
209- needs : select
221+ needs : prepare
210222 uses : ./.github/workflows/build-linux.yml
211223 with :
212224 platform : linux-x64
@@ -216,11 +228,11 @@ jobs:
216228 extra-conf-options : ' --with-jvm-variants=minimal --disable-precompiled-headers'
217229 configure-arguments : ${{ github.event.inputs.configure-arguments }}
218230 make-arguments : ${{ github.event.inputs.make-arguments }}
219- if : needs.select .outputs.linux-x64-variants == 'true'
231+ if : needs.prepare .outputs.linux-x64-variants == 'true'
220232
221233 build-linux-x64-hs-optimized :
222234 name : linux-x64-hs-optimized
223- needs : select
235+ needs : prepare
224236 uses : ./.github/workflows/build-linux.yml
225237 with :
226238 platform : linux-x64
@@ -231,68 +243,67 @@ jobs:
231243 extra-conf-options : ' --with-debug-level=optimized --disable-precompiled-headers'
232244 configure-arguments : ${{ github.event.inputs.configure-arguments }}
233245 make-arguments : ${{ github.event.inputs.make-arguments }}
234- if : needs.select .outputs.linux-x64-variants == 'true'
246+ if : needs.prepare .outputs.linux-x64-variants == 'true'
235247
236248 build-linux-cross-compile :
237249 name : linux-cross-compile
238- needs :
239- - select
250+ needs : prepare
240251 uses : ./.github/workflows/build-cross-compile.yml
241252 with :
242253 gcc-major-version : ' 10'
243254 configure-arguments : ${{ github.event.inputs.configure-arguments }}
244255 make-arguments : ${{ github.event.inputs.make-arguments }}
245- if : needs.select .outputs.linux-cross-compile == 'true'
256+ if : needs.prepare .outputs.linux-cross-compile == 'true'
246257
247258 build-alpine-linux-x64 :
248259 name : alpine-linux-x64
249- needs : select
260+ needs : prepare
250261 uses : ./.github/workflows/build-alpine-linux.yml
251262 with :
252263 platform : alpine-linux-x64
253264 configure-arguments : ${{ github.event.inputs.configure-arguments }}
254265 make-arguments : ${{ github.event.inputs.make-arguments }}
255- if : needs.select .outputs.alpine-linux-x64 == 'true'
266+ if : needs.prepare .outputs.alpine-linux-x64 == 'true'
256267
257268 build-macos-x64 :
258269 name : macos-x64
259- needs : select
270+ needs : prepare
260271 uses : ./.github/workflows/build-macos.yml
261272 with :
262273 platform : macos-x64
263274 runs-on : ' macos-13'
264275 xcode-toolset-version : ' 14.3.1'
265276 configure-arguments : ${{ github.event.inputs.configure-arguments }}
266277 make-arguments : ${{ github.event.inputs.make-arguments }}
267- if : needs.select .outputs.macos-x64 == 'true'
278+ if : needs.prepare .outputs.macos-x64 == 'true'
268279
269280 build-macos-aarch64 :
270281 name : macos-aarch64
271- needs : select
282+ needs : prepare
272283 uses : ./.github/workflows/build-macos.yml
273284 with :
274285 platform : macos-aarch64
275286 runs-on : ' macos-14'
276287 xcode-toolset-version : ' 14.3.1'
277288 configure-arguments : ${{ github.event.inputs.configure-arguments }}
278289 make-arguments : ${{ github.event.inputs.make-arguments }}
279- if : needs.select .outputs.macos-aarch64 == 'true'
290+ if : needs.prepare .outputs.macos-aarch64 == 'true'
280291
281292 build-windows-x64 :
282293 name : windows-x64
283- needs : select
294+ needs : prepare
284295 uses : ./.github/workflows/build-windows.yml
285296 with :
286297 platform : windows-x64
287298 msvc-toolset-version : ' 14.29'
288299 msvc-toolset-architecture : ' x86.x64'
289300 configure-arguments : ${{ github.event.inputs.configure-arguments }}
290301 make-arguments : ${{ github.event.inputs.make-arguments }}
291- if : needs.select .outputs.windows-x64 == 'true'
302+ if : needs.prepare .outputs.windows-x64 == 'true'
292303
293304 build-windows-aarch64 :
294305 name : windows-aarch64
295- needs : select
306+ needs : prepare
296307 uses : ./.github/workflows/build-windows.yml
297308 with :
298309 platform : windows-aarch64
@@ -302,11 +313,11 @@ jobs:
302313 extra-conf-options : ' --openjdk-target=aarch64-unknown-cygwin'
303314 configure-arguments : ${{ github.event.inputs.configure-arguments }}
304315 make-arguments : ${{ github.event.inputs.make-arguments }}
305- if : needs.select .outputs.windows-aarch64 == 'true'
316+ if : needs.prepare .outputs.windows-aarch64 == 'true'
306317
307318 build-docs :
308319 name : docs
309- needs : select
320+ needs : prepare
310321 uses : ./.github/workflows/build-linux.yml
311322 with :
312323 platform : linux-x64
@@ -318,7 +329,7 @@ jobs:
318329 gcc-major-version : ' 10'
319330 configure-arguments : ${{ github.event.inputs.configure-arguments }}
320331 make-arguments : ${{ github.event.inputs.make-arguments }}
321- if : needs.select .outputs.docs == 'true'
332+ if : needs.prepare .outputs.docs == 'true'
322333
323334 # ##
324335 # ## Test jobs
0 commit comments