@@ -30,8 +30,28 @@ permissions:
30
30
31
31
jobs :
32
32
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
+ # GCC 4 to 8 are assumed to behave "the same",
43
+ # so we are skipping GCC 8 here to save CI resources
44
+ - runs-on : ubuntu-24.04
45
+ gcc : 9
46
+ install : g++-9 gcc-9 cpp-9
47
+ - runs-on : ubuntu-24.04
48
+ gcc : 10
49
+ install : g++-10 gcc-10 cpp-10
50
+ # GCC 10 to 14 are assumed to behave "the same",
51
+ # so we are skipping GCC 11, 12, 13 here to save CI resources
52
+ - runs-on : ubuntu-24.04
53
+ gcc : 14
54
+ install :
35
55
steps :
36
56
- uses : actions/checkout@v4
37
57
65
85
66
86
sudo perl -MCPAN -e 'install(Memory::Process)' # no package in Ubuntu
67
87
88
+ - name : " Make GCC ${{ matrix.gcc }} systemwide default"
89
+ run : |-
90
+ set -x -o pipefail
91
+ if [[ "${{ matrix.install }}" != "" ]]; then
92
+ sudo apt-get update
93
+ sudo apt-get install --no-install-recommends --yes -V ${{ matrix.install }}
94
+ fi
95
+
96
+ # Make requested version GCC and GCOV the system default
97
+ # before we have an easy way to fully divert "make check"
98
+ # off of the default commands
99
+ for i in cpp {,x86_64-linux-gnu-}{g++,gcc{,-{ar,nm,ranlib}},gcov{,-{dump,tool}},gfortran} lto-dump ; do
100
+ [[ -e /usr/bin/"${i}" ]] || continue
101
+ [[ -e /usr/bin/"${i}-${{ matrix.gcc }}" ]] || continue
102
+ sudo rm /usr/bin/"${i}"
103
+ sudo ln -s "${i}-${{ matrix.gcc }}" /usr/bin/"${i}"
104
+ "${i}" --version | head -n1
105
+ done
106
+
68
107
- name : make install
69
108
run : |-
70
109
set -x -o pipefail
@@ -86,13 +125,13 @@ jobs:
86
125
- name : Upload test log as an artifact
87
126
uses : actions/upload-artifact@v4
88
127
with :
89
- name : " lcov-${{ github.sha }}-${{ runner.os }}-test-log" # .zip
128
+ name : " lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}- test-log" # .zip
90
129
path : tests/test.log
91
130
if-no-files-found : error
92
131
93
132
- name : Upload test directory shrapnel as an artifact
94
133
uses : actions/upload-artifact@v4
95
134
with :
96
- name : " lcov-${{ github.sha }}-${{ runner.os }}-shrapnel" # .zip
135
+ name : " lcov-${{ github.sha }}-${{ runner.os }}-GCC-${{ matrix.gcc }}- shrapnel" # .zip
97
136
path : tests
98
137
# if-no-files-found: error
0 commit comments