Skip to content

Commit

Permalink
Build on Mac OS X ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
reznikmm committed Aug 7, 2024
1 parent 1604866 commit 8d9a69d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,44 @@ 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
uses: actions/checkout@v2
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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/version-patcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d9a69d

Please sign in to comment.