1
- name : Build and test (cmake based build)
1
+ name : Build and test
2
2
3
3
# on: push
4
4
on :
10
10
env :
11
11
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
12
12
BUILD_TYPE : Release
13
- # COVERALLS_PULL_REQUEST: ${{ github.event.number }}
13
+ COVERALLS_PULL_REQUEST : ${{ github.event.number }}
14
14
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
15
15
16
16
jobs :
@@ -45,20 +45,21 @@ jobs:
45
45
echo "$RUNNER_OS not supported"
46
46
exit 1
47
47
fi
48
- shell : bash
48
+ shell : bash
49
49
50
50
- name : Configure CMake
51
51
run : |
52
- if [ "$RUNNER_OS" == "Windows" ]; then
52
+ if [ "$RUNNER_OS" == "Windows" ]; then
53
53
cmake \
54
54
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
55
55
-DCROW_FEATURES="ssl;compression" \
56
56
-DCROW_AMALGAMATE=ON \
57
57
-B build
58
- else
58
+ else
59
59
cmake -B build
60
60
fi
61
61
shell : bash
62
+
62
63
- name : Build
63
64
# Build your program with the given configuration
64
65
run : cmake --build build --config ${{env.BUILD_TYPE}}
@@ -70,18 +71,27 @@ jobs:
70
71
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
71
72
run : ctest --output-on-failure -C ${{env.BUILD_TYPE}}
72
73
73
- # - name: Coverage Report
74
- # if: matrix.os == 'ubuntu-latest'
75
- # run: |
76
- # export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
77
- # echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \
78
- # export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \
79
- # git clone https://github.com/CrowCpp/cpp-coveralls.git && \
80
- # cd cpp-coveralls && \
81
- # pip3 install . --no-input && \
82
- # cd .. && \
83
- # coveralls --verbose --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp
84
- # shell: bash
74
+ - name : Generate coverage report
75
+ if : matrix.os == 'ubuntu-latest'
76
+ run : |
77
+ export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
78
+ echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \
79
+ export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \
80
+ git clone https://github.com/CrowCpp/cpp-coveralls.git && \
81
+ cd cpp-coveralls && \
82
+ pip3 install . --no-input && \
83
+ cd .. && \
84
+ coveralls --verbose --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp --dump coveralls.json
85
+ shell : bash
86
+
87
+
88
+ - name : Save report
89
+ uses : actions/upload-artifact@v3
90
+ if : matrix.os == 'ubuntu-latest'
91
+ with :
92
+ name : coveralls.json
93
+ path : coveralls.json
94
+
85
95
86
96
# - name: Package
87
97
# working-directory: ${{github.workspace}}/build
0 commit comments