-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
94 lines (94 loc) · 3.13 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
language: rust
branches:
only:
- master
matrix:
include:
- name: "Golang Example"
language: generic
os: linux
services: docker
script:
- make go-docker-test
- name: "Rustfmt and Clippy"
os: linux
rust: stable
cache: cargo # cache cargo-audit once installed
before_script:
- rustup component add rustfmt
- rustup component add clippy
- cargo install --force cargo-audit
script:
- cargo fmt -- --check
- cargo clippy
- cargo audit
- name: "Linux Build, Test and C++ Example"
os: linux
rust: stable
before_script:
- sudo apt-get update
- DEBIAN_FRONTEND=noninteractive sudo apt-get install -y valgrind
script:
- cargo build
- cargo test
- make examples/cpp.out
- valgrind --leak-check=yes --error-exitcode=1 ./examples/cpp.out
- name: "Linux Build and C++ Example - NO_CXXEXCEPTIONS"
os: linux
rust: stable
env:
- NO_CXXEXCEPTIONS=1
before_script:
- sudo apt-get update
- DEBIAN_FRONTEND=noninteractive sudo apt-get install -y valgrind
script:
- cargo build
- make examples/cpp.out
- valgrind --leak-check=yes --error-exitcode=1 ./examples/cpp.out
- name: "Linux Build and C++ Example - NO_CXXEXCEPTIONS NDEBUG"
os: linux
rust: stable
env:
- NO_CXXEXCEPTIONS=1
- NDEBUG=1
before_script:
- sudo apt-get update
- DEBIAN_FRONTEND=noninteractive sudo apt-get install -y valgrind
script:
- cargo build
- make examples/cpp.out
- valgrind --leak-check=yes --error-exitcode=1 ./examples/cpp.out
- name: "OSX Build"
os: osx
rust: stable
script:
- cargo build
- make examples/cpp.out
- ./examples/cpp.out
- name: "Windows Build"
os: windows
rust: stable
script:
- cargo build
- name: "Android Build"
os: linux
rust: stable
before_script:
- rustup target add arm-linux-androideabi
- wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -O ndk.zip
- echo "500679655da3a86aecf67007e8ab230ea9b4dd7b ndk.zip" | sha1sum --check
- unzip ndk.zip > /dev/null
- export NDK_HOME=`pwd`/android-ndk-r18b
- ${NDK_HOME}/build/tools/make_standalone_toolchain.py --arch arm --api 18 --install-dir android-18-armv7-toolchain
- export PATH="$PATH:$(pwd)/android-18-armv7-toolchain/bin/"
- ls android-18-armv7-toolchain/bin/
- mkdir .cargo
- echo "[target.arm-linux-androideabi]" >> .cargo/config
- echo "linker = \"`pwd`/android-18-armv7-toolchain/bin/arm-linux-androideabi-gcc\"" >> .cargo/config
- echo "ar = \"`pwd`/android-18-armv7-toolchain/bin/arm-linux-androideabi-ar\"" >> .cargo/config
- cat .cargo/config
script:
- cargo build --target arm-linux-androideabi
allow_failures:
- name: "Linux Build and C++ Example - NO_CXXEXCEPTIONS"
- name: "Linux Build and C++ Example - NO_CXXEXCEPTIONS NDEBUG"