Build on each XCode version available on the runner #236
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
generate-build-matrix: | |
runs-on: macos-14-xlarge | |
outputs: | |
pairs: ${{ steps.generate.outputs.pairs }} | |
steps: | |
- run: ls /Applications | grep Xcode | |
- id: generate | |
run: | | |
pair_list=() | |
for XCODE_INSTALL in $(ls /Applications | grep Xcode); do | |
pair_list+=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" $XCODE_INSTALL/Contents/Info.plist) | |
done | |
jsonString="$(jq -c --null-input '$ARGS.positional' --args -- "${pair_list[@]}")" | |
echo "pairs=$jsonString" >> $GITHUB_OUTPUT | |
build: | |
runs-on: macos-14-xlarge | |
needs: [ generate-build-matrix ] | |
strategy: | |
matrix: | |
pair: ${{ fromJSON(needs.generate-build-matrix.outputs.pairs) }} | |
steps: | |
- uses: actions/[email protected] | |
- uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: ${{ matrix.pair }} | |
- uses: ./.github/actions/runGradleTask | |
with: | |
task: build | |
barrier-build: | |
runs-on: ubuntu-22.04 | |
needs: [ build ] | |
steps: | |
- run: exit 0 |