forked from jbaldwin/liblifthttp
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 2.38 KB
/
ci-coverage.yml
File metadata and controls
64 lines (62 loc) · 2.38 KB
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
name: ci-coverage
on: [pull_request, workflow_dispatch]
jobs:
ci-coverage:
name: ci-coverage-g++
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
env:
TZ: America/New_York
DEBIAN_FRONTEND: noninteractive
services:
nginx:
image: nginx:stable
haproxy:
image: jbaldwindh/liblifthttp-automation-haproxy:0.1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
apt-get update
apt-get -y upgrade
apt install -y build-essential software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get install -y \
cmake \
git \
ninja-build \
g++ \
zlib1g-dev \
libcurl4-openssl-dev \
libuv1-dev \
curl \
lcov \
pkg-config
- name: check-haproxy
run: |
curl -v --user guest:guestpassword -x "http://haproxy:3128" "http://nginx/index.html"
- name: build-debug-g++
run: |
mkdir build-debug-g++
cd build-debug-g++
cmake \
-GNinja \
-DLIFT_CODE_COVERAGE=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
..
ninja
- name: Coverage
run: |
cd build-debug-g++
ctest --build-config Debug -VV
gcov -o ./test/CMakeFiles/liblifthttp_tests.dir/main.cpp.o ./test/liblifthttp_tests
lcov --include "*/inc/lift/*" --include "*/src/*" --exclude "test/*" -o liblifthttp_tests.lcov -c -d .
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
with: build-debug-g++/liblifthttp_tests.lcov
format: lcov