From 661faa9a2b30bbbebef77cb1f755be9c5d25a8d2 Mon Sep 17 00:00:00 2001 From: Jorge Antonio Diaz-Benito Soriano Date: Mon, 15 Apr 2024 17:12:28 +0200 Subject: [PATCH] Build on each XCode version supporting a Swift version --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 373ac8fc..3df2d9c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,37 @@ on: branches: - '**' jobs: - root: + generate-build-matrix: + runs-on: ubuntu-22.04 + outputs: + pairs: ${{ steps.generate.outputs.pairs }} + steps: + - uses: actions/setup-node@v4.0.2 + - run: npm install @plist/parse + - id: generate + run: | + pair_list=() + for plist in $(find /Applications/Xcode.*\.app/Contents/version.plist); do + pair_list+=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" $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/checkout@v3.5.3 + - uses: maxim-lobanov/setup-xcode@v1.6.0 + 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