Skip to content

Commit

Permalink
Build on each XCode version available on the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyicker committed Apr 16, 2024
1 parent 8e4a760 commit 4c11a85
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@ on:
branches:
- '**'
jobs:
root:
generate-build-matrix:
runs-on: macos-14-xlarge
outputs:
versions: ${{ steps.generate.outputs.versions }}
steps:
- id: generate
run: |
version_list=()
for XCODE_INSTALL in $(ls /Applications | grep Xcode); do
version_list+=("$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" /Applications/$XCODE_INSTALL/Contents/Info.plist)")
done
unique_version_list=( $(printf "%s\n" ${version_list[@]} | sort -n -u) )
jsonString="$(jq -c --null-input '$ARGS.positional' --args -- "${unique_version_list[@]}")"
echo "versions=$jsonString" >> $GITHUB_OUTPUT
build:
runs-on: macos-14-xlarge
needs: [ generate-build-matrix ]
strategy:
matrix:
version: ${{ fromJSON(needs.generate-build-matrix.outputs.versions) }}
steps:
- uses: actions/checkout@v3.5.3
- uses: maxim-lobanov/setup-xcode@v1.6.0
with: ${{ matrix.version }}
- uses: ./.github/actions/runGradleTask
with:
task: build
barrier-build:
runs-on: ubuntu-22.04
needs: [ build ]
steps:
- run: exit 0

0 comments on commit 4c11a85

Please sign in to comment.