-
Notifications
You must be signed in to change notification settings - Fork 45
51 lines (39 loc) · 1.53 KB
/
build.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
name: Build
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Prerequisites
run: sudo apt update -y && sudo apt install -y libclang-11-dev kcov
- name: Configure
run: cmake -B ${{github.workspace}}/build -S ${{github.workspace}}/bssl-compat -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: cmake --build ${{github.workspace}}/build --config RelWithDebInfo
- name: Test
env:
OPENSSL_CONF: ${{github.workspace}}/bssl-compat/source/test/openssl.cnf
run: ctest --test-dir ${{github.workspace}}/build --output-junit ${{github.workspace}}/build/results.xml
- name: Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "${{github.workspace}}/build/results.xml"
- name: Test Coverage
env:
OPENSSL_CONF: ${{github.workspace}}/bssl-compat/source/test/openssl.cnf
LD_LIBRARY_PATH: ${{github.workspace}}/build/openssl/install/lib/:${{env.LD_LIBRARY_PATH}}
run: kcov --exclude-pattern=/usr/include/,/_deps/,_test.,/test_,_test_ ${{github.workspace}}/build/kcov ${{github.workspace}}/build/utests-bssl-compat --gtest_output=xml:${{github.workspace}}/build/results.xml
- name: Coverage Results
uses: actions/upload-artifact@v3
with:
name: coverage-results
path: ${{github.workspace}}/build/kcov/**