Skip to content

Commit

Permalink
fix: static linking to libgcc in nightlies
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Oct 10, 2024
1 parent 68d701c commit 22ac0b6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,52 @@ jobs:
fail-fast: false # Attempt to generate as many of them as possible
matrix:
os:
- macos-14
- macos-12
- macos-14
- ubuntu-20.04
- windows-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Install FSF toolchain
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
prefix: alire_prefix

- name: Replace toolchain with aarch64
if: ${{ runner.arch == 'ARM64' }}
- name: Display toolchain configuration and verify matching arch
shell: bash
run: |
curl -L https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-14.1.0-3/gnat-aarch64-darwin-14.1.0-3.tar.gz \
| tar xzf - --strip-components=1 -C /Users/runner/work/alire/alire/alire_prefix
curl -L https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-24.0.0-1/gprbuild-aarch64-darwin-24.0.0-1.tar.gz \
| tar xzf - --strip-components=1 -C /Users/runner/work/alire/alire/alire_prefix
which gcc
gcc -v
case ${{runner.arch}} in
X64) target_arch=x86_64;;
ARM64) target_arch=aarch64;;
*) echo "Unknown arch" && exit 1;;
esac
which gcc
gcc -v
gcc -dumpmachine && gcc -dumpmachine | grep -q $target_arch || exit 1
gprbuild --version && gprbuild --version | grep -q $target_arch || exit 1
- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run test script
run: scripts/ci-github.sh
shell: bash

# Ascertain whether alr can run without the toolchain that built it
- name: Remove toolchain used for building & testing
shell: bash
run: |
rm -rf alire_prefix
which gnat || { echo "Toolchain purged"; ./bin/alr version; }
- name: Upload logs (if failed)
if: failure()
uses: actions/upload-artifact@v4
Expand Down
8 changes: 7 additions & 1 deletion scripts/ci-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [[ " $* " == *" build=false "* ]]; then
echo "Skipping alr build, explicitly disabled via arguments"
else
export ALIRE_OS=$(get_OS)
gprbuild -j0 -p -P alr_env
gprbuild -j0 -p -P alr_env -largs -static-libgcc
fi

# Disable distro detection if supported
Expand Down Expand Up @@ -70,6 +70,12 @@ echo ALR SEARCH:
alr -q -d search --list --external
echo ............................

# Exit without testing if some argument is "test=false"
if [[ " $* " == *" test=false "* ]]; then
echo "SKIPPING testsuite, explicitly disabled via arguments"
exit 0
fi

echo TESTSUITE:
# Run e3.testsuite
echo
Expand Down

0 comments on commit 22ac0b6

Please sign in to comment.