-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
48 lines (43 loc) · 1.35 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
language: rust
sudo: 9000
dist: trusty
rust:
- nightly
cache: cargo
before_install:
# Make sure there's only one josephine crate in the deps directory,
# which is needed for the rustdoc script.
- rm -rf target/debug/deps/*josephine*
addons:
apt:
sources:
# Provides newer gcc.
- ubuntu-toolchain-r-test
packages:
- autoconf2.13
- gcc-5
- g++-5
env:
global:
- CC="gcc-5"
- CXX="g++-5"
# Where to fetch the smup version of mozjs from
- SMUP_GIT="https://github.com/fitzgen/mozjs"
- SMUP_BRANCH="smup-smup-smup"
matrix:
- CARGO_FLAGS=""
- CARGO_FLAGS="--release"
- CARGO_FLAGS="--features debugmozjs"
- CARGO_FLAGS="--features debugmozjs --release"
- CARGO_FLAGS="--features smup" SMUP=true
- CARGO_FLAGS="--features smup --release" SMUP=true
script:
# If we're doing a smup, patch in the smup repo
- if [ $SMUP ]; then echo -e "\n[patch.crates-io]\nmozjs = { git = \"$SMUP_GIT\", branch = \"$SMUP_BRANCH\" }" >> Cargo.toml; fi
- cat Cargo.toml
- cargo build $CARGO_FLAGS -vv
- cargo test --doc $CARGO_FLAGS
# The minidom example currently doesn't work with the smup
- if [ ! $SMUP ]; then cargo run $CARGO_FLAGS --example minidom; fi
- cargo run $CARGO_FLAGS --example dbllist
- if [ -z "$CARGO_FLAGS" ]; then rustdoc -L target/debug/deps/ --test README.md; fi