-
Notifications
You must be signed in to change notification settings - Fork 11
128 lines (115 loc) · 4.07 KB
/
linux.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: "Linux"
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
label: [ "" ]
cxx: [ g++-10, clang++-10 ]
build_type: [ Debug, Release ]
std: [ 17 ]
include:
- cxx: g++-7
build_type: Debug
std: 17
install: sudo apt-get install g++-7
- cxx: g++-11
build_type: Debug
std: 20
install: sudo apt-get install g++-11
- cxx: clang++-6.0
build_type: Debug
std: 17
install: sudo apt-get install clang-6.0
- cxx: clang++-7
build_type: Debug
std: 17
cxxflags: -stdlib=libc++
install: sudo apt-get install clang-7 libc++-7-dev libc++abi-7-dev
- cxx: clang++-7
build_type: Release
std: 17
install: sudo apt-get install clang-7
- cxx: clang++-10
cxxflags: -stdlib=libc++
install: sudo apt-get install clang-10 libc++-10-dev libc++abi-10-dev
- cxx: clang++-11
build_type: Debug
std: 20
cxxflags: -stdlib=libc++
install: sudo apt-get install clang-11 libc++-11-dev libc++abi-11-dev
- cxx: clang++-11
build_type: Release
std: 20
install: sudo apt-get install clang-11
- label: sanitizers
cxx: clang++-12
build_type: Debug
std: 20
cxxflags: -O1 -g -fsanitize=address,undefined,leak,integer -fno-omit-frame-pointer -fno-optimize-sibling-calls
- label: valgrind-memcheck
cxx: g++-10
build_type: Debug
std: 17
cxxflags: -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
install: sudo apt-get install -y valgrind
memcheck: true
- label: coverage
cxx: g++-10
build_type: Debug
std: 17
cxxflags: -g -O0 --coverage -fno-inline
install: sudo apt-get install -y lcov
coverage: true
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
run: |
sudo apt-get update
${{matrix.install}}
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake --warn-uninitialized \
-D CMAKE_BUILD_TYPE=${{matrix.build_type}} \
-D CMAKE_CXX_STANDARD=${{matrix.std}} \
-D UREACT_PEDANTIC:BOOL=y \
-D UREACT_WERROR:BOOL=y \
-D UREACT_СTEST:BOOL=y \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}} -- -j `nproc`
- name: Test
if: ${{ !matrix.memcheck }}
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure
- name: TestMemcheck
if: ${{ matrix.memcheck }}
working-directory: ${{runner.workspace}}/build
run: |
if ! ctest -C ${{matrix.build_type}} --output-on-failure \
-T memcheck \
--overwrite MemoryCheckCommandOptions="--leak-check=full --track-origins=yes --error-exitcode=100" \
; then
find Testing/Temporary -name "MemoryChecker.*.log" -exec cat {} +
exit 1
fi
- name: Compute Coverage
if: ${{ matrix.coverage }}
run: |
mkdir -p coverage
lcov -c -d ${{runner.workspace}}/build -o coverage/lcov.info --include "*include/ureact*"
- name: Upload coverage reports to Codecov
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
fail_ci_if_error: true