-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (87 loc) · 2.6 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler:
- gcc
- clang
steps:
- name: Checkout ProFTPD
run: |
git clone --depth 1 https://github.com/proftpd/proftpd.git proftpd
- name: Checkout module source code
uses: actions/checkout@v3
with:
path: proftpd-mod_proxy_protocol
- name: Whitespace check
run: |
cd proftpd-mod_proxy_protocol
if [[ -n $(git diff --check HEAD^) ]]; then
echo "You must remove whitespace before submitting a pull request"
echo ""
git diff --check HEAD^
exit 1
fi
- name: Prepare module source code
run: |
cp proftpd-mod_proxy_protocol/mod_proxy_protocol.c proftpd/contrib/
- name: Install packages
run: |
# Need to add other repos for e.g. libsodium
sudo apt-get update -qq
# for unit tests
sudo apt-get install -y check
sudo apt-get install -y libsubunit-dev
# for integration/regression test
# for test code coverage
sudo apt-get install -y lcov
sudo gem install coveralls-lcov
# for HTML validation
sudo apt-get install -y tidy
# for clang
sudo apt-get install -y clang
# for debugging
clang --version
gcc --version
- name: Prepare code coverage
run: |
lcov --directory proftpd --zerocounters
- name: Build with static modules
env:
CC: ${{ matrix.compiler }}
run: |
cd proftpd
./configure LIBS="-lm -lsubunit -lrt -pthread" --enable-devel=coverage --enable-tests --with-modules=mod_proxy_protocol
make
- name: Install with static modules
run: |
cd proftpd
sudo make install
- name: Build with shared modules
env:
CC: ${{ matrix.compiler }}
run: |
cd proftpd
make clean
./configure LIBS="-lm -lsubunit -lrt -pthread" --enable-devel --enable-dso --with-shared=mod_proxy_protocol
make
- name: Install with shared modules
run: |
cd proftpd
sudo make install
- name: Check HTML docs
run: |
cd proftpd-mod_proxy_protocol
echo "Processing mod_proxy_protocol.html"
tidy -errors -omit -q mod_proxy_protocol.html | exit 0