@@ -3,6 +3,7 @@ name: Test
33on :
44 workflow_dispatch :
55 pull_request :
6+ types : [opened, synchronize, reopened, ready_for_review]
67 push :
78 branches : [ "main" ]
89
@@ -14,36 +15,49 @@ jobs:
1415 strategy :
1516 matrix :
1617 include :
17- - os : ubuntu-20.04
18- compiler : g++-7
19- install : g++-7
20- - os : ubuntu-latest
18+ # GCC on Ubuntu 22.04 (older GCC versions)
19+ - os : ubuntu-22.04
2120 compiler : g++-10
22- - os : ubuntu-latest
21+ - os : ubuntu-22.04
2322 compiler : g++-11
24- install : g++-11
23+ - os : ubuntu-22.04
24+ compiler : g++-12
25+ # GCC on Ubuntu 24.04 (newer GCC versions)
26+ - os : ubuntu-24.04
27+ compiler : g++-13
28+ - os : ubuntu-24.04
29+ compiler : g++-14
30+ gcov : gcov-14
2531 extra_build_flags : -DENABLE_COVERAGE:BOOL=ON # coverage build
26- - os : ubuntu-20.04
27- compiler : clang++-7
28- install : clang-7
29- - os : ubuntu-latest
30- compiler : clang++-12
31- - os : ubuntu-latest
32+ # Clang on Ubuntu 22.04 (older Clang versions)
33+ - os : ubuntu-22.04
3234 compiler : clang++-13
33- - os : ubuntu-latest
35+ - os : ubuntu-22.04
3436 compiler : clang++-14
35- - os : macos-11
36- compiler : g++-10
37- - os : macos-latest
38- compiler : g++-12
39- - os : macos-latest
40- comp : AppleClang # unused: this is the default compiler and not obvious to specify
41- # explicitly, but we still want to see the compiler string in the
42- # GH UI, so use a different var altogether
37+ - os : ubuntu-22.04
38+ compiler : clang++-15
39+ # Clang on Ubuntu 24.04 (newer Clang versions)
40+ - os : ubuntu-24.04
41+ compiler : clang++-16
42+ - os : ubuntu-24.04
43+ compiler : clang++-17
44+ - os : ubuntu-24.04
45+ compiler : clang++-18
46+ - os : ubuntu-24.04
47+ compiler : clang++-19
48+ install : clang-19
49+ # GCC on macOS
50+ - os : macos-15
51+ compiler : g++-13
52+ - os : macos-15
53+ compiler : g++-15
54+ # AppleClang on macOS
55+ - os : macos-15
56+ comp : AppleClang # default compiler, unused var to show in GH UI
4357
4458 runs-on : ${{matrix.os}}
4559 steps :
46- - uses : actions/checkout@v3
60+ - uses : actions/checkout@v6
4761 with :
4862 fetch-depth : 2 # Codecov requests >1
4963
@@ -79,16 +93,24 @@ jobs:
7993 ARGS=-j$((${num_cpus} * 2)) # don't pass --parallel, which would affect compilation tests,
8094 # but do run twice as many compilation tests as the number of
8195 # available threads
82-
83- - name : Codecov
96+
97+ - name : Produce coverage reports
8498 if : contains(matrix.extra_build_flags, 'coverage')
8599 working-directory : ${{github.workspace}}/build
86100 run : |
87101 echo "Producing coverage reports..."
88- find . -name catch_tests.cpp.gcno -exec gcov -pb {} +
102+ find . -name catch_tests.cpp.gcno -exec "${{matrix. gcov}}" -p {} +
89103
90104 echo "Finding relevant report..."
91105 cov_report=$(find . -name "*scope_guard.hpp.gcov" -exec readlink -e {} +)
106+ echo "COV_REPORT=$cov_report" >> $GITHUB_ENV
92107
93- echo "The report is ${cov_report}. Uploading to codecov..."
94- bash <(curl -s https://codecov.io/bash) -f $cov_report
108+ - name : Codecov
109+ if : contains(matrix.extra_build_flags, 'coverage')
110+ uses : codecov/codecov-action@v5
111+ with :
112+ token : ${{ secrets.CODECOV_TOKEN }}
113+ files : ${{ env.COV_REPORT }}
114+ disable_search : true
115+ flags : unittests
116+ fail_ci_if_error : ' true'
0 commit comments