File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ set -euo pipefail
4
4
5
5
source config.sh
6
6
7
+ # Fail fast if these tools aren't properly installed and in the path
8
+ need_cmd riscv64-unknown-elf-gcc
9
+ need_cmd riscv64-unknown-elf-g++
10
+
7
11
# Rust requires a custom target file to exist for our custom target as part of the bootstrap build,
8
12
# but it doesn't actually look at the contents.
9
13
touch /tmp/riscv32em-athena-zkvm-elf.json
Original file line number Diff line number Diff line change @@ -17,3 +17,26 @@ export ARTIFACT_NAME=athena-rust-toolchain-$TOOLCHAIN_HOST_TRIPLET
17
17
if [ " $param1 " == " -artifact_name" ]; then
18
18
echo " ARTIFACT_NAME=$ARTIFACT_NAME " >> $GITHUB_ENV
19
19
fi
20
+
21
+ need_cmd () {
22
+ if ! check_cmd " $1 " ; then
23
+ err " need '$1 ' (command not found)"
24
+ fi
25
+ }
26
+
27
+ check_cmd () {
28
+ command -v " $1 " & > /dev/null
29
+ }
30
+
31
+ say () {
32
+ printf " rustc-rv32e-toolchain: %s\n" " $1 "
33
+ }
34
+
35
+ warn () {
36
+ say " warning: ${1} " >&2
37
+ }
38
+
39
+ err () {
40
+ say " $1 " >&2
41
+ exit 1
42
+ }
You can’t perform that action at this time.
0 commit comments