Simplify CI scripts

This commit is contained in:
Vadim Kaushan 2019-03-17 16:30:23 +03:00
parent 41b4c1c1e6
commit 9352831150
No known key found for this signature in database
GPG Key ID: A501C5DF67C05C4E
3 changed files with 16 additions and 22 deletions

View File

@ -22,11 +22,11 @@ matrix:
install:
- bash ci/install.sh
- ci/install.sh
- export PATH="$PATH:$PWD/gcc/bin"
script:
- bash ci/script.sh
- ci/script.sh
cache: cargo

14
ci/install.sh Normal file → Executable file
View File

@ -1,12 +1,8 @@
#!/usr/bin/env bash
set -euxo pipefail
main() {
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
rustup target add $TARGET
fi
rustup target add $TARGET
mkdir gcc
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
}
main
mkdir gcc
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz

20
ci/script.sh Normal file → Executable file
View File

@ -1,15 +1,13 @@
#!/usr/bin/env bash
set -euxo pipefail
main() {
cargo check --target $TARGET
cargo check --target $TARGET
if [ $TRAVIS_RUST_VERSION = nightly ]; then
cargo check --target $TARGET --features inline-asm
fi
if [ $TRAVIS_RUST_VERSION = nightly ]; then
cargo check --target $TARGET --features inline-asm
fi
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
./check-blobs.sh
fi
}
main
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
./check-blobs.sh
fi