-
-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (31 loc) · 1.57 KB
/
coverage.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
name: Coverage
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "Set Path"
run: echo "/opt/gcc-11.3/bin" >> $GITHUB_PATH
- name: "Configure CMake"
run: cmake -GNinja -B ${{github.workspace}}/build-coverage -DCMAKE_BUILD_TYPE=Debug -DICHOR_SERIALIZATION_FRAMEWORK=RAPIDJSON -DICHOR_USE_BOOST_BEAST=ON -DICHOR_BUILD_COVERAGE=ON -DICHOR_USE_SANITIZERS=OFF -DICHOR_BUILD_BENCHMARKS=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build-coverage --config Debug
- name: Test
working-directory: ${{github.workspace}}/build-coverage
run: ctest --output-on-failure --progress -C ${{env.BUILD_TYPE}}
- name: Examples
working-directory: ${{github.workspace}}/bin
run: ../bin/ichor_http_example && ../bin/ichor_multithreaded_example && ../bin/ichor_optional_dependency_example && ../bin/ichor_serializer_example && ../bin/ichor_tcp_example && ../bin/ichor_timer_example && ../bin/ichor_tracker_example && ../bin/ichor_websocket_example && ../bin/ichor_yielding_timer_example
- name: coverage
run: lcov --directory . --capture --output-file coverage.info && lcov --remove coverage.info '/usr/*' '/opt/*' '${{github.workspace}}/external/*' --output-file coverage.info && lcov --list coverage.info && codecov -f coverage.info