-
Notifications
You must be signed in to change notification settings - Fork 147
64 lines (55 loc) · 1.95 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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' }}