Skip to content

Commit f8e8bf9

Browse files
committed
[ci] Use riscv32imac-unknown-none-elf toolchain for no_std check
1 parent 2eed8ea commit f8e8bf9

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/scripts/check_no_std.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ no_std_packages=(
88
commonware-storage
99
)
1010

11-
target="thumbv7em-none-eabihf"
11+
target="riscv32imac-unknown-none-elf"
12+
image="ghcr.io/commonwarexyz/monorepo/rust-riscv32imac-cross@sha256:652f5ff21c943935bc1caf7cf0c65b38127381c66b423f70f86dc7785d93ce85"
1213
base_rustflags="${RUSTFLAGS:-}"
1314

1415
for package in "${no_std_packages[@]}"; do
15-
build_cmd=(cargo build -p "$package" --no-default-features --target "$target" --release)
16+
build_cmd=(docker run \
17+
--rm \
18+
-v `pwd`:/workdir \
19+
-w="/workdir" \
20+
"$image" cargo +nightly build -p "$package" -Zbuild-std=core,alloc --no-default-features --target "$target" --release)
1621
pretty_cmd="${build_cmd[*]}"
1722
if [ -n "$CI" ]; then
1823
echo "::group::${pretty_cmd}"

.github/workflows/fast.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,6 @@ jobs:
176176
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
177177
- name: Run setup
178178
uses: ./.github/actions/setup
179-
- name: Add minimal no_std target
180-
run: rustup target add thumbv7em-none-eabihf
181-
- name: Install ARM bare-metal toolchain (required to compile C from x86 worker)
182-
run: |
183-
sudo apt-get update
184-
sudo apt-get install -y gcc-arm-none-eabi
185179
- name: Check no_std compatibility
186180
run: ./.github/scripts/check_no_std.sh
187181

0 commit comments

Comments
 (0)