-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
57 lines (56 loc) · 2.15 KB
/
azure-pipelines.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
trigger:
- master
jobs:
- job: Linux
displayName: 'Linux'
pool: Ubuntu-1804
strategy:
matrix:
gccdefault_coverage:
CMAKE_VARIANT: Debug
CXXFLAGS: '-Wall -Wextra -Wconversion -pedantic -fprofile-arcs -fkeep-inline-functions --coverage'
CXX: g++
CC: gcc
SKIP_COVERAGE: 'false'
gcc7debug:
CMAKE_VARIANT: Debug
CXX: g++-7
CC: gcc-7
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic
gcc8release:
CMAKE_VARIANT: Release
CXX: g++-8
CC: gcc-8
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic
gcc8asan:
CMAKE_VARIANT: Debug
CXX: g++-8
CC: gcc-8
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic -fsanitize=address,undefined
clangdebug:
CMAKE_VARIANT: Debug
CXX: clang++
CC: clang
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic
clangasan:
CMAKE_VARIANT: Debug
CXX: clang++
CC: clang
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic -fsanitize=address,undefined -pthread
clangrelease:
CMAKE_VARIANT: Release
CXX: clang++
CC: clang
CXXFLAGS: -Wall -Wextra -Wconversion -pedantic
steps:
- script: sudo modprobe vcan && sudo tools/create_vcans.sh vcan0 vcan1 || echo "May fail if they exist already"
displayName: 'Create virtual CAN interfaces'
- script: cmake -GNinja -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE="~/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-header-filter=$(pwd)/include/\*" -DCMAKE_BUILD_TYPE=$CMAKE_VARIANT -DCANARY_BUILD_EXAMPLES=ON
displayName: 'Configure'
- script: cmake --build build
displayName: Build
- script: cd build && ctest --output-on-failure
displayName: 'Run tests'
- script: ./tools/coverage.sh && curl -s https://codecov.io/bash -o codecov && bash ./codecov -X gcov -f build/coverage.info -t $(CODECOV_TOKEN)
displayName: 'Collect coverage'
condition: and(succeeded(), eq(variables['SKIP_COVERAGE'], 'false'))