@@ -9,48 +9,78 @@ defaults:
99 shell : bash
1010
1111jobs :
12- coverage :
13- runs-on : ubuntu-20.04
12+ build :
13+ name : ${{ matrix.config.name }}
14+ runs-on : ${{ matrix.config.os }}
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ config :
19+ - {
20+ name : " Ubuntu 20.04 GCC 9" ,
21+ os : ubuntu-20.04,
22+ build_type : Debug,
23+ cc : " gcc-9" , cxx: "g++-9"
24+ }
25+ - {
26+ name : " Ubuntu 20.04 GCC 10" ,
27+ os : ubuntu-20.04,
28+ build_type : Debug,
29+ cc : " gcc-10" , cxx: "g++-10"
30+ }
31+ - {
32+ name : " Ubuntu 22.04 GCC 11" ,
33+ os : ubuntu-22.04,
34+ build_type : Debug,
35+ cc : " gcc-11" , cxx: "g++-11"
36+ }
37+ - {
38+ name : " Ubuntu 22.04 GCC 12 C++11" ,
39+ os : ubuntu-22.04,
40+ build_type : Debug,
41+ cc : " gcc-12" , cxx: "g++-12",
42+ cxx_standard : 11
43+ }
44+ - {
45+ name : " Ubuntu 22.04 GCC 12 C++14" ,
46+ os : ubuntu-22.04,
47+ build_type : Debug,
48+ cc : " gcc-12" , cxx: "g++-12",
49+ cxx_standard : 14
50+ }
51+ - {
52+ name : " Ubuntu 22.04 GCC 12 C++17" ,
53+ os : ubuntu-22.04,
54+ build_type : Debug,
55+ cc : " gcc-12" , cxx: "g++-12",
56+ cxx_standard : 17
57+ }
58+ - {
59+ name : " Ubuntu 22.04 GCC 12 C++20" ,
60+ os : ubuntu-22.04,
61+ build_type : Debug,
62+ cc : " gcc-12" , cxx: "g++-12",
63+ cxx_standard : 20
64+ }
65+ - {
66+ name : " Ubuntu 22.04 GCC with sanitizers" ,
67+ os : ubuntu-22.04,
68+ build_type : Debug,
69+ cc : " gcc" , cxx: "g++",
70+ enable_sanitizers_in_tests : ON
71+ }
1472 steps :
15- - name : Install LCOV
16- run : sudo apt install -y lcov
17- - uses : actions/checkout@v2
73+ - uses : actions/checkout@v3
1874 - name : Build project
75+ env :
76+ CC : ${{ matrix.config.cc }}
77+ CXX : ${{ matrix.config.cxx }}
1978 run : |
20- CC=gcc CXX=g++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
21- cmake --build build -j
22- - name : Run tests
23- run : |
24- build/tests/FakeIt_tests
25- - name : Generate report
26- run : |
27- cd build/tests/CMakeFiles/FakeIt_tests.dir
28- gcov *.o
29- lcov --directory . -c -o report.info
30- lcov --remove report.info '/usr/*' '*/tests/*' -o report_filtered.info
31- - name : Upload report
32- uses : coverallsapp/github-action@master
33- with :
34- github-token : ${{ secrets.GITHUB_TOKEN }}
35- path-to-lcov : ./build/tests/CMakeFiles/FakeIt_tests.dir/report_filtered.info
36- gcc-ubuntu-20-04 :
37- runs-on : ubuntu-20.04
38- steps :
39- - uses : actions/checkout@v2
40- - name : Build project
41- run : |
42- CC=gcc CXX=g++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
43- cmake --build build -j
44- - name : Run tests
45- run : |
46- build/tests/FakeIt_tests
47- gcc-ubuntu-18-04 :
48- runs-on : ubuntu-18.04
49- steps :
50- - uses : actions/checkout@v2
51- - name : Build project
52- run : |
53- CC=gcc CXX=g++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
79+ cmake -S . -B build \
80+ -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
81+ -DENABLE_TESTING=ON \
82+ -DOVERRIDE_CXX_STANDARD_FOR_TESTS=${{ matrix.config.cxx_standard }} \
83+ -DENABLE_SANITIZERS_IN_TESTS=${{ matrix.config.enable_sanitizers_in_tests }}
5484 cmake --build build -j
5585 - name : Run tests
5686 run : |
0 commit comments