5858 # ## Determine platforms to include
5959 # ##
6060
61- select :
62- name : ' Select platforms '
61+ prepare :
62+ name : ' Prepare the run '
6363 # SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
6464 if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
6565 runs-on : ubuntu-22.04
7474 windows-aarch64 : ${{ steps.include.outputs.windows-aarch64 }}
7575
7676 steps :
77- # This function must be inlined in main.yml, or we'd be forced to checkout the repo
77+ - name : ' Checkout the scripts'
78+ uses : actions/checkout@v4
79+ with :
80+ sparse-checkout : |
81+ .github
82+ make/conf/github-actions.conf
83+
84+ - name : ' Build JTReg'
85+ id : jtreg
86+ uses : ./.github/actions/build-jtreg
87+
88+ # TODO: Now that we are checking out the repo scripts, we can put the following code
89+ # into a separate file
7890 - name : ' Check what jobs to run'
7991 id : include
8092 run : |
@@ -131,18 +143,18 @@ jobs:
131143
132144 build-linux-x64 :
133145 name : linux-x64
134- needs : select
146+ needs : prepare
135147 uses : ./.github/workflows/build-linux.yml
136148 with :
137149 platform : linux-x64
138150 gcc-major-version : ' 10'
139151 configure-arguments : ${{ github.event.inputs.configure-arguments }}
140152 make-arguments : ${{ github.event.inputs.make-arguments }}
141- if : needs.select .outputs.linux-x64 == 'true'
153+ if : needs.prepare .outputs.linux-x64 == 'true'
142154
143155 build-linux-x86-hs :
144156 name : linux-x86-hs
145- needs : select
157+ needs : prepare
146158 uses : ./.github/workflows/build-linux.yml
147159 with :
148160 platform : linux-x86
@@ -156,11 +168,11 @@ jobs:
156168 extra-conf-options : ' --with-target-bits=32'
157169 configure-arguments : ${{ github.event.inputs.configure-arguments }}
158170 make-arguments : ${{ github.event.inputs.make-arguments }}
159- if : needs.select .outputs.linux-x86-hs == 'true'
171+ if : needs.prepare .outputs.linux-x86-hs == 'true'
160172
161173 build-linux-x64-hs-nopch :
162174 name : linux-x64-hs-nopch
163- needs : select
175+ needs : prepare
164176 uses : ./.github/workflows/build-linux.yml
165177 with :
166178 platform : linux-x64
@@ -170,11 +182,11 @@ jobs:
170182 extra-conf-options : ' --disable-precompiled-headers'
171183 configure-arguments : ${{ github.event.inputs.configure-arguments }}
172184 make-arguments : ${{ github.event.inputs.make-arguments }}
173- if : needs.select .outputs.linux-x64-variants == 'true'
185+ if : needs.prepare .outputs.linux-x64-variants == 'true'
174186
175187 build-linux-x64-hs-zero :
176188 name : linux-x64-hs-zero
177- needs : select
189+ needs : prepare
178190 uses : ./.github/workflows/build-linux.yml
179191 with :
180192 platform : linux-x64
@@ -184,11 +196,11 @@ jobs:
184196 extra-conf-options : ' --with-jvm-variants=zero --disable-precompiled-headers'
185197 configure-arguments : ${{ github.event.inputs.configure-arguments }}
186198 make-arguments : ${{ github.event.inputs.make-arguments }}
187- if : needs.select .outputs.linux-x64-variants == 'true'
199+ if : needs.prepare .outputs.linux-x64-variants == 'true'
188200
189201 build-linux-x64-hs-minimal :
190202 name : linux-x64-hs-minimal
191- needs : select
203+ needs : prepare
192204 uses : ./.github/workflows/build-linux.yml
193205 with :
194206 platform : linux-x64
@@ -198,11 +210,11 @@ jobs:
198210 extra-conf-options : ' --with-jvm-variants=minimal --disable-precompiled-headers'
199211 configure-arguments : ${{ github.event.inputs.configure-arguments }}
200212 make-arguments : ${{ github.event.inputs.make-arguments }}
201- if : needs.select .outputs.linux-x64-variants == 'true'
213+ if : needs.prepare .outputs.linux-x64-variants == 'true'
202214
203215 build-linux-x64-hs-optimized :
204216 name : linux-x64-hs-optimized
205- needs : select
217+ needs : prepare
206218 uses : ./.github/workflows/build-linux.yml
207219 with :
208220 platform : linux-x64
@@ -213,58 +225,57 @@ jobs:
213225 extra-conf-options : ' --with-debug-level=optimized --disable-precompiled-headers'
214226 configure-arguments : ${{ github.event.inputs.configure-arguments }}
215227 make-arguments : ${{ github.event.inputs.make-arguments }}
216- if : needs.select .outputs.linux-x64-variants == 'true'
228+ if : needs.prepare .outputs.linux-x64-variants == 'true'
217229
218230 build-linux-cross-compile :
219231 name : linux-cross-compile
220- needs :
221- - select
232+ needs : prepare
222233 uses : ./.github/workflows/build-cross-compile.yml
223234 with :
224235 gcc-major-version : ' 10'
225236 configure-arguments : ${{ github.event.inputs.configure-arguments }}
226237 make-arguments : ${{ github.event.inputs.make-arguments }}
227- if : needs.select .outputs.linux-cross-compile == 'true'
238+ if : needs.prepare .outputs.linux-cross-compile == 'true'
228239
229240 build-macos-x64 :
230241 name : macos-x64
231- needs : select
242+ needs : prepare
232243 uses : ./.github/workflows/build-macos.yml
233244 with :
234245 platform : macos-x64
235246 runs-on : ' macos-13'
236247 xcode-toolset-version : ' 14.3.1'
237248 configure-arguments : ${{ github.event.inputs.configure-arguments }}
238249 make-arguments : ${{ github.event.inputs.make-arguments }}
239- if : needs.select .outputs.macos-x64 == 'true'
250+ if : needs.prepare .outputs.macos-x64 == 'true'
240251
241252 build-macos-aarch64 :
242253 name : macos-aarch64
243- needs : select
254+ needs : prepare
244255 uses : ./.github/workflows/build-macos.yml
245256 with :
246257 platform : macos-aarch64
247258 runs-on : ' macos-14'
248259 xcode-toolset-version : ' 15.4'
249260 configure-arguments : ${{ github.event.inputs.configure-arguments }}
250261 make-arguments : ${{ github.event.inputs.make-arguments }}
251- if : needs.select .outputs.macos-aarch64 == 'true'
262+ if : needs.prepare .outputs.macos-aarch64 == 'true'
252263
253264 build-windows-x64 :
254265 name : windows-x64
255- needs : select
266+ needs : prepare
256267 uses : ./.github/workflows/build-windows.yml
257268 with :
258269 platform : windows-x64
259270 msvc-toolset-version : ' 14.29'
260271 msvc-toolset-architecture : ' x86.x64'
261272 configure-arguments : ${{ github.event.inputs.configure-arguments }}
262273 make-arguments : ${{ github.event.inputs.make-arguments }}
263- if : needs.select .outputs.windows-x64 == 'true'
274+ if : needs.prepare .outputs.windows-x64 == 'true'
264275
265276 build-windows-aarch64 :
266277 name : windows-aarch64
267- needs : select
278+ needs : prepare
268279 uses : ./.github/workflows/build-windows.yml
269280 with :
270281 platform : windows-aarch64
@@ -274,7 +285,7 @@ jobs:
274285 extra-conf-options : ' --openjdk-target=aarch64-unknown-cygwin'
275286 configure-arguments : ${{ github.event.inputs.configure-arguments }}
276287 make-arguments : ${{ github.event.inputs.make-arguments }}
277- if : needs.select .outputs.windows-aarch64 == 'true'
288+ if : needs.prepare .outputs.windows-aarch64 == 'true'
278289
279290 # ##
280291 # ## Test jobs
0 commit comments