File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,11 +8,17 @@ 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"
1213base_rustflags=" ${RUSTFLAGS:- } "
1314
1415for package in " ${no_std_packages[@]} " ; do
15- build_cmd=(cargo build -p " $package " --no-default-features --target " $target " --release)
16+ # TEMP: Before merging, use commonware's image.
17+ build_cmd=(docker run \
18+ --rm \
19+ -v ` pwd` :/workdir \
20+ -w=" /workdir" \
21+ " $image " cargo +nightly build -p " $package " -Zbuild-std=core,alloc --no-default-features --target " $target " --release)
1622 pretty_cmd=" ${build_cmd[*]} "
1723 if [ -n " $CI " ]; then
1824 echo " ::group::${pretty_cmd} "
Original file line number Diff line number Diff line change @@ -170,18 +170,20 @@ jobs:
170170
171171 no_std :
172172 runs-on : ubuntu-latest
173+ permissions :
174+ packages : read
173175 timeout-minutes : 30
174176 steps :
175177 - name : Checkout repository
176178 uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
177179 - name : Run setup
178180 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
181+ - name : Authenticate with container registry
182+ uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
183+ with :
184+ registry : ghcr.io
185+ username : ${{ github.actor }}
186+ password : ${{ secrets.GITHUB_TOKEN }}
185187 - name : Check no_std compatibility
186188 run : ./.github/scripts/check_no_std.sh
187189
You can’t perform that action at this time.
0 commit comments