This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
107 lines (101 loc) · 3.06 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
dist: trusty
sudo: 9000
language: rust
rust:
- stable
os:
- linux
- osx
cache:
- cargo: true
- directories:
- $HOME/.cache/pip
- $HOME/.sccache
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
notifications:
webhooks: http://build.servo.org:54856/travis
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main'
keyurl: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:jonathonf/ffmpeg-3'
packages:
- python
- gcc-5
- g++-5
- libpulse-dev
- pulseaudio
- dbus-x11
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- libavutil-dev
- libswresample-dev
- yasm
env:
- CARGO_FLAGS="" ANDROID_NDK_VERSION=r15c
- CARGO_FLAGS="--release" ANDROID_NDK_VERSION=r15c
before_install:
- |
# Update Homebrew on macOS and install yasm.
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install yasm
fi
- |
# Install servo-tidy.
virtualenv ../venv
source ../venv/bin/activate
python --version
pip install servo-tidy
- |
if ! [ -x "$(command -v sccache)" ]; then
cargo install sccache
fi;
export RUSTC_WRAPPER=`which sccache`
export SCCACHE_DIR=~/.sccache
sccache --zero-stats
- |
# Start audio system services.
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
export DISPLAY=:99.0
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile --background --exec /usr/bin/Xvfb -- :99 \
-screen 0 1400x900x24 -ac +extension GLX +render -noreset
dbus-launch pulseaudio --start
else
sudo xcodebuild -project NullAudio/AudioDriverExamples.xcodeproj -target NullAudio DSTROOT="/" install;
sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod || sudo killall coreaudiod;
fi;
- |
# Export Linux-specific env variables.
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
export CC=gcc-5 CXX=g++-5
fi
- |
# Download Android NDK for Linux.
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
export ANDROID_HOME="${HOME}/android-ndk"
export ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION}"
mkdir -p $ANDROID_HOME
curl -o ndk.zip "https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip"
unzip -q ndk.zip -d $ANDROID_HOME
rustup target add arm-linux-androideabi
./create-ndk-standalone.sh
mkdir -p ./.cargo
mv cargo-config.toml ./.cargo/config
fi;
script:
- env
- servo-tidy
- RUST_BACKTRACE=1 cargo test --verbose $CARGO_FLAGS
- |
# Disable Android cross-build on OSX because macOS Travis builders are too slow.
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
RUST_BACKTRACE=1 CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ PATH=$PWD/NDK/arm/bin:$PATH cargo build --verbose --target arm-linux-androideabi $CARGO_FLAGS
fi;
- sccache --show-stats