-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (45 loc) · 1.74 KB
/
ccpp.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
name: C CI
on: [push]
jobs:
build:
name: build-${{ matrix.config.cc }}-${{ matrix.config.host }}
runs-on: ${{ matrix.config.host }}
strategy:
fail-fast: true
matrix:
config:
- {
cc: "gcc",
host: "ubuntu-latest"
}
- {
cc: "clang",
host: "ubuntu-latest"
}
#- {
#cc: "clang",
#host: "macos-latest"
#}
steps:
- name: checkout
uses: actions/checkout@v4
- name: install deps
run: if [ "${OS}" = "macos-latest" ]; then brew install libowfat; echo 'list(APPEND CONF_OPTIONS "-DOWFAT_INCLUDE_DIR=/usr/local/Cellar/libowfat/0.32/include/libowfat/libowfat" "-DCMAKE_PREFIX_PATH=/usr/local/Cellar/libowfat/0.32" "-DOpenSSL_ROOT=/usr/local/Cellar/[email protected]/1.1.1h")' > my_qsmtp.cmake; else sudo apt-get install libowfat-dev libssl-dev openssl valgrind libbsd-dev lcov; fi
env:
OS: ${{ matrix.config.host }}
- name: configure
run: echo -e 'set(QSMTP_BUILD_DIR "/tmp/Qs-build")\nset(dashboard_model "Continuous")\nlist(APPEND CONF_OPTIONS "-DIPV4ONLY=On")\nset(CTEST_SITE "github.com")\ninclude("$ENV{GITHUB_WORKSPACE}/ctest_qsmtp.cmake")' >> my_qsmtp.cmake
- name: run tests
run: ctest -V -D "CTEST_BUILD_NAME=GitHub CI ${CC}" -S my_qsmtp.cmake -j 3
env:
CC: ${{ matrix.config.cc }}
- name: generate coverage
if: matrix.config.cc == 'gcc'
run: |
lcov --directory /tmp/Qs-build --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
- name: upload covecov info
if: matrix.config.cc == 'gcc'
uses: codecov/codecov-action@v2
with:
files: coverage.info