forked from clearlinux/swupd-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (41 loc) · 2.48 KB
/
.travis.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
sudo: required
dist: xenial
language: c
# Pre-install missing build dependencies:
# - libcheck 0.9.10 is slightly too old, since 0.9.12 adds TAP support
# - bsdiff 1.* is the Clear Linux OS fork
# - libcurl 7.35.0 is too old. Installing a newer version.
# - the Swupd_Root.pem cert must be installed out-of-tree to run the test suite with signature verification enabled
# - python3-docutils for the rst2man script
install:
- wget https://github.com/libcheck/check/releases/download/0.11.0/check-0.11.0.tar.gz
- tar -xvf check-0.11.0.tar.gz
- pushd check-0.11.0 && ./configure --prefix=/usr && make -j48 && sudo make install && popd
- wget https://github.com/clearlinux/bsdiff/releases/download/v1.0.2/bsdiff-1.0.2.tar.xz
- tar -xvf bsdiff-1.0.2.tar.xz
- pushd bsdiff-1.0.2 && ./configure --prefix=/usr --disable-tests && make -j48 && sudo make install && popd
- wget https://curl.haxx.se/download/curl-7.51.0.tar.gz
- tar -xvf curl-7.51.0.tar.gz
- pushd curl-7.51.0 && ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu && make -j48 && sudo make install && popd
- wget https://download.clearlinux.org/releases/13010/clear/Swupd_Root.pem
- sudo install -D -m0644 Swupd_Root.pem /usr/share/clear/update-ca/Swupd_Root.pem
- wget https://github.com/libarchive/libarchive/archive/v3.3.1.tar.gz
- tar -xvf v3.3.1.tar.gz
- pushd libarchive-3.3.1 && autoreconf -fi && ./configure --prefix=/usr && make -j48 && sudo make install && popd
- sudo apt-get install python3-docutils
- sudo apt-get install realpath
- sudo apt-get install clang-format-6.0
- sudo apt-get install shellcheck
- sudo ln -s /usr/share/docutils/scripts/python3/rst2man /usr/bin/rst2man.py
# Ubuntu's default umask is 0002, but this break's swupd hash calculations.
script:
- sudo find test/functional -exec chmod g-w {} \;
- autoreconf --verbose --warnings=none --install --force &&
./configure CFLAGS="$CFLAGS -fsanitize=address -Werror" --prefix=/usr --with-fallback-capaths=$TRAVIS_BUILD_DIR/swupd_test_certificates --enable-signature-verification --with-systemdsystemunitdir=/usr/lib/systemd/system &&
make -j48 &&
sudo sh -c 'umask 0022 && make -j48 check' &&
sudo sh -c 'umask 0022 && make install' &&
sudo sh -c 'umask 0022 && make install-check' &&
make compliant &&
make shellcheck
after_failure: cat test-suite.log