Skip to content

Commit

Permalink
run_test_suite.yml: Use a variety of versions of GCC
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Pipping <[email protected]>
  • Loading branch information
hartwork committed Dec 21, 2024
1 parent 9183462 commit 0a2a9e2
Showing 1 changed file with 51 additions and 4 deletions.
55 changes: 51 additions & 4 deletions .github/workflows/run_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,36 @@ permissions:

jobs:
test_suite:
name: Run the test suite
runs-on: ubuntu-24.04
name: "Run the test suite (GCC ${{ matrix.gcc }}, ${{ matrix.runs-on }})"
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-20.04
gcc: 7
install: g++-7 gcc-7 cpp-7
- runs-on: ubuntu-20.04
gcc: 8
install: g++-8 gcc-8 cpp-8
- runs-on: ubuntu-24.04
gcc: 9
install: g++-9 gcc-9 cpp-9
- runs-on: ubuntu-24.04
gcc: 10
install: g++-10 gcc-10 cpp-10
- runs-on: ubuntu-24.04
gcc: 11
install: g++-11 gcc-11 cpp-11
- runs-on: ubuntu-24.04
gcc: 12
install:
- runs-on: ubuntu-24.04
gcc: 13
install:
- runs-on: ubuntu-24.04
gcc: 14
install:
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -65,6 +93,25 @@ jobs:
sudo perl -MCPAN -e 'install(Memory::Process)' # no package in Ubuntu
- name: "Make GCC ${{ matrix.gcc }} systemwide default"
run: |-
set -x -o pipefail
if [[ "${{ matrix.install }}" != "" ]]; then
sudo apt-get update
sudo apt-get install --no-install-recommends --yes -V ${{ matrix.install }}
fi
# Make requested version GCC and GCOV the system default
# before we have an easy way to fully divert "make check"
# off of the default commands
for i in cpp {,x86_64-linux-gnu-}{g++,gcc{,-{ar,nm,ranlib}},gcov{,-{dump,tool}},gfortran} lto-dump ; do
[[ -e /usr/bin/"${i}" ]] || continue
[[ -e /usr/bin/"${i}-${{ matrix.gcc }}" ]] || continue
sudo rm /usr/bin/"${i}"
sudo ln -s "${i}-${{ matrix.gcc }}" /usr/bin/"${i}"
"${i}" --version | head -n1
done
- name: make install
run: |-
set -x -o pipefail
Expand All @@ -86,13 +133,13 @@ jobs:
- name: Upload test log as an artifact
uses: actions/upload-artifact@v4
with:
name: "lcov-${{ github.sha }}-${{ runner.os }}-test-log" # .zip
name: "lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}-test-log" # .zip
path: tests/test.log
if-no-files-found: error

- name: Upload test directory shrapnel as an artifact
uses: actions/upload-artifact@v4
with:
name: "lcov-${{ github.sha }}-${{ runner.os }}-shrapnel" # .zip
name: "lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}-shrapnel" # .zip
path: tests
#if-no-files-found: error

0 comments on commit 0a2a9e2

Please sign in to comment.