-
Notifications
You must be signed in to change notification settings - Fork 22
81 lines (67 loc) · 2.18 KB
/
check.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
build:
name: Build
container:
image: fedora:latest
# All for gcore in core_stacktrace tests.
options: "--cap-add=SYS_PTRACE --security-opt=apparmor:unconfined --security-opt=seccomp=unconfined"
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v2
- name: Install build environment
run: |
dnf --assumeyes install dnf-plugins-core
dnf --assumeyes copr enable @abrt/devel
dnf --assumeyes install \
@c-development @development-tools @rpm-development-tools \
intltool
- name: Install build dependencies
run: ./autogen.sh sysdeps --install
- name: Configure build
run: ./autogen.sh
- name: Build
run: make --load-average=2
- name: Run tests
run: make check
- name: Upload test log
uses: actions/upload-artifact@v3
with:
name: testsuite.log
path: tests/testsuite.log
if: ${{ failure() }}
coverage:
name: Coverage
container:
image: fedora:latest
# All for gcore in core_stacktrace tests.
options: "--cap-add=SYS_PTRACE --security-opt=apparmor:unconfined --security-opt=seccomp=unconfined"
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v2
- name: Install build environment
run: |
dnf --assumeyes install dnf-plugins-core
dnf --assumeyes copr enable @abrt/devel
dnf --assumeyes install \
@c-development @development-tools @rpm-development-tools \
intltool python3-codecov
- name: Install build dependencies
run: ./autogen.sh sysdeps --install
- name: Configure build
run: ./autogen.sh
- name: Build
run: make --load-average=2 CFLAGS+='--coverage -O0'
- name: Run tests
run: make check
- name: Analyse code coverage
run: cd lib && gcov -pbufc -o .libs *.lo
- name: Upload coverage report
run: codecov -X gcov pycov --gcov-glob 'python/*' 'tests/*'