Skip to content

cargo update, tighten GH workflows #740

cargo update, tighten GH workflows

cargo update, tighten GH workflows #740

Workflow file for this run

name: no-std build
permissions: {}
on:
push:
branches:
- develop
- next
paths:
- "common/**"
- "crypto/**"
- "networks/**"
- "tests/no-std/**"
pull_request:
paths:
- "common/**"
- "crypto/**"
- "networks/**"
- "tests/no-std/**"
workflow_dispatch:
jobs:
build:
name: Confirm all no-`std` crates build for no-`std` targets
strategy:
matrix:
os: [ubuntu-latest, macos-26-intel, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
with:
persist-credentials: false
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
- name: Get nightly version to use
id: nightly
shell: bash
run: echo "NIGHTLY_VERSION=$(cat .github/nightly-version)" >> "$GITHUB_ENV"
- name: Install RISC-V Toolchain
shell: bash
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt install -y gcc-riscv64-unknown-elf gcc-multilib
elif [ "$RUNNER_OS" = "macOS" ]; then
brew tap riscv-software-src/riscv
brew install riscv-tools
elif [ "$RUNNER_OS" = "Windows" ]; then
/C/msys64/usr/bin/pacman.exe -Syu --noconfirm
/C/msys64/usr/bin/pacman.exe -S --noconfirm mingw-w64-x86_64-riscv32-unknown-elf-gcc
fi
- name: Verify no-std builds
shell: bash
run: |
rustup +$NIGHTLY_VERSION component add rust-src
if [ "$RUNNER_OS" = "Linux" ]; then
export CFLAGS=-I/usr/include
elif [ "$RUNNER_OS" = "Windows" ]; then
export PATH="$PATH:/C/msys64/mingw64/bin"
fi
cargo +$NIGHTLY_VERSION build --target riscv32imac-unknown-none-elf -Z build-std=core -p serai-no-std-tests
cargo +$NIGHTLY_VERSION build --target riscv32imac-unknown-none-elf -Z build-std=core,alloc -p serai-no-std-tests --features "alloc"