forked from xoreos/xoreos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (103 loc) · 3.71 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
dist: bionic
osx_image: xcode11.4
arch:
- amd64
- arm64
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "oYIV1EmOvP2ruIxyCTPuGuqUsUzTxxu3P+IdlQZgV6aXaBxtFCuoQaLVMOlnx8xSI2V4mb5I/wK5fAtgUAomzDHQmaBNSbJc3xBTy2xgckup60ehKtFqf+ifm+AYcLQQgLtMUDmLNNcJIKUGPZ8GYwjNfWKt3VGuLHV+UFiRuQI="
- coverity_scan_run_condition='\( "$CC" = "gcc" \) -a \( $USECMAKE -eq 1 \) -a \( "$TRAVIS_OS_NAME" = "linux" \) -a \( "$(uname -i)" = "x86_64" \)'
- coverity_scan_script_test_mode=false
# Various conditions where the Travis CI scripts should behave differently
- is_coverity_branch='\( "$TRAVIS_BRANCH" = "coverity_scan" \)'
- is_valid_config='\( ! '"$is_coverity_branch"' \) -o \( '"$coverity_scan_run_condition"' \)'
- is_valid_osx='\( "$TRAVIS_OS_NAME" = "osx" \) -a \( '"$is_valid_config"' \)'
- is_valid_linux='\( "$TRAVIS_OS_NAME" = "linux" \) -a \( '"$is_valid_config"' \)'
- is_amd64='\( "$(uname -i)" = "x86_64" \)'
- is_arm64='\( "$(uname -i)" = "aarch64" \)'
- is_notcoverity_autot='\( ! '"$is_coverity_branch"' \) -a \( $USECMAKE -eq 0 \)'
- is_notcoverity_cmake='\( ! '"$is_coverity_branch"' \) -a \( $USECMAKE -eq 1 \)'
jobs:
# Let's test both our autoconf and CMake build systems
- USECMAKE=0
- USECMAKE=1
jobs:
exclude:
# On Linux, we only need to test one compiler with both autools and CMake.
# This gives us three builds on Linux: autotools+gcc, autotools+clang, CMake+gcc
- compiler: clang
os: linux
env: USECMAKE=1
# On macOS, gcc is deprecated, so we only build with clang there.
# This gives us two builds on macOS: autotools+clang, CMake+clang
- compiler: gcc
os: osx
# Do not compile for arm64 on osx yet.
- arch: arm64
os: osx
script:
# autotools build system: ./autogen.sh && ./configure && make && make check
- if eval [ $is_notcoverity_autot ]; then ./autogen.sh; fi
- if eval [ $is_notcoverity_autot ]; then ./configure || (cat config.log; exit 1); fi
- if eval [ $is_notcoverity_autot ]; then make -j4; fi
- if eval [ $is_notcoverity_autot ]; then echo "" > test-suite.log; make -j4 check || (cat test-suite.log; exit 1); fi
# CMake build system: cmake -G Ninja . && cmake --build . && cmake --build . --target check
- if eval [ $is_notcoverity_cmake ]; then cmake -G Ninja .; fi
- if eval [ $is_notcoverity_cmake ]; then cmake --build .; fi
- if eval [ $is_notcoverity_cmake ]; then cmake --build . --target check; fi
addons:
apt:
packages:
- ninja-build
- zlib1g-dev
- liblzma-dev
- libxml2-dev
- libboost-all-dev
- libsdl2-dev
- libopenal-dev
- libfreetype6-dev
- libmad0-dev
- libfaad-dev
- libvorbis-dev
- libxvidcore-dev
- libvpx-dev
- libgl1
- libgl-dev
homebrew:
packages:
- ninja
- zlib
- xz
- libxml2
- sdl2
- openal-soft
- freetype
- mad
- faad2
- libvorbis
- xvid
- libvpx
coverity_scan:
build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis_coverity.sh
project:
name: $TRAVIS_REPO_SLUG
notification_email: [email protected]
build_command_prepend: "cmake -G Ninja ."
build_command: "cmake --build . --target check"
branch_pattern: coverity_scan
notifications:
irc:
channels:
- secure: "Q7G5gmVRO67LIAhic4NoeiPRtygiOqjEfPZMIHqgTcpd1OkD8u/Sv9zhfYORfCIqKX1TruL6to6O/4q0HdjQ4NL4GfiNB0iYc+JCinmg80ekPLjjxBIvHmrsvz8onTAmxyYFacXM0YNurCMVvuD0F/yUaiTWwVcRY7PId8T8KPk="
on_success: change
on_failure: always
use_notice: true