-
Notifications
You must be signed in to change notification settings - Fork 96
79 lines (72 loc) · 2.7 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
name: Check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master", "stable-*" ]
jobs:
build-ubuntu-focal:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build
run: |
CFLAGS="-O3" ./autogen.sh --with-openssl --prefix=/usr --with-tpm2
make -j$(nproc) distcheck
if [ $? -ne 0 ]; then
for f in tests/*.log; do echo ">>>>>>> $f <<<<<<<"; tail -n 50 $f; done
fi
build-coveralls-1:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build for coveralls.io
run: |
./autogen.sh --with-openssl --prefix=/usr --with-tpm2 --enable-test-coverage
make -j$(nproc)
make -j$(nproc) check
sudo make install
git clone https://github.com/stefanberger/swtpm.git
pushd swtpm
sudo apt -y install devscripts equivs python3-twisted expect \
libtasn1-dev socat findutils gnutls-dev gnutls-bin tss2 \
libjson-glib-dev libseccomp-dev
./autogen.sh --with-gnutls --prefix=/usr
SWTPM_TEST_EXPENSIVE=1 SWTPM_TEST_IBMTSS2=1 make -j$(nproc) check
if [ $? -eq 0 ]; then
uidgid="$(id -nu):$(id -ng)"
sudo chown -R ${uidgid} ./
cpp-coveralls -b src -e tests -e swtpm --gcov-options '\-lp'
else
for f in tests/*.log; do echo ">>>>>>> $f <<<<<<<"; tail -n 50 $f; done
fi
popd
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
build-coveralls-2:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh --with-openssl --prefix=/usr --with-tpm2 --enable-test-coverage --disable-use-openssl-functions
make -j$(nproc)
make -j$(nproc) check
sudo make install
git clone https://github.com/stefanberger/swtpm.git
pushd swtpm
sudo apt -y install devscripts equivs python3-twisted expect \
libtasn1-dev socat findutils gnutls-dev gnutls-bin tss2 \
libjson-glib-dev libseccomp-dev
./autogen.sh --with-gnutls --prefix=/usr
SWTPM_TEST_EXPENSIVE=1 SWTPM_TEST_IBMTSS2=1 make -j$(nproc) check
if [ $? -eq 0 ]; then
uidgid="$(id -nu):$(id -ng)"
sudo chown -R ${uidgid} ./
cpp-coveralls -b src -e tests -e swtpm --gcov-options '\-lp'
else
for f in tests/*.log; do echo ">>>>>>> $f <<<<<<<"; tail -n 50 $f; done
fi
popd
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}