Skip to content

Commit

Permalink
Clean up CI setup
Browse files Browse the repository at this point in the history
- Enable caching
- Move things out of script files, and into the .travis.yml file
- Use "jobs" key, so that we can name each job
  • Loading branch information
madsmtm committed May 28, 2021
1 parent 7b758ec commit 3ca7bcc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 66 deletions.
91 changes: 61 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,67 @@
language: rust
rust:
- stable
- nightly
os:
- osx
- linux
env:
- FEATURES="" IOS_ARCHS=""
matrix:
include:
- os: osx
rust: stable
env: FEATURES="exception verify_message" IOS_ARCHS=""
- os: osx
osx_image: xcode7.3
rust: 1.41.0
env: FEATURES="exception" IOS_ARCHS="i386 x86_64 armv7 armv7s aarch64"
- os: linux
rust: stable
install:
- rustup component add rustfmt
script: cargo fmt --all -- --check
sudo: false
install: ./travis_install.sh
language: rust
cache: cargo

addons:
apt:
packages:
- clang
- cmake
install: >
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
set -eu
git clone -b 1.9 https://github.com/gnustep/libobjc2.git
mkdir libobjc2/build
cd libobjc2/build
export CC="clang"
export CXX="clang++"
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/libobjc2_staging ../
make install
fi
before_script: >
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
export LIBRARY_PATH=$HOME/libobjc2_staging/lib:$LIBRARY_PATH;
export LD_LIBRARY_PATH=$HOME/libobjc2_staging/lib:$LD_LIBRARY_PATH;
fi
script: ./travis_test.sh
addons:
apt:
packages:
- clang
- cmake
script: cargo test --verbose

jobs:
include:
- name: Check formatting
os: linux
rust: stable
install: rustup component add rustfmt
script: cargo fmt --all -- --check

- name: MacOS stable
os: osx
rust: stable
- name: MacOS nightly
os: osx
rust: nightly
- name: MacOS stable w. features
os: osx
rust: stable
script: cargo test --verbose --features "exception verify_message"

- name: Linux stable
os: linux
rust: stable
- name: Linux nightly
os: linux
rust: nightly

- name: iOS
os: osx
osx_image: xcode7.3
rust: 1.41.0
before_install: >
rustup target add \
i386-apple-ios \
x86_64-apple-ios \
armv7-apple-ios \
armv7s-apple-ios \
aarch64-apple-ios
install: curl -LO https://github.com/SSheldon/rust-test-ios/releases/download/0.1.1/rust-test-ios && chmod +x rust-test-ios
env: FEATURES="exception"
script: ./rust-test-ios
26 changes: 0 additions & 26 deletions travis_install.sh

This file was deleted.

10 changes: 0 additions & 10 deletions travis_test.sh

This file was deleted.

0 comments on commit 3ca7bcc

Please sign in to comment.