5353 # ## Determine platforms to include
5454 # ##
5555
56- select :
57- name : ' Select platforms '
56+ prepare :
57+ name : ' Prepare the run '
5858 runs-on : ubuntu-22.04
5959 outputs :
6060 linux-x64 : ${{ steps.include.outputs.linux-x64 }}
6868 docs : ${{ steps.include.outputs.docs }}
6969
7070 steps :
71- # This function must be inlined in main.yml, or we'd be forced to checkout the repo
71+ - name : ' Checkout the scripts'
72+ uses : actions/checkout@v4
73+ with :
74+ sparse-checkout : |
75+ .github
76+ make/conf/github-actions.conf
77+
78+ - name : ' Build JTReg'
79+ id : jtreg
80+ uses : ./.github/actions/build-jtreg
81+
82+ # TODO: Now that we are checking out the repo scripts, we can put the following code
83+ # into a separate file
7284 - name : ' Check what jobs to run'
7385 id : include
7486 run : |
@@ -125,18 +137,18 @@ jobs:
125137
126138 build-linux-x64 :
127139 name : linux-x64
128- needs : select
140+ needs : prepare
129141 uses : ./.github/workflows/build-linux.yml
130142 with :
131143 platform : linux-x64
132144 gcc-major-version : ' 10'
133145 configure-arguments : ${{ github.event.inputs.configure-arguments }}
134146 make-arguments : ${{ github.event.inputs.make-arguments }}
135- if : needs.select .outputs.linux-x64 == 'true'
147+ if : needs.prepare .outputs.linux-x64 == 'true'
136148
137149 build-linux-x86-hs :
138150 name : linux-x86-hs
139- needs : select
151+ needs : prepare
140152 uses : ./.github/workflows/build-linux.yml
141153 with :
142154 platform : linux-x86
@@ -150,11 +162,11 @@ jobs:
150162 extra-conf-options : ' --with-target-bits=32'
151163 configure-arguments : ${{ github.event.inputs.configure-arguments }}
152164 make-arguments : ${{ github.event.inputs.make-arguments }}
153- if : needs.select .outputs.linux-x86-hs == 'true'
165+ if : needs.prepare .outputs.linux-x86-hs == 'true'
154166
155167 build-linux-x64-hs-nopch :
156168 name : linux-x64-hs-nopch
157- needs : select
169+ needs : prepare
158170 uses : ./.github/workflows/build-linux.yml
159171 with :
160172 platform : linux-x64
@@ -164,11 +176,11 @@ jobs:
164176 extra-conf-options : ' --disable-precompiled-headers'
165177 configure-arguments : ${{ github.event.inputs.configure-arguments }}
166178 make-arguments : ${{ github.event.inputs.make-arguments }}
167- if : needs.select .outputs.linux-x64-variants == 'true'
179+ if : needs.prepare .outputs.linux-x64-variants == 'true'
168180
169181 build-linux-x64-hs-zero :
170182 name : linux-x64-hs-zero
171- needs : select
183+ needs : prepare
172184 uses : ./.github/workflows/build-linux.yml
173185 with :
174186 platform : linux-x64
@@ -178,11 +190,11 @@ jobs:
178190 extra-conf-options : ' --with-jvm-variants=zero --disable-precompiled-headers'
179191 configure-arguments : ${{ github.event.inputs.configure-arguments }}
180192 make-arguments : ${{ github.event.inputs.make-arguments }}
181- if : needs.select .outputs.linux-x64-variants == 'true'
193+ if : needs.prepare .outputs.linux-x64-variants == 'true'
182194
183195 build-linux-x64-hs-minimal :
184196 name : linux-x64-hs-minimal
185- needs : select
197+ needs : prepare
186198 uses : ./.github/workflows/build-linux.yml
187199 with :
188200 platform : linux-x64
@@ -192,11 +204,11 @@ jobs:
192204 extra-conf-options : ' --with-jvm-variants=minimal --disable-precompiled-headers'
193205 configure-arguments : ${{ github.event.inputs.configure-arguments }}
194206 make-arguments : ${{ github.event.inputs.make-arguments }}
195- if : needs.select .outputs.linux-x64-variants == 'true'
207+ if : needs.prepare .outputs.linux-x64-variants == 'true'
196208
197209 build-linux-x64-hs-optimized :
198210 name : linux-x64-hs-optimized
199- needs : select
211+ needs : prepare
200212 uses : ./.github/workflows/build-linux.yml
201213 with :
202214 platform : linux-x64
@@ -207,58 +219,57 @@ jobs:
207219 extra-conf-options : ' --with-debug-level=optimized --disable-precompiled-headers'
208220 configure-arguments : ${{ github.event.inputs.configure-arguments }}
209221 make-arguments : ${{ github.event.inputs.make-arguments }}
210- if : needs.select .outputs.linux-x64-variants == 'true'
222+ if : needs.prepare .outputs.linux-x64-variants == 'true'
211223
212224 build-linux-cross-compile :
213225 name : linux-cross-compile
214- needs :
215- - select
226+ needs : prepare
216227 uses : ./.github/workflows/build-cross-compile.yml
217228 with :
218229 gcc-major-version : ' 10'
219230 configure-arguments : ${{ github.event.inputs.configure-arguments }}
220231 make-arguments : ${{ github.event.inputs.make-arguments }}
221- if : needs.select .outputs.linux-cross-compile == 'true'
232+ if : needs.prepare .outputs.linux-cross-compile == 'true'
222233
223234 build-macos-x64 :
224235 name : macos-x64
225- needs : select
236+ needs : prepare
226237 uses : ./.github/workflows/build-macos.yml
227238 with :
228239 platform : macos-x64
229240 runs-on : ' macos-13'
230241 xcode-toolset-version : ' 14.3.1'
231242 configure-arguments : ${{ github.event.inputs.configure-arguments }}
232243 make-arguments : ${{ github.event.inputs.make-arguments }}
233- if : needs.select .outputs.macos-x64 == 'true'
244+ if : needs.prepare .outputs.macos-x64 == 'true'
234245
235246 build-macos-aarch64 :
236247 name : macos-aarch64
237- needs : select
248+ needs : prepare
238249 uses : ./.github/workflows/build-macos.yml
239250 with :
240251 platform : macos-aarch64
241252 runs-on : ' macos-14'
242253 xcode-toolset-version : ' 15.4'
243254 configure-arguments : ${{ github.event.inputs.configure-arguments }}
244255 make-arguments : ${{ github.event.inputs.make-arguments }}
245- if : needs.select .outputs.macos-aarch64 == 'true'
256+ if : needs.prepare .outputs.macos-aarch64 == 'true'
246257
247258 build-windows-x64 :
248259 name : windows-x64
249- needs : select
260+ needs : prepare
250261 uses : ./.github/workflows/build-windows.yml
251262 with :
252263 platform : windows-x64
253264 msvc-toolset-version : ' 14.29'
254265 msvc-toolset-architecture : ' x86.x64'
255266 configure-arguments : ${{ github.event.inputs.configure-arguments }}
256267 make-arguments : ${{ github.event.inputs.make-arguments }}
257- if : needs.select .outputs.windows-x64 == 'true'
268+ if : needs.prepare .outputs.windows-x64 == 'true'
258269
259270 build-windows-aarch64 :
260271 name : windows-aarch64
261- needs : select
272+ needs : prepare
262273 uses : ./.github/workflows/build-windows.yml
263274 with :
264275 platform : windows-aarch64
@@ -268,11 +279,11 @@ jobs:
268279 extra-conf-options : ' --openjdk-target=aarch64-unknown-cygwin'
269280 configure-arguments : ${{ github.event.inputs.configure-arguments }}
270281 make-arguments : ${{ github.event.inputs.make-arguments }}
271- if : needs.select .outputs.windows-aarch64 == 'true'
282+ if : needs.prepare .outputs.windows-aarch64 == 'true'
272283
273284 build-docs :
274285 name : docs
275- needs : select
286+ needs : prepare
276287 uses : ./.github/workflows/build-linux.yml
277288 with :
278289 platform : linux-x64
@@ -284,7 +295,7 @@ jobs:
284295 gcc-major-version : ' 10'
285296 configure-arguments : ${{ github.event.inputs.configure-arguments }}
286297 make-arguments : ${{ github.event.inputs.make-arguments }}
287- if : needs.select .outputs.docs == 'true'
298+ if : needs.prepare .outputs.docs == 'true'
288299
289300 # ##
290301 # ## Test jobs
0 commit comments