Skip to content

Commit 3ca7bcc

Browse files
committed
Clean up CI setup
- Enable caching - Move things out of script files, and into the .travis.yml file - Use "jobs" key, so that we can name each job
1 parent 7b758ec commit 3ca7bcc

File tree

3 files changed

+61
-66
lines changed

3 files changed

+61
-66
lines changed

.travis.yml

+61-30
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,67 @@
1-
language: rust
2-
rust:
3-
- stable
4-
- nightly
5-
os:
6-
- osx
7-
- linux
8-
env:
9-
- FEATURES="" IOS_ARCHS=""
10-
matrix:
11-
include:
12-
- os: osx
13-
rust: stable
14-
env: FEATURES="exception verify_message" IOS_ARCHS=""
15-
- os: osx
16-
osx_image: xcode7.3
17-
rust: 1.41.0
18-
env: FEATURES="exception" IOS_ARCHS="i386 x86_64 armv7 armv7s aarch64"
19-
- os: linux
20-
rust: stable
21-
install:
22-
- rustup component add rustfmt
23-
script: cargo fmt --all -- --check
241
sudo: false
25-
install: ./travis_install.sh
2+
language: rust
3+
cache: cargo
4+
5+
addons:
6+
apt:
7+
packages:
8+
- clang
9+
- cmake
10+
install: >
11+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
12+
set -eu
13+
git clone -b 1.9 https://github.com/gnustep/libobjc2.git
14+
mkdir libobjc2/build
15+
cd libobjc2/build
16+
export CC="clang"
17+
export CXX="clang++"
18+
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/libobjc2_staging ../
19+
make install
20+
fi
2621
before_script: >
2722
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
2823
export LIBRARY_PATH=$HOME/libobjc2_staging/lib:$LIBRARY_PATH;
2924
export LD_LIBRARY_PATH=$HOME/libobjc2_staging/lib:$LD_LIBRARY_PATH;
3025
fi
31-
script: ./travis_test.sh
32-
addons:
33-
apt:
34-
packages:
35-
- clang
36-
- cmake
26+
script: cargo test --verbose
27+
28+
jobs:
29+
include:
30+
- name: Check formatting
31+
os: linux
32+
rust: stable
33+
install: rustup component add rustfmt
34+
script: cargo fmt --all -- --check
35+
36+
- name: MacOS stable
37+
os: osx
38+
rust: stable
39+
- name: MacOS nightly
40+
os: osx
41+
rust: nightly
42+
- name: MacOS stable w. features
43+
os: osx
44+
rust: stable
45+
script: cargo test --verbose --features "exception verify_message"
46+
47+
- name: Linux stable
48+
os: linux
49+
rust: stable
50+
- name: Linux nightly
51+
os: linux
52+
rust: nightly
53+
54+
- name: iOS
55+
os: osx
56+
osx_image: xcode7.3
57+
rust: 1.41.0
58+
before_install: >
59+
rustup target add \
60+
i386-apple-ios \
61+
x86_64-apple-ios \
62+
armv7-apple-ios \
63+
armv7s-apple-ios \
64+
aarch64-apple-ios
65+
install: curl -LO https://github.com/SSheldon/rust-test-ios/releases/download/0.1.1/rust-test-ios && chmod +x rust-test-ios
66+
env: FEATURES="exception"
67+
script: ./rust-test-ios

travis_install.sh

-26
This file was deleted.

travis_test.sh

-10
This file was deleted.

0 commit comments

Comments
 (0)