This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
forked from mmatyas/servo-nightly
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
149 lines (135 loc) · 4.65 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
language: python
sudo: required
dist: trusty
addons:
apt:
packages:
- cmake
- curl
- freeglut3-dev
- g++
- g++-aarch64-linux-gnu
- g++-arm-linux-gnueabihf
- gperf
- libbz2-dev
- libegl1-mesa-dev
- libfreetype6-dev
- libgl1-mesa-dri
- libgles2-mesa-dev
- libglib2.0-dev
- libglu1-mesa-dev
- libosmesa6-dev
- libssl-dev
- libxmu-dev
- libxmu6
- python-pip
- python-virtualenv
- xorg-dev
# for Android:
- ant
- expect
- lib32gcc1
- lib32stdc++6
- lib32z1
- openjdk-7-jdk
cache:
directories:
- .cargo
- .servo
- $HOME/.ccache
env:
global:
- CCACHE=/usr/bin/ccache
matrix:
# Clear the whole matrix
exclude:
- os: linux
- os: osx
include:
# Source only
- os: linux
env:
- BUILD_TARGET=source
script:
- git clone https://github.com/servo/servo --depth=1
- export ASSET_NAME=servo_source_$(date '+%Y-%m-%d').tgz
- tar czf $ASSET_NAME servo --exclude-vcs --exclude='tests'
- mv $ASSET_NAME servo/
after_success:
- ./upload_to_github.py
# x86_64
- os: linux
env:
- BUILD_TARGET=x86_64-unknown-linux-gnu TRIPLET=x86_64-linux-gnu
# ARM
- os: linux
env:
- BUILD_TARGET=arm-unknown-linux-gnueabihf TRIPLET=arm-linux-gnueabihf
- PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig
- EXPAT_NO_PKG_CONFIG=1 FREETYPE2_NO_PKG_CONFIG=1 FONTCONFIG_NO_PKG_CONFIG=1
before_script:
- mkdir $HOME/bin
- for f in /usr/bin/arm-linux-*; do f2=$(basename $f); ln -s $f $HOME/bin/${f2/-linux/-unknown-linux}; done
# download and link system libs
- wget https://servo-rust.s3.amazonaws.com/ARM/armhf-trusty-libs.tgz
- mkdir rootfs-trusty-armhf
- tar xzf armhf-trusty-libs.tgz -C rootfs-trusty-armhf
- sudo ln -s $(pwd)/rootfs-trusty-armhf/usr/include/arm-linux-gnueabihf /usr/include/arm-linux-gnueabihf
- sudo ln -s $(pwd)/rootfs-trusty-armhf/usr/lib/arm-linux-gnueabihf /usr/lib/arm-linux-gnueabihf
- sudo ln -s $(pwd)/rootfs-trusty-armhf/lib/arm-linux-gnueabihf /lib/arm-linux-gnueabihf
# AArch64
- os: linux
env:
- BUILD_TARGET=aarch64-unknown-linux-gnu TRIPLET=aarch64-linux-gnu
- PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
- EXPAT_NO_PKG_CONFIG=1 FREETYPE2_NO_PKG_CONFIG=1 FONTCONFIG_NO_PKG_CONFIG=1
before_script:
- mkdir $HOME/bin
- for f in /usr/bin/aarch64-linux-*; do f2=$(basename $f); ln -s $f $HOME/bin/${f2/-linux/-unknown-linux}; done
# download and link system libs
- wget https://servo-rust.s3.amazonaws.com/ARM/arm64-trusty-libs.tgz
- mkdir rootfs-trusty-arm64
- tar xzf arm64-trusty-libs.tgz -C rootfs-trusty-arm64
- sudo ln -s $(pwd)/rootfs-trusty-arm64/usr/include/aarch64-linux-gnu /usr/include/aarch64-linux-gnu
- sudo ln -s $(pwd)/rootfs-trusty-arm64/usr/lib/aarch64-linux-gnu /usr/lib/aarch64-linux-gnu
- sudo ln -s $(pwd)/rootfs-trusty-arm64/lib/aarch64-linux-gnu /lib/aarch64-linux-gnu
# note: do not try this at home, see servo/servo#9579
- sudo rm /usr/bin/ld.gold
# Android
- os: linux
env:
- BUILD_TARGET=android TRIPLET=arm-linux-androideabi
before_script:
- source setup_android.sh
script:
- git clone https://github.com/servo/servo --depth=1
- cd servo
- ./mach build --rel --android
# OSX
- os: osx
before_script:
- brew install automake pkg-config python cmake openssl
- brew link --force openssl
- pip install virtualenv
env:
- BUILD_TARGET=x86_64-apple-darwin TRIPLET=x86_64-apple-darwin
script:
- git clone https://github.com/servo/servo --depth=1
- cd servo
- ./mach build -r
script:
- export CC=$TRIPLET-gcc
- export CXX=$TRIPLET-g++
- export PATH="$PATH:$HOME/bin"
- git clone https://github.com/servo/servo --depth=10
- sed -i "s/stdlibs = \[host_triple(), \"arm-linux-androideabi\"\]/stdlibs = set(\[host_triple(), \"arm-linux-androideabi\", \"$BUILD_TARGET\"\])/" servo/python/servo/bootstrap_commands.py
- cd servo
- ./mach build --rel --target=$BUILD_TARGET
after_success:
- cd $TRAVIS_BUILD_DIR/servo
- export ASSET_NAME=servo_${TRIPLET}_$(date '+%Y-%m-%d').tgz
- if [[ "$BUILD_TARGET" == "android" ]]; then ./mach package --release; fi
- if [[ "$BUILD_TARGET" == "android" ]]; then tar czf $ASSET_NAME --transform 's|target/'$TRIPLET'/release/||' target/$TRIPLET/release/servo.apk resources; fi
- if [[ "$BUILD_TARGET" != "android" ]]; then tar czf $ASSET_NAME --transform 's|target/'$BUILD_TARGET'/release/||' target/$BUILD_TARGET/release/servo target/$BUILD_TARGET/release/libservo.rlib resources; fi
- cd ..
- ./upload_to_github.py