Skip to content

Commit

Permalink
Rust: Add no_std CI (#1648)
Browse files Browse the repository at this point in the history
* Rust: Add no_std CI

* Merge into rust.yml

* Remove no_std.yml

* The shellscripts rely on CWD ../

* Add job id into group

* Fix a mistaken path for shellscript

* Move concurrency setting to root

* Fix yaml syntax and revert group name
  • Loading branch information
pinkforest authored Sep 5, 2023
1 parent 33921df commit 217951e
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,43 @@ on:
schedule:
- cron: '0 0 1 * *'

defaults:
run:
working-directory: fiat-rust

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test-rust:

runs-on: ubuntu-latest

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- name: cargo build
run: (cd fiat-rust; cargo build --verbose)
run: cargo build --verbose
- name: cargo test
run: (cd fiat-rust; cargo test --verbose)
- name: cargo test (no_std)
run: (cd fiat-rust; cargo test --no-default-features --verbose)
run: cargo test --verbose
- name: curve25519-dalek test
run: etc/ci/test-fiat-rust-curve25519-dalek.sh
run: (cd .. ; etc/ci/test-fiat-rust-curve25519-dalek.sh)
- name: crate-crypto/Ed448-Goldilocks test
run: etc/ci/test-fiat-rust-crate-crypto-Ed448-Goldilocks.sh
run: (cd .. ; etc/ci/test-fiat-rust-crate-crypto-Ed448-Goldilocks.sh)

build-nostd:
name: Build on no_std target (thumbv7em-none-eabi)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: thumbv7em-none-eabi
- uses: taiki-e/install-action@cargo-hack
# No default features build
- name: no_std / no feat fiat-crypto
run: cargo build -p fiat-crypto --target thumbv7em-none-eabi --release --no-default-features
- name: no_std / cargo hack fiat-crypto
run: cargo hack build -p fiat-crypto --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std

0 comments on commit 217951e

Please sign in to comment.