diff --git a/.travis.yml b/.travis.yml index 616db9a..55c6227 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ci/install.sh b/ci/install.sh old mode 100644 new mode 100755 index fa98970..153fbd4 --- a/ci/install.sh +++ b/ci/install.sh @@ -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 diff --git a/ci/script.sh b/ci/script.sh old mode 100644 new mode 100755 index dc0be46..89f4f19 --- a/ci/script.sh +++ b/ci/script.sh @@ -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