forked from ueno/libkkc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (46 loc) · 2.41 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
44
45
46
47
48
49
50
51
52
53
54
55
sudo: required
language: c
env:
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 --enable-docs" DOCS=yes EXTRA_PKGS="gtk-doc valadoc valadoc-devel"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 --enable-code-coverage PYTHON=python3" COVERAGE=yes EXTRA_PKGS="python3-marisa python3-pip"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'" EXTRA_PKGS="libasan"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'" EXTRA_PKGS="libubsan"
services:
- docker
before_install:
- docker pull fedora
- export CONTAINER=$(docker run -d --cap-add=SYS_PTRACE fedora sleep 1800)
- docker exec $CONTAINER dnf -y install 'dnf-command(builddep)'
- docker exec $CONTAINER dnf -y builddep libkkc
- docker exec $CONTAINER dnf -y install libtool make which gcc-c++ vala vala-devel git $EXTRA_PKGS
- docker exec $CONTAINER useradd user
install:
- docker cp . $CONTAINER:/srcdir
- docker exec $CONTAINER chown -R user /srcdir
script:
- docker exec $CONTAINER su - user sh -c "cd /srcdir && NOCONFIGURE=1 ./autogen.sh"
- docker exec $CONTAINER su - user sh -c "cd /srcdir && ./configure $BUILD_OPTS"
- docker exec $CONTAINER su - user sh -c "cd /srcdir && make V=1 && touch po/libkkc.pot && make check V=1"
after_failure:
- docker exec $CONTAINER su - user sh -c "cd /srcdir && cat tests/test-suite.log"
after_success:
- |
if test x"$COVERAGE" = xyes; then
docker exec $CONTAINER pip install cpp-coveralls
docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" $CONTAINER sh -c "cd /srcdir && coveralls --exclude tools --exclude tests --gcov-options '\-lp'"
fi
- |
if test x"$DOCS" = xyes; then
mkdir dist
docker cp $CONTAINER:/srcdir/docs/libkkc/libkkc dist/vala
docker cp $CONTAINER:/srcdir/docs/gtk-doc/libkkc/html dist/c
fi
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: dist
on:
branch: master
condition: $DOCS = yes