From 456862015a5af631287cbb04c2ca8726b9653413 Mon Sep 17 00:00:00 2001 From: Tobias Reiher Date: Thu, 28 Jul 2022 12:35:20 +0200 Subject: [PATCH] Fix use of unintended FSF GNAT version in CI Ref. #1124 --- .github/workflows/tests.yml | 16 ++++++++++++++++ Makefile | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c573587e9..3a336db0e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -325,6 +325,7 @@ jobs: uses: alire-project/setup-alire@v1 with: version: ${{ env.ALIRE_VERSION }} + toolchain: "--disable-assistant" - name: Install FSF GNAT if: ${{ needs.skip_check_compilation.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }} run: | @@ -494,25 +495,38 @@ jobs: gnat-distrib: - "community" - "fsf" + env: + FSF_GNAT_VERSION: 11.2.4 steps: - uses: actions/checkout@v2 with: submodules: true - name: Cache GNAT Community + if: ${{ matrix.gnat-distrib == 'community' }} uses: actions/cache@v2 with: path: /home/runner/work/gnat key: ${{ runner.os }}-gnat-ce2021 - name: Install GNAT Community + if: ${{ matrix.gnat-distrib == 'community' }} uses: ada-actions/toolchain@ce2021 with: distrib: community install_dir: /home/runner/work/gnat + - name: Cache Alire and FSF GNAT + if: ${{ matrix.gnat-distrib == 'fsf' }} + uses: actions/cache@v2 + with: + path: | + ~/.config/alire + build/alire + key: ${{ runner.os }}-alire${{ env.ALIRE_VERSION }}-fsf${{ env.FSF_GNAT_VERSION }}-${{ hashFiles('Makefile') }} - name: Install Alire if: ${{ matrix.gnat-distrib == 'fsf' }} uses: alire-project/setup-alire@v1 with: version: ${{ env.ALIRE_VERSION }} + toolchain: "--disable-assistant" - name: Install FSF GNAT if: ${{ matrix.gnat-distrib == 'fsf' }} run: | @@ -697,6 +711,7 @@ jobs: uses: alire-project/setup-alire@v1 with: version: ${{ env.ALIRE_VERSION }} + toolchain: "--disable-assistant" - name: Install FSF GNAT if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }} run: | @@ -870,6 +885,7 @@ jobs: uses: alire-project/setup-alire@v1 with: version: ${{ env.ALIRE_VERSION }} + toolchain: "--disable-assistant" - name: Install FSF GNAT if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }} run: | diff --git a/Makefile b/Makefile index cb4caef52..c5a080ad4 100644 --- a/Makefile +++ b/Makefile @@ -144,13 +144,15 @@ upgrade_devel: install_devel_edge: install_devel $(MAKE) -C .config/python-style install_devel_edge +install_gnat: FSF_GNAT_VERSION ?= 11.2.4 +install_gnat: GPRBUILD_VERSION ?= 22.0.1 install_gnat: test -d build/alire || ( \ - alr toolchain --install gnat_native=11.2.1 && \ mkdir -p build && \ cd build && \ alr -n init --lib alire && \ cd alire && \ + alr toolchain --select --local gnat_native=$(FSF_GNAT_VERSION) gprbuild=$(GPRBUILD_VERSION) && \ alr -n with aunit gnatcoll_iconv gnatcoll_gmp \ )