-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d52c5b
commit 7ae62ef
Showing
2 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,48 @@ | ||
dist: bionic | ||
language: rust | ||
dist: bionic | ||
|
||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
os: | ||
- linux | ||
- osx | ||
env: | ||
global: | ||
- HOST=x86_64-unknown-linux-gnu | ||
|
||
jobs: | ||
allow_failures: | ||
- rust: nightly | ||
fast_finish: true | ||
include: | ||
# Linux | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
- env: TARGET=x86_64-unknown-linux-musl | ||
- env: TARGET=i686-unknown-linux-gnu | ||
|
||
# OSX | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
|
||
# Testing other channels | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
rust: nightly | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
rust: nightly | ||
|
||
# Static checks | ||
- name: "LoC and style tests" | ||
before_script: rustup component add rustfmt clippy | ||
script: | ||
- cargo test --test loc | ||
- cargo fmt -- --check | ||
- cargo clippy --all-targets -- -D warnings | ||
rust: stable | ||
os: linux | ||
- name: "Dependency Audit" | ||
install: cargo install cargo-audit | ||
script: cargo audit | ||
cache: cargo | ||
rust: stable | ||
os: linux | ||
|
||
before_install: | ||
- set -e | ||
- rustup self update | ||
allow_failures: | ||
- rust: nightly | ||
fast_finish: true | ||
|
||
before_install: ci/before_install.sh | ||
|
||
cache: false | ||
|
||
install: cargo build --verbose | ||
install: cargo build --target "${TARGET:-$HOST}" --verbose | ||
|
||
script: skip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
if [ "$TRAVIS_OS_NAME" == linux ] && [ "$HOST" != "${TARGET:-$HOST}" ]; then | ||
case "$TARGET" in | ||
'i686-unknown-linux-gnu') | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-multilib | ||
;; | ||
esac | ||
|
||
rustup target add "$TARGET"; | ||
fi | ||
|
||
rustup self update |