Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Mac OS X ARM64 #1731

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading