From 8631eb70fd413d8b037a79760ff114f50415ecab Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Wed, 9 Oct 2024 21:41:45 +0200 Subject: [PATCH] Enable aarch64 builds --- .github/workflows/test-cache.yml | 2 +- action.yml | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-cache.yml b/.github/workflows/test-cache.yml index 86fcf296..e66d840b 100644 --- a/.github/workflows/test-cache.yml +++ b/.github/workflows/test-cache.yml @@ -19,7 +19,7 @@ jobs: - ubuntu-latest - windows-latest config: - - version: '2.0.1' + - version: '2.0.2' branch: '' - version: '1.2.2' branch: '' diff --git a/action.yml b/action.yml index 2dae233d..58f3b777 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ inputs: version: description: Use this argument to install a stable or nightly release. Use a version number without v prefix, e.g., 1.0.1, 1.1.0, or 'nightly'. This argument will be ignored if a branch argument is supplied. Defaults to the latest stable release. required: false - default: '2.0.1' + default: '2.0.2' # Also to be updated in test-cache-yml branch: description: Use this argument to install a development branch (e.g., master). @@ -113,21 +113,25 @@ runs: shell: bash run: | os_lower=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]') - alr_version=2.0.1 - curl -L -O https://github.com/alire-project/alire/releases/download/v${alr_version}/alr-${alr_version}-bin-x86_64-${os_lower}.zip - unzip -o alr-${alr_version}-bin-x86_64-${os_lower}.zip "bin/alr*" -d tmp_alr - rm alr-${alr_version}-bin-x86_64-${os_lower}.zip + case "${{ runner.arch }}" in + ARM64) arch=aarch64;; + X64) arch=x86_64;; + *) echo "Unknown arch: ${{runner.arch}}"; exit 1;; + esac + alr_version=2.0.2 + alr_filename=alr-${alr_version}-bin-${arch}-${os_lower}.zip + curl -L -O https://github.com/alire-project/alire/releases/download/v${alr_version}/${alr_filename} + unzip -o ${alr_filename} "bin/alr*" -d tmp_alr + rm ${alr_filename} echo "$(pwd -W 2>/dev/null || pwd)/tmp_alr/bin" >> $GITHUB_PATH # Perform the actual `alr install` and remove the `alr` just used to avoid # conflicts with the `alr` being built. - # TODO: we use gnat^13 because there seems to be some trouble with gnat^14 - # on macOS. Revisit this when the issue is resolved. - name: Install GNAT (II) if: steps.need-GNAT.outputs.need == 'true' shell: bash run: | - alr install gnat_native^13 gprbuild^22 --prefix=$PWD/setup_alire_prefix + alr install gnat_native gprbuild --prefix=$PWD/setup_alire_prefix echo REMOVAL TARGET: $(which alr) rm -rf tmp_alr && echo REMOVED stable alr used for toolchain install