-
Notifications
You must be signed in to change notification settings - Fork 137
31 lines (31 loc) · 1.15 KB
/
build.yml
File metadata and controls
31 lines (31 loc) · 1.15 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
name: Build NBD
on: [push]
jobs:
Build-NBD:
runs-on: ubuntu-latest
steps:
- name: install dependencies
run: sudo apt-get update && sudo apt-get -y install docbook-utils libglib2.0-dev libgnutls28-dev libnl-genl-3-dev autoconf-archive gcovr
- name: Check out repository
uses: actions/checkout@v4
- run: ./autogen.sh
- run: ./configure --enable-syslog
- name: Build and run tests (coverage)
run: |
make CFLAGS="--coverage -O0 -g" CXXFLAGS="--coverage -O0 -g" LDFLAGS="--coverage"
make check CFLAGS="--coverage -O0 -g" CXXFLAGS="--coverage -O0 -g" LDFLAGS="--coverage"
- name: Generate coverage reports
run: |
gcovr -r . --exclude-directories tests --print-summary --xml-pretty -o coverage.xml --html=coverage.html --html-details
- name: Submit coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.xml
format: cobertura
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage
path: |
coverage.xml
coverage.html