-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (101 loc) · 3.34 KB
/
test-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Ubuntu
on:
push:
branches: [ main, 'v[0-9]+.x' ]
paths-ignore: [ 'doc/**', '**.md' ]
pull_request:
paths-ignore: [ 'doc/**', '**.md' ]
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: clang++ C++20
os: ubuntu-latest
cxx_compiler: clang++
cxx_standard: 20
cmake_options: ""
- name: clang++ C++17 with sanitizer
os: ubuntu-latest
cxx_compiler: clang++
cxx_standard: 17
cmake_options: "-DUPA_TEST_SANITIZER=ON"
- name: clang++ C++17 with valgrind
os: ubuntu-latest
cxx_compiler: clang++
cxx_standard: 17
cmake_options: "-DUPA_TEST_VALGRIND=ON"
install: "valgrind"
- name: g++-14 C++23
os: ubuntu-24.04
cxx_compiler: g++-14
cxx_standard: 23
cmake_options: ""
- name: g++-12 C++20
os: ubuntu-24.04
cxx_compiler: g++-12
cxx_standard: 20
cmake_options: ""
- name: g++ C++17 Qt
os: ubuntu-24.04
cxx_compiler: g++
cxx_standard: 17
cmake_options: "-DUPA_TEST_URL_FOR_QT=ON"
install: "qt6-base-dev"
- name: g++ C++17 Codecov
os: ubuntu-latest
cxx_compiler: g++
cxx_standard: 17
cmake_options: "-DUPA_TEST_COVERAGE=ON"
install: "lcov"
after_test: |
# See: https://github.com/codecov/example-cpp11-cmake
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/deps/*' '*/test/*' --output-file coverage.info
lcov --list coverage.info
codecov: true
- name: g++ C++17 amalgamated
os: ubuntu-latest
cxx_compiler: g++
cxx_standard: 17
cmake_options: "-DUPA_AMALGAMATED=ON -DUPA_BUILD_EXAMPLES=ON"
before_cmake: tools/amalgamate.sh
- name: g++-9 C++14
os: ubuntu-22.04
cxx_compiler: g++-9
cxx_standard: 14
cmake_options: "-DUPA_BUILD_EXAMPLES=ON"
- name: g++-9 C++11
os: ubuntu-22.04
cxx_compiler: g++-9
cxx_standard: 11
cmake_options: "-DUPA_BUILD_EXAMPLES=ON"
steps:
- uses: actions/checkout@v4
- name: apt-get install
if: ${{ matrix.install }}
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.install }}
- name: get dependencies
run: ./init.sh
- name: before cmake
if: ${{ matrix.before_cmake }}
run: ${{ matrix.before_cmake }}
- name: cmake
run: cmake -S . -B build -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} ${{ matrix.cmake_options }}
- name: build
run: cmake --build build --config Release
- name: test
run: cd build ; ctest -C Release -V
- name: after test
if: ${{ matrix.after_test }}
run: ${{ matrix.after_test }}
- uses: codecov/codecov-action@v4
if: ${{ matrix.codecov }}
with:
files: ./coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false