forked from SFTtech/openage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
96 lines (82 loc) · 3.38 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
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
# travis ci config script for openage
language: cpp
compiler:
- clang
- gcc
env:
- BUILDMODE=release DOINSTALL=1
- STATICCHECKER=scan-build
- SANITIZER=yes LSAN_OPTIONS=suppressions=etc/lsan.supp ASAN_OPTIONS=check_initialization_order=1
- SANITIZER=mem # TODO this needs a custom-built libstd++
- SANITIZER=thread SANITIZER_FATAL=1
matrix:
allow_failures:
- env: SANITIZER=mem
- compiler: gcc
env: SANITIZER=thread SANITIZER_FATAL=1
exclude:
- compiler: gcc # gcc can't do that yet
env: SANITIZER=mem
- compiler: gcc # no need to run the static analysis twice
env: STATICCHECKER=scan-build
before_install:
- uname -a
- lsb_release -a
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test # newer toolchain
- sudo apt-add-repository --yes ppa:zoogie/sdl2-snapshots # libsdl2
- sudo apt-add-repository --yes ppa:sfttech/random # cmake, opus, epoxy, python3-* (3.4)
- sudo apt-add-repository --yes ppa:mapnik/nightly-trunk # libharfbuzz
- sudo apt-get update -qq
install:
- export CVERSION="4.9"
- export PYVERSION="3.4"
- sudo apt-get install -qq g++-${CVERSION} # also needed for newer stdlib
- if [ "$CXX" = "g++" ]; then export CXX="g++-${CVERSION}" CC="gcc-${CVERSION}"; fi
- export CC=`which $CC`
- export CXX=`which $CXX`
- sudo apt-get remove -qq cmake # remove the museum edition
- sudo apt-get install -qq python3 python3-dev libepoxy-dev libfreetype6-dev libfontconfig1-dev libharfbuzz-dev libsdl2-dev libsdl2-image-dev libopusfile-dev opus-tools cmake python3-numpy cython3 python3-pil python3-pygments clang
# we install those from PyPi on purpose, because we always want the most recent linters available.
# all other python packages should be properly backported to precise, and installed from the PPA.
- wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
- sudo -H python3 /tmp/get-pip.py
- sudo -H python3 -m pip install pep8
- sudo -H python3 -m pip install pylint
# this is required because software museum scan-build doesn't support --use-cc/--use-c++
- sudo ln -sf "$CC" /usr/bin/gcc
- sudo ln -sf "$CXX" /usr/bin/g++
before_script:
- git pull --unshallow # the full git history is required for 'make checkfull'
- cmake --version
- python3 --version
- python3 -m cython --version
- python3 -c 'import pygments; print(pygments.__version__)'
- python3 -c 'import PIL; print(PIL.VERSION)'
- python3 -c 'import numpy; print(numpy.version.version)'
- python3 -m pep8 --version
- python3 -m pylint --version
script:
- CONTINUE=1
- if [[ $CONTINUE -eq 1 ]]; then $STATICCHECKER ./configure --mode=debug || CONTINUE=0; fi
- if [[ $CONTINUE -eq 1 ]]; then $STATICCHECKER make build tests || CONTINUE=0; fi
- if [[ $CONTINUE -eq 1 ]]; then make checkall || CONTINUE=0; fi
- if [[ $CONTINUE -eq 1 && $DOINSTALL -gt 0 ]]; then make install DESTDIR=/tmp/destdir || CONTINUE=0; fi
- if [[ $CONTINUE -ne 1 ]]; then return 1; fi
after_script:
- echo test build exited
notifications:
email:
on_success: change
on_failure: always
irc:
channels:
- "chat.freenode.net#sfttech"
template:
- "%{repository_slug}/%{branch} (%{commit} - %{author}): %{message}"
- "took %{duration}, moar info: %{build_url}"
use_notice: true
skip_join: true
cache:
directories:
- .cicache
apt: true