diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 15025e11b..6903a4462 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -11,12 +11,20 @@ on: types: [published] workflow_dispatch: +env: + ARCH: x86_64 + jobs: build: name: CI on macOS - runs-on: macos-12 + strategy: + fail-fast: false + matrix: + os: [macos-12, macos-14] + + runs-on: ${{ matrix.os }} steps: - name: Check out repository @@ -24,11 +32,23 @@ jobs: with: submodules: true - - name: Install FSF toolchain + - name: Install FSF toolchain (x86_64) + if: ${{ matrix.os != 'macos-14' }} uses: alire-project/alr-install@v1 with: crates: gnat_native gprbuild + - name: Install FSF toolchain (AArch64) + if: ${{ matrix.os == 'macos-14' }} + run: | + curl -L -O https://github.com/alire-project/alire/releases/download/nightly/alr-nightly-bin-aarch64-macos.zip + unzip alr-nightly-bin-aarch64-macos.zip bin/alr + bin/alr index --reset-community + bin/alr install gnat_native gprbuild --prefix alire_prefix + echo $PWD/bin >> $GITHUB_PATH + echo $PWD/alire_prefix/bin >> $GITHUB_PATH + echo "ARCH=aarch64" >> $GITHUB_ENV + - name: Install Python 3.x (required for the testsuite) uses: actions/setup-python@v2 with: @@ -44,7 +64,7 @@ jobs: - name: Upload binaries uses: actions/upload-artifact@v2 with: - name: alr-bin-macos.zip + name: alr-bin-${{ env.ARCH }}-macos.zip path: | bin/alr LICENSE.txt @@ -82,5 +102,5 @@ jobs: with: upload_url: ${{ steps.get_release.outputs.upload_url }} asset_path: alr-bin-macos.zip - asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-macos.zip + asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-${{ env.ARCH }}-macos.zip asset_content_type: application/zip diff --git a/scripts/version-patcher.sh b/scripts/version-patcher.sh index 9e666d56e..d377825b0 100755 --- a/scripts/version-patcher.sh +++ b/scripts/version-patcher.sh @@ -19,7 +19,7 @@ elif (which gprbuild &>/dev/null); then gprbuild -P support/version_patcher/version_patcher.gpr elif (which alr &>/dev/null); then echo "Building patcher with alr..." - alr -C "$(dirname $bin)" build + alr -C "$(dirname $(dirname $bin))" build else echo "WARNING: No Ada tool available to build patcher, skipping." exit 0