-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust: Add no_std CI #1648
Rust: Add no_std CI #1648
Changes from 5 commits
c964521
5836bf5
b7bf75c
e0d830b
176bc42
236e7a8
ec7b500
d05f291
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -6,24 +6,47 @@ on: | |||
schedule: | ||||
- cron: '0 0 1 * *' | ||||
|
||||
defaults: | ||||
run: | ||||
working-directory: fiat-rust | ||||
|
||||
jobs: | ||||
test-rust: | ||||
|
||||
runs-on: ubuntu-latest | ||||
|
||||
concurrency: | ||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-${{ github.job }} | ||||
cancel-in-progress: true | ||||
|
||||
steps: | ||||
- uses: actions/checkout@v3 | ||||
- 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) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you instead make the scripts robust to cwd changes by sticking in a line like
in the script itself? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend to do that in a follow-up PR where I will remove those shellscripts together and it will be natively github action - or a bit more idiomatic w/o shellscripts There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, sounds good. In that case I think you'll need to fix the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh thanks fixed 💜 |
||||
- 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) | ||||
JasonGross marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
build-nostd: | ||||
name: Build on no_std target (thumbv7em-none-eabi) | ||||
runs-on: ubuntu-latest | ||||
|
||||
concurrency: | ||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-${{ github.job }} | ||||
JasonGross marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
cancel-in-progress: true | ||||
|
||||
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 | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this supposed to complete in 0.00s? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes because it only builds it and it uses incremental compilation - it will take more when there are features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this doesn't work the way I hoped, and still cancels the job
Let's try
Or else just manually disambiguate them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs to be at root level