1
1
name : Coverage
2
2
3
- on :
4
- push :
5
- branches :
6
- - develop
3
+ on : push
4
+ # push:
5
+ # branches:
6
+ # - develop
7
+
7
8
jobs :
8
9
posix :
9
10
defaults :
@@ -18,30 +19,32 @@ jobs:
18
19
steps :
19
20
- name : Checkout
20
21
uses : actions/checkout@v3
21
- - name : Install CMake
22
- run : sudo apt-get -y install cmake
23
- - name : Install lcov
24
- run : sudo apt-get -y install lcov
25
- - name : Install compiler
26
- run : sudo apt-get -y install g++-11
27
- - name : Install Redis
28
- run : sudo apt-get -y install redis-server
29
- - name : Install boost
30
-
31
- id : install-boost
32
- with :
33
- boost_version : 1.81.0
34
- platform_version : 22.04
22
+
23
+ - name : Install dependencies
24
+ run : sudo apt-get --no-install-recommends -y install cmake lcov g++-11 redis-server
25
+
26
+ - name : Setup Boost
27
+ run : ./tools/ci.py setup-boost --source-dir=$(pwd)
28
+
29
+ - name : Build Boost
30
+ run : ./tools/ci.py build-b2-distro --toolset=gcc-11
31
+
32
+ # Having our library there confuses the coverage reports
33
+ - name : Remove Boost.Redis from the b2 distro
34
+ run : rm -rf ~/boost-b2-distro/include/boost/redis
35
+
35
36
- name : Run CMake
36
- run : |
37
- BOOST_ROOT=${{steps.install-boost.outputs.BOOST_ROOT}} cmake --preset coverage .
37
+ run : cmake -DCMAKE_PREFIX_PATH=$HOME/boost-b2-distro --preset coverage .
38
+
38
39
- name : Build
39
40
run : cmake --build --preset coverage
41
+
40
42
- name : Test
41
43
run : ctest --preset coverage
44
+
42
45
- name : Make the coverage file
43
46
run : cmake --build --preset coverage --target coverage
47
+
44
48
- name : Upload to codecov
45
49
run : |
46
- bash <(curl -s https://codecov.io/bash) -f ./build/coverage/coverage.info || echo "Codecov did not collect coverage reports"
47
-
50
+ bash <(curl -s https://codecov.io/bash) -f ./build/coverage/coverage.info
0 commit comments