-
Notifications
You must be signed in to change notification settings - Fork 12
140 lines (121 loc) · 3.05 KB
/
quick.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
name: Quick Tests
# yamllint disable-line rule:truthy
on:
push:
pull_request:
workflow_dispatch:
jobs:
smoketest:
name: Smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Run minimal test set
run: |
./autogen.sh
./configure
make -j4 all
make test
- if: ${{ failure() }}
name: Upload tests output
uses: actions/upload-artifact@v4
with:
name: tests-smoketest
path: tests
smoketest_all_opts:
name: Smoke test With all options turned on
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Install libraries needed for all options turned on
run: |
sudo apt-get install -y \
libminiupnpc-dev \
libnatpmp-dev \
libpcap-dev \
libcap-dev \
libzstd-dev
- name: Run minimal test set
run: |
./autogen.sh
./configure \
--enable-pthread \
--enable-miniupnp \
--enable-natpmp \
--enable-cap \
--enable-pcap \
--with-openssl \
--with-zstd \
CFLAGS="-O3 -fprofile-arcs -ftest-coverage"
LDFLAGS="--coverage"
make build-dep
make -j4 all
make test
- name: Generate coverage reports
run: |
make gcov
make cover COVERAGEDIR=coverage/ubuntu-22.04
shell: bash
- name: Upload gcovr report artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
- name: Upload data to codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# TODO: Since windows has a bunch of build differences, it would be good to
# have a smoketest for it, but it is about 5 times slower than the other
# quick tests...
#
# smoketest_windows:
# name: Smoke test Windows
# runs-on: windows-latest
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Fix Checkout
# run: |
# git fetch --force --tags
#
# - name: Run minimal test set
# run: |
# ./scripts/hack_fakeautoconf.sh
# make
# make test.units
# shell: bash
lint:
name: Code syntax
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Make the makefiles
run: |
./autogen.sh
./configure
- name: Install essential
run: |
sudo apt update
make build-dep
- name: Run the lint tools
run: |
make lint