@@ -30,8 +30,36 @@ permissions:
3030
3131jobs :
3232 test_suite :
33- name : Run the test suite
34- runs-on : ubuntu-24.04
33+ name : " Run the test suite (GCC ${{ matrix.gcc }}, ${{ matrix.runs-on }})"
34+ runs-on : ${{ matrix.runs-on }}
35+ strategy :
36+ fail-fast : false
37+ matrix :
38+ include :
39+ - runs-on : ubuntu-20.04
40+ gcc : 7
41+ install : g++-7 gcc-7 cpp-7
42+ - runs-on : ubuntu-20.04
43+ gcc : 8
44+ install : g++-8 gcc-8 cpp-8
45+ - runs-on : ubuntu-24.04
46+ gcc : 9
47+ install : g++-9 gcc-9 cpp-9
48+ - runs-on : ubuntu-24.04
49+ gcc : 10
50+ install : g++-10 gcc-10 cpp-10
51+ - runs-on : ubuntu-24.04
52+ gcc : 11
53+ install : g++-11 gcc-11 cpp-11
54+ - runs-on : ubuntu-24.04
55+ gcc : 12
56+ install :
57+ - runs-on : ubuntu-24.04
58+ gcc : 13
59+ install :
60+ - runs-on : ubuntu-24.04
61+ gcc : 14
62+ install :
3563 steps :
3664 - uses : actions/checkout@v4
3765
6593
6694 sudo perl -MCPAN -e 'install(Memory::Process)' # no package in Ubuntu
6795
96+ - name : " Make GCC ${{ matrix.gcc }} systemwide default"
97+ run : |-
98+ set -x -o pipefail
99+ if [[ "${{ matrix.install }}" != "" ]]; then
100+ sudo apt-get update
101+ sudo apt-get install --no-install-recommends --yes -V ${{ matrix.install }}
102+ fi
103+
104+ # Make requested version GCC and GCOV the system default
105+ # before we have an easy way to fully divert "make check"
106+ # off of the default commands
107+ for i in cpp {,x86_64-linux-gnu-}{g++,gcc{,-{ar,nm,ranlib}},gcov{,-{dump,tool}},gfortran} lto-dump ; do
108+ [[ -e /usr/bin/"${i}" ]] || continue
109+ [[ -e /usr/bin/"${i}-${{ matrix.gcc }}" ]] || continue
110+ sudo rm /usr/bin/"${i}"
111+ sudo ln -s "${i}-${{ matrix.gcc }}" /usr/bin/"${i}"
112+ "${i}" --version | head -n1
113+ done
114+
68115 - name : make install
69116 run : |-
70117 set -x -o pipefail
@@ -86,13 +133,13 @@ jobs:
86133 - name : Upload test log as an artifact
87134 uses : actions/upload-artifact@v4
88135 with :
89- name : " lcov-${{ github.sha }}-${{ runner.os }}-test-log" # .zip
136+ name : " lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}- test-log" # .zip
90137 path : tests/test.log
91138 if-no-files-found : error
92139
93140 - name : Upload test directory shrapnel as an artifact
94141 uses : actions/upload-artifact@v4
95142 with :
96- name : " lcov-${{ github.sha }}-${{ runner.os }}-shrapnel" # .zip
143+ name : " lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}- shrapnel" # .zip
97144 path : tests
98145 # if-no-files-found: error
0 commit comments