-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (57 loc) · 1.9 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
name: basic checks
on: [pull_request, push]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: verify debian changelog
run: |
VERSION=$(awk '/static const char version/ { gsub(/[\";]/, "", $6); print $6; exit }' ttyrec.c)
if ! head -n1 debian/changelog | grep -F "ovh-ttyrec ($VERSION) master"; then
echo "inconsistency between version ($VERSION) and debian changelog:"
head -n1 debian/changelog
exit 1
fi
- name: install prerequisites
run: sudo apt-get install -y uncrustify make git debhelper
- name: check style
run: |
./configure
make style
git diff
if ! git diff --quiet; then
echo "Please make style."
exit 1
fi
- name: compile with zstd autodetection (none)
run: |
make clean && ./configure && make -j$(nproc) && ./ttyrec -V
if ./ttyrec -V | grep -qF 'zstd'; then
exit 1
fi
- name: compile with zstd autodetection (static)
run: |
sudo apt-get install -y libzstd-dev
make clean && ./configure && make -j$(nproc) && ./ttyrec -V
./ttyrec -V | grep -qF 'zstd[static]'
- name: compile with shared libzstd
run: |
make clean && NO_STATIC_ZSTD=1 ./configure && make -j$(nproc) && ./ttyrec -V
if ./ttyrec -V | grep -qF 'zstd[static]'; then
exit 1
fi
./ttyrec -V | grep -qF 'zstd'
- name: compile without zstd support
run: |
make clean && NO_ZSTD=1 ./configure && make -j$(nproc) && ./ttyrec -V
if ./ttyrec -V | grep -qF 'zstd'; then
exit 1
fi
- name: build and test debian package
run: |
make clean && ./configure && make -j$(nproc) && ./ttyrec -V
make deb
ls -l ..
sudo dpkg -i ../ovh-ttyrec_*.deb
dpkg -L ovh-ttyrec