name: Test Generated Rust on: push: pull_request: merge_group: 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 steps: - uses: actions/checkout@v4 - name: cargo build run: cargo build --verbose - name: cargo test run: cargo test --verbose - name: curve25519-dalek test run: (cd .. ; etc/ci/test-fiat-rust-curve25519-dalek.sh) - name: crate-crypto/Ed448-Goldilocks test 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@v4 - 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 test-rust-check-all: runs-on: ubuntu-latest needs: [test-rust, build-nostd] if: always() steps: - uses: actions/checkout@v4 - run: echo 'The triggering workflow (test-rust) passed' if: ${{ needs.test-rust.result == 'success' }} - run: echo 'The triggering workflow (test-rust) failed' && false if: ${{ needs.test-rust.result != 'success' }} - run: echo 'The triggering workflow (build-nostd) passed' if: ${{ needs.build-nostd.result == 'success' }} - run: echo 'The triggering workflow (build-nostd) failed' && false if: ${{ needs.build-nostd.result != 'success' }}