Skip to content

Commit

Permalink
Build on Mac OS X ARM64 (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
reznikmm authored Aug 12, 2024
1 parent 6668490 commit 493d0c1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
28 changes: 24 additions & 4 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 All @@ -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
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 493d0c1

Please sign in to comment.