Skip to content

Commit f0afce4

Browse files
bors[bot]Disasm
andauthored
Merge #51
51: CI fixes and improvements r=almindor a=Disasm Co-authored-by: Vadim Kaushan <[email protected]>
2 parents 7ef035a + e8918a7 commit f0afce4

File tree

3 files changed

+36
-24
lines changed

3 files changed

+36
-24
lines changed

riscv-rt/.travis.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,26 @@ env:
1313

1414
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
1515

16-
before_install: set -e
16+
matrix:
17+
allow_failures:
18+
- rust: nightly
19+
include:
20+
- env: CHECK_BLOBS=1
21+
rust:
22+
language: bash
23+
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
24+
1725

1826
install:
19-
- bash ci/install.sh
20-
- export PATH="$PATH:$PWD/gcc/bin"
27+
- ci/install.sh
2128

2229
script:
23-
- bash ci/script.sh
24-
25-
after_script: set +e
30+
- ci/script.sh
2631

27-
cache: cargo
32+
cache:
33+
cargo: true
34+
directories:
35+
- gcc
2836

2937
branches:
3038
only:

riscv-rt/ci/install.sh

100644100755
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
set -euxo pipefail
1+
#!/usr/bin/env bash
22

3-
main() {
4-
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
5-
rustup target add $TARGET
6-
fi
3+
set -euxo pipefail
74

8-
mkdir gcc
9-
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
10-
}
5+
if [ -n "${TARGET:-}" ]; then
6+
rustup target add $TARGET
7+
fi
118

12-
main
9+
if [ -n "${CHECK_BLOBS:-}" ]; then
10+
if [ ! -d gcc/bin ]; then
11+
mkdir -p gcc
12+
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+
fi
14+
fi

riscv-rt/ci/script.sh

100644100755
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1+
#!/usr/bin/env bash
2+
13
set -euxo pipefail
24

3-
main() {
5+
if [ -n "${TARGET:-}" ]; then
46
cargo check --target $TARGET
7+
58
if [[ $TARGET == riscv* ]]; then
69
cargo check --target $TARGET --examples
710
fi
811

912
if [ $TRAVIS_RUST_VERSION = nightly ]; then
10-
cargo check --target $TARGET --features 'inline-asm'
11-
fi
12-
13-
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
14-
./check-blobs.sh
13+
cargo check --target $TARGET --features inline-asm
1514
fi
16-
}
15+
fi
1716

18-
main
17+
if [ -n "${CHECK_BLOBS:-}" ]; then
18+
PATH="$PATH:$PWD/gcc/bin"
19+
./check-blobs.sh
20+
fi

0 commit comments

Comments
 (0)