From c562d36fcfc63911e766eb9c6384496dd852eb61 Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Wed, 19 Mar 2025 20:04:46 +0200 Subject: [PATCH] fix: use gnat_native for aarch64-linux on Ubuntu 22.04 (#1910) But bootstrap alire with `alire-project/setup-alire`, because alr 2.1.0 was built on Ubuntu 24.04 while we need it on 22.04. --- .github/workflows/ci-release.yml | 43 ++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 1c97c110..b3de6773 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -56,7 +56,7 @@ jobs: - os: ubuntu-22.04 # x64, oldest supported so releases can run on older distros id: x86_64-linux - - os: ubuntu-24.04-arm # new ARM runners + - os: ubuntu-22.04-arm # new ARM runners id: aarch64-linux - os: windows-latest @@ -70,23 +70,33 @@ jobs: submodules: true # Install GNAT, we only need a system compiler for Ubuntu ARM until we have - # Alire-indexed releases for it. - - - name: Install Alire toolchain - if: matrix.platform.id != 'aarch64-linux' - uses: alire-project/alr-install@v2 - with: - crates: gnat_native gprbuild - prefix: alire_prefix + # Alire for ARM64/Linux (on Ubuntu 22.04) release. - name: Install system toolchain (Ubuntu ARM) if: matrix.platform.id == 'aarch64-linux' run: | sudo apt-get install -y gnat gprbuild echo ALIRE_TESTSUITE_DISABLE_DOCKER=true >> $GITHUB_ENV - echo USE_EXTERNAL=use_external >> $GITHUB_ENV - # GNAT 10 has a bug that fails in the testsuite. Also, we need to disable - # Docker tests on Ubuntu ARM. + # We need to disable Docker tests on Ubuntu ARM. + + - name: Bootstrap Alire (Ubuntu ARM) + if: matrix.platform.id == 'aarch64-linux' + uses: alire-project/setup-alire@v5 + with: + branch: "master" # build from source + + - name: Remove system GNAT (Ubuntu ARM) + if: matrix.platform.id == 'aarch64-linux' + run: | + sudo apt-get remove -y gnat-10 gprbuild + rm -rf ~/.local/share/alire/toolchains/ + shell: bash + + - name: Install Alire toolchain + uses: alire-project/alr-install@v2 + with: + crates: gnat_native gprbuild + prefix: alire_prefix - name: Check toolchain architecture uses: mosteo-actions/gnat-toolchain-arch-checker@v1 @@ -107,11 +117,6 @@ jobs: # Ascertain whether alr can run without the toolchain that built it - - name: Remove system GNAT (Ubuntu ARM) - if: matrix.platform.id == 'aarch64-linux' - run: sudo apt-get remove -y gnat-13 gprbuild - shell: bash - - name: Check standalone alr uses: mosteo-actions/alr-standalone-checker@v1 with: @@ -224,7 +229,7 @@ jobs: - os: ubuntu-22.04 id: x86_64-linux - - os: ubuntu-24.04-arm + - os: ubuntu-22.04-arm id: aarch64-linux - os: windows-latest @@ -502,7 +507,7 @@ jobs: - os: ubuntu-22.04 id: x86_64-linux - - os: ubuntu-24.04-arm + - os: ubuntu-22.04-arm id: aarch64-linux - os: windows-latest -- 2.39.5