Skip to content

Commit

Permalink
build/CI ~ improve Travis CI configuration (adds i686 build testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Sep 21, 2019
1 parent 96564ce commit 0cc918e
Showing 1 changed file with 38 additions and 19 deletions.
57 changes: 38 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# spell-checker:ignore fakeroot msvc multilib musl rustc rustup
language: rust
cache: cargo

env:
global:
# used by the deployment script
- PROJECT_NAME=pastel

matrix:
allow_failures:
# os: windows is still BETA as of 2019-09
- os: windows
- rust: nightly
include:
# Minimum Rust supported channel.
- os: linux
rust: 1.34.0
env: TARGET=x86_64-unknown-linux-gnu
# Stable channel.
- os: linux
rust: stable
Expand All @@ -15,35 +30,39 @@ matrix:
- os: windows
rust: stable
env: TARGET=x86_64-pc-windows-msvc

# Minimum Rust supported channel.
- os: linux
rust: 1.34.0
env: TARGET=x86_64-unknown-linux-gnu

rust: stable
env: TARGET=i686-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-musl
- os: osx
rust: stable
env: TARGET=i686-apple-darwin
- os: windows
rust: stable
env: TARGET=i686-pc-windows-msvc

addons:
apt:
packages:
# needed to build deb packages
- fakeroot

env:
global:
# Default target on travis-ci.
# Used as conditional check in the install stage
- HOST=x86_64-unknown-linux-gnu
# Used on the deployment script
- PROJECT_NAME=pastel
# needed for i686/x86/32-bit builds
- gcc-multilib

install:
# prevent target re-add error from rustup
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
- export HOST=$( rustup show | grep -Pio "^default\\s+host\\s*:\\s*(.*)$" | grep -Pio "([\S]+)(?=\s*$)" )
- if [[ $HOST != $TARGET ]]; then rustup target add $TARGET; fi
# show rust versions
- rustup -vV && rustup show
- rustc -vV
- cargo -vV

script:
# Incorporate TARGET env var to the build and test process
- cargo build --target $TARGET --verbose
- cargo test --target $TARGET --verbose
- echo "[ `cargo build --target $TARGET --verbose` ]" && cargo build --target $TARGET --verbose
- echo "[ `cargo test --target $TARGET --verbose` ]" && cargo test --target $TARGET --verbose

before_deploy:
- bash ci/before_deploy.bash
Expand Down Expand Up @@ -75,5 +94,5 @@ deploy:
condition: $TRAVIS_RUST_VERSION = stable && $TARGET != "x86_64-pc-windows-msvc"

notifications:
email:
on_success: never
on_success: change
on_failure: always

0 comments on commit 0cc918e

Please sign in to comment.