Merge pull request #1385 from matthiasbeyer/travis-matrix

Travis matrix
This commit is contained in:
Matthias Beyer 2018-04-14 13:39:10 +02:00 committed by GitHub
commit 687bdccac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 13 deletions

View file

@ -7,13 +7,35 @@ dist:
language: rust language: rust
rust: matrix:
- 1.23.0 include:
- 1.24.0 - language: nix
- stable script:
- bash ./scripts/find-dead-symlinks
- bash ./scripts/license-headers-updated
- bash ./scripts/branch-contains-no-tmp-commits
- language: rust
rust: 1.23.0
cache:
cargo: true
script:
- cargo build --all --all-features -j 1 || exit 1
- cargo test --all --all-features -j 1 || exit 1
- language: rust
rust: 1.24.0
cache:
cargo: true
script:
- cargo build --all --all-features -j 1 || exit 1
- cargo test --all --all-features -j 1 || exit 1
- language: rust
rust: stable
cache:
cargo: true
script:
- cargo build --all --all-features -j 1 || exit 1
- cargo test --all --all-features -j 1 || exit 1
cache:
cargo: true
addons: addons:
apt: apt:
@ -21,13 +43,6 @@ addons:
- libdbus-1-dev - libdbus-1-dev
- pkg-config - pkg-config
script:
- |
bash ./scripts/find-dead-symlinks || exit 1
bash ./scripts/license-headers-updated || exit 1
cargo build --all --all-features -j 1 || exit 1
cargo test --all --all-features -j 1 || exit 1
notifications: notifications:
email: email:
on_success: never on_success: never

View file

@ -0,0 +1,28 @@
#!/usr/bin/env bash
COMMIT_RANGE=""
if [[ $TRAVIS ]]; then
if [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then
COMMIT_RANGE=HEAD^..HEAD
else
COMMIT_RANGE=$TRAVIS_COMMIT_RANGE
fi
else
COMMIT_RANGE=$(git merge-base master HEAD)..HEAD
fi
logfreeof() {
git log --format="%s" $COMMIT_RANGE |\
awk '{print $1}' |\
grep -i "$1" && echo "LOG CONTAINS '$1'" && exit 1
return 0
}
logfreeof "fixup"
logfreeof "squash"
logfreeof "wip"
logfreeof "tmp"
logfreeof "ci skip"

16
scripts/mkdocset Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# execute from repository root
CARGO=$(which cargo || exit 1)
RSDOCSDASHING=$(which rsdocs-dashing || exit 1)
DASHING=$(which dashing || exit 1)
find lib -name "Cargo.toml" -exec $CARGO doc --manifest-path {} \; || exit 1
ls target/doc | grep imag | while read pkg; do
$RSDOCSDASHING target/doc/$pkg docset-$pkg
$DASHING build --config docset-$pkg/dashing.json --source docset-$pkg/build
done