Przeglądaj źródła

Update CI scripts

Vadim Kaushan 5 lat temu
rodzic
commit
642ef2944e
3 zmienionych plików z 22 dodań i 30 usunięć
  1. 2 7
      riscv-rt/.travis.yml
  2. 7 9
      riscv-rt/ci/install.sh
  3. 13 14
      riscv-rt/ci/script.sh

+ 2 - 7
riscv-rt/.travis.yml

@@ -13,16 +13,11 @@ env:
 
 if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
 
-before_install: set -e
-
 install:
-  - bash ci/install.sh
-  - export PATH="$PATH:$PWD/gcc/bin"
+  - ci/install.sh
 
 script:
-  - bash ci/script.sh
-
-after_script: set +e
+  - ci/script.sh
 
 cache: cargo
 

+ 7 - 9
riscv-rt/ci/install.sh

@@ -1,12 +1,10 @@
-set -euxo pipefail
+#!/usr/bin/env bash
 
-main() {
-    if [ $TARGET != x86_64-unknown-linux-gnu ]; then
-        rustup target add $TARGET
-    fi
+set -euxo pipefail
 
-    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
-}
+if [ $TARGET != x86_64-unknown-linux-gnu ]; then
+    rustup target add $TARGET
+fi
 
-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

+ 13 - 14
riscv-rt/ci/script.sh

@@ -1,18 +1,17 @@
-set -euxo pipefail
+#!/usr/bin/env bash
 
-main() {
-    cargo check --target $TARGET
-    if [[ $TARGET == riscv* ]]; then
-        cargo check --target $TARGET --examples
-    fi
+set -euxo pipefail
 
-    if [ $TRAVIS_RUST_VERSION = nightly ]; then
-        cargo check --target $TARGET --features 'inline-asm'
-    fi
+cargo check --target $TARGET
+if [[ $TARGET == riscv* ]]; then
+    cargo check --target $TARGET --examples
+fi
 
-    if [ $TARGET = x86_64-unknown-linux-gnu ]; then
-        ./check-blobs.sh
-    fi
-}
+if [ $TRAVIS_RUST_VERSION = nightly ]; then
+    cargo check --target $TARGET --features 'inline-asm'
+fi
 
-main
+if [ $TARGET = x86_64-unknown-linux-gnu ]; then
+    PATH="$PATH:$PWD/gcc/bin"
+    ./check-blobs.sh
+fi