-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yml
94 lines (87 loc) · 2.9 KB
/
config.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
version: 2.1
orbs:
codecov: codecov/[email protected]
coverage-reporter: codacy/[email protected]
commands:
full_checkout:
steps:
- checkout
- run:
name: "Pull submodules"
command: |
git submodule sync
git submodule update --init
build_and_test:
parameters:
dir:
default: build
type: string
steps:
- run:
name: "Build the binary"
command: cmake --build <<parameters.dir>> -j 2
- run:
name: "Run the tests"
command: cd <<parameters.dir>> && ctest -j2 -V
jobs:
build_gcc_debug:
machine:
image: ubuntu-2404:current
steps:
- run:
name: "Install required packages"
command: sudo apt update && sudo apt install -y git cmake ninja-build lcov gcc g++
- full_checkout
- run:
name: "Configure GCC debug build"
command: cmake -GNinja -H. -B./build -DINCH_UNIT_TESTS=ON -DINCH_CODE_COVERAGE=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Debug
- build_and_test:
dir: build
- run:
name: "Generate code coverage metrics"
command: |
cd build
lcov --directory . --capture --gcov-tool /usr/bin/gcov --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/tests/*' '*/external/*' --output-file coverage.info
lcov --list coverage.info
- codecov/upload:
cli_args: '-v'
file: /home/circleci/project/build/coverage.info
- coverage-reporter/send_report:
coverage-reports: './build/coverage.info'
project-token: $CODACY_PROJECT_TOKEN
build_gcc_release:
machine:
image: ubuntu-2404:current
steps:
- run: sudo apt update && sudo apt install -y git cmake ninja-build gcc g++
- full_checkout
- run: cmake -GNinja -H. -B./build -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Release
- build_and_test:
dir: build
build_clang_debug:
machine:
image: ubuntu-2404:current
steps:
- run: sudo apt update && sudo apt install -y git cmake ninja-build gcc g++ libstdc++-14-dev clang
- full_checkout
- run: cmake -GNinja -H. -B./build -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Debug
- build_and_test:
dir: build
build_clang_release:
machine:
image: ubuntu-2404:current
steps:
- run: sudo apt update && sudo apt install -y git cmake ninja-build gcc g++ libstdc++-14-dev clang
- full_checkout
- run: cmake -GNinja -H. -B./build -DINCH_UNIT_TESTS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Release
- build_and_test:
dir: build
workflows:
version: 2.1
build_and_test:
jobs:
- build_gcc_debug
- build_gcc_release
- build_clang_debug
- build_clang_release