< prev index next >

.github/workflows/main.yml

Print this page

115           echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
116           echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
117           echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
118           echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
119           echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
120           echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
121 
122   ###
123   ### Build jobs
124   ###
125 
126   build-linux-x64:
127     name: linux-x64
128     needs: select
129     uses: ./.github/workflows/build-linux.yml
130     with:
131       platform: linux-x64
132       gcc-major-version: '10'
133       configure-arguments: ${{ github.event.inputs.configure-arguments }}
134       make-arguments: ${{ github.event.inputs.make-arguments }}
135     # The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
136     if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
137 
138   build-linux-x86:
139     name: linux-x86
140     needs: select
141     uses: ./.github/workflows/build-linux.yml
142     with:
143       platform: linux-x86
144       gcc-major-version: '10'
145       gcc-package-suffix: '-multilib'
146       apt-architecture: 'i386'
147       # Some multilib libraries do not have proper inter-dependencies, so we have to
148       # install their dependencies manually.
149       apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386'
150       extra-conf-options: '--with-target-bits=32'
151       configure-arguments: ${{ github.event.inputs.configure-arguments }}
152       make-arguments: ${{ github.event.inputs.make-arguments }}
153     if: needs.select.outputs.linux-x86 == 'true'
154 
155   build-linux-x64-hs-nopch:
156     name: linux-x64-hs-nopch

196 
197   build-linux-x64-hs-optimized:
198     name: linux-x64-hs-optimized
199     needs: select
200     uses: ./.github/workflows/build-linux.yml
201     with:
202       platform: linux-x64
203       make-target: 'hotspot'
204       # Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
205       debug-levels: '[ "debug" ]'
206       gcc-major-version: '10'
207       extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
208       configure-arguments: ${{ github.event.inputs.configure-arguments }}
209       make-arguments: ${{ github.event.inputs.make-arguments }}
210     if: needs.select.outputs.linux-x64-variants == 'true'
211 
212   build-linux-cross-compile:
213     name: linux-cross-compile
214     needs:
215       - select
216       - build-linux-x64
217     uses: ./.github/workflows/build-cross-compile.yml
218     with:
219       gcc-major-version: '10'
220       configure-arguments: ${{ github.event.inputs.configure-arguments }}
221       make-arguments: ${{ github.event.inputs.make-arguments }}
222     if: needs.select.outputs.linux-cross-compile == 'true'
223 
224   build-macos-x64:
225     name: macos-x64
226     needs: select
227     uses: ./.github/workflows/build-macos.yml
228     with:
229       platform: macos-x64
230       runs-on: 'macos-13'
231       xcode-toolset-version: '14.3.1'
232       configure-arguments: ${{ github.event.inputs.configure-arguments }}
233       make-arguments: ${{ github.event.inputs.make-arguments }}
234     if: needs.select.outputs.macos-x64 == 'true'
235 
236   build-macos-aarch64:

350       - build-linux-x64
351       - build-linux-x86
352       - build-linux-x64-hs-nopch
353       - build-linux-x64-hs-zero
354       - build-linux-x64-hs-minimal
355       - build-linux-x64-hs-optimized
356       - build-linux-cross-compile
357       - build-macos-x64
358       - build-macos-aarch64
359       - build-windows-x64
360       - build-windows-aarch64
361       - test-linux-x64
362       - test-linux-x86
363       - test-macos-x64
364       - test-windows-x64
365 
366     steps:
367         # Hack to get hold of the api environment variables that are only defined for actions
368       - name: 'Get API configuration'
369         id: api
370         uses: actions/github-script@v6
371         with:
372           script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
373 
374       - name: 'Remove bundle artifacts'
375         run: |
376           # Find and remove all bundle artifacts
377           ALL_ARTIFACT_URLS="$(curl -s \
378               -H 'Accept: application/json;api-version=6.0-preview' \
379               -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
380               '${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
381           BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
382           for url in $BUNDLE_ARTIFACT_URLS; do
383             echo "Removing $url"
384             curl -s \
385                 -H 'Accept: application/json;api-version=6.0-preview' \
386                 -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
387                 -X DELETE "$url" \
388             || echo "Failed to remove bundle"
389           done

115           echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
116           echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
117           echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
118           echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
119           echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
120           echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
121 
122   ###
123   ### Build jobs
124   ###
125 
126   build-linux-x64:
127     name: linux-x64
128     needs: select
129     uses: ./.github/workflows/build-linux.yml
130     with:
131       platform: linux-x64
132       gcc-major-version: '10'
133       configure-arguments: ${{ github.event.inputs.configure-arguments }}
134       make-arguments: ${{ github.event.inputs.make-arguments }}
135     if: needs.select.outputs.linux-x64 == 'true'

136 
137   build-linux-x86:
138     name: linux-x86
139     needs: select
140     uses: ./.github/workflows/build-linux.yml
141     with:
142       platform: linux-x86
143       gcc-major-version: '10'
144       gcc-package-suffix: '-multilib'
145       apt-architecture: 'i386'
146       # Some multilib libraries do not have proper inter-dependencies, so we have to
147       # install their dependencies manually.
148       apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386'
149       extra-conf-options: '--with-target-bits=32'
150       configure-arguments: ${{ github.event.inputs.configure-arguments }}
151       make-arguments: ${{ github.event.inputs.make-arguments }}
152     if: needs.select.outputs.linux-x86 == 'true'
153 
154   build-linux-x64-hs-nopch:
155     name: linux-x64-hs-nopch

195 
196   build-linux-x64-hs-optimized:
197     name: linux-x64-hs-optimized
198     needs: select
199     uses: ./.github/workflows/build-linux.yml
200     with:
201       platform: linux-x64
202       make-target: 'hotspot'
203       # Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
204       debug-levels: '[ "debug" ]'
205       gcc-major-version: '10'
206       extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
207       configure-arguments: ${{ github.event.inputs.configure-arguments }}
208       make-arguments: ${{ github.event.inputs.make-arguments }}
209     if: needs.select.outputs.linux-x64-variants == 'true'
210 
211   build-linux-cross-compile:
212     name: linux-cross-compile
213     needs:
214       - select

215     uses: ./.github/workflows/build-cross-compile.yml
216     with:
217       gcc-major-version: '10'
218       configure-arguments: ${{ github.event.inputs.configure-arguments }}
219       make-arguments: ${{ github.event.inputs.make-arguments }}
220     if: needs.select.outputs.linux-cross-compile == 'true'
221 
222   build-macos-x64:
223     name: macos-x64
224     needs: select
225     uses: ./.github/workflows/build-macos.yml
226     with:
227       platform: macos-x64
228       runs-on: 'macos-13'
229       xcode-toolset-version: '14.3.1'
230       configure-arguments: ${{ github.event.inputs.configure-arguments }}
231       make-arguments: ${{ github.event.inputs.make-arguments }}
232     if: needs.select.outputs.macos-x64 == 'true'
233 
234   build-macos-aarch64:

348       - build-linux-x64
349       - build-linux-x86
350       - build-linux-x64-hs-nopch
351       - build-linux-x64-hs-zero
352       - build-linux-x64-hs-minimal
353       - build-linux-x64-hs-optimized
354       - build-linux-cross-compile
355       - build-macos-x64
356       - build-macos-aarch64
357       - build-windows-x64
358       - build-windows-aarch64
359       - test-linux-x64
360       - test-linux-x86
361       - test-macos-x64
362       - test-windows-x64
363 
364     steps:
365         # Hack to get hold of the api environment variables that are only defined for actions
366       - name: 'Get API configuration'
367         id: api
368         uses: actions/github-script@v7
369         with:
370           script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
371 
372       - name: 'Remove bundle artifacts'
373         run: |
374           # Find and remove all bundle artifacts
375           ALL_ARTIFACT_URLS="$(curl -s \
376               -H 'Accept: application/json;api-version=6.0-preview' \
377               -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
378               '${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
379           BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
380           for url in $BUNDLE_ARTIFACT_URLS; do
381             echo "Removing $url"
382             curl -s \
383                 -H 'Accept: application/json;api-version=6.0-preview' \
384                 -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
385                 -X DELETE "$url" \
386             || echo "Failed to remove bundle"
387           done
< prev index next >