Skip to content

Commit 6e40d21

Browse files
committed
U922-009 Use GCC 11 toolchain by alire
and get rid of outdated GNAT CE 2020 for Mac OS
1 parent 23e6c2b commit 6e40d21

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.github/workflows/build-binaries.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ $PWD/subprojects/stubs
1818
export CPATH=/usr/local/include:/mingw64/include
1919
export LIBRARY_PATH=/usr/local/lib:/mingw64/lib
2020
export DYLD_LIBRARY_PATH=/usr/local/lib
21+
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
22+
echo PATH=$PATH
2123

2224
BRANCH=master
2325

@@ -36,9 +38,6 @@ FILE=libadalang-$RUNNER_OS-$BRANCH${DEBUG:+-dbg}-static.tar.gz
3638
aws s3 cp s3://adacore-gha-tray-eu-west-1/libadalang/$FILE . --sse=AES256
3739
tar xzf $FILE -C $prefix
3840
rm -f -v $FILE
39-
gprinstall --uninstall gnatcoll || true
40-
gprinstall --uninstall gpr || true
41-
rm -f -v gnat/spawn*.gpr
4241

4342
which python
4443
pip install --user e3-testsuite

.github/workflows/build-binaries.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,27 @@ jobs:
6363
- uses: actions/cache@v2
6464
with:
6565
path: ./cached_gnat
66-
key: ${{ runner.os }}-gnat-ce-2021
67-
restore-keys: ${{ runner.os }}-gnat-ce-2021
68-
- name: Get GNAT Community 2021 toolchain
69-
if: ${{ runner.os != 'macOS' }}
70-
uses: ada-actions/toolchain@ce2021
71-
with:
72-
distrib: community
73-
install_dir: ./cached_gnat
74-
- name: Get GNAT Community 2020 toolchain
75-
if: ${{ runner.os == 'macOS' }}
76-
uses: ada-actions/toolchain@ce2020
66+
key: ${{ runner.os }}-alire-2021
67+
restore-keys: ${{ runner.os }}-alire-2021
68+
- name: Rename gnat/
69+
if: ${{ runner.os == 'Windows' }}
70+
shell: bash
71+
run: mv gnat gnat_
72+
# alr fails to run `gnat` on Windows if there is a dir
73+
- name: Get GNAT toolchain with alire
74+
uses: alire-project/setup-alire@v1
7775
with:
78-
distrib: community
79-
install_dir: ./cached_gnat
76+
toolchain: gnat_native^11 gprbuild^21
77+
toolchain_dir: ./cached_gnat
8078
- name: Build (Windows)
8179
if: ${{ runner.os == 'Windows' }}
8280
shell: msys2 {0}
8381
env:
8482
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
8583
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
8684
run: |
85+
# Move `gnat` back
86+
mv gnat_ gnat
8787
# drop python if any
8888
rm -rf -v ./cached_gnat/gnat*/bin/python*
8989
# This is to avoid locking .sh on win that prevents its updating

0 commit comments

Comments
 (0)