Skip to content

Commit

Permalink
refactor: adjust ci fstar to run on main crates
Browse files Browse the repository at this point in the history
  • Loading branch information
geonnave committed Oct 3, 2023
1 parent 780c01a commit 0d84bec
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@ jobs:
run: cargo build --package edhoc-rs --package edhoc-crypto --package edhoc-ead --no-default-features --features="${{ matrix.edhoc_lib }}-${{ matrix.crypto }}, ${{ matrix.ead }}" --release


hacspec-to-fstar:
# TODO: rename to `generate-fstar` and adjust to use the main library
generate-fstar:
needs: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout edhoc-rs
uses: actions/checkout@v3

- name: Patch edhoc-rs features
run: git apply ./hacspec/adjust_features_for_hax.patch
# - name: Patch edhoc-rs features
# run: git apply ./hacspec/adjust_features_for_hax.patch

- name: Checkout hacspec-v2
uses: actions/checkout@v3
Expand All @@ -92,7 +91,7 @@ jobs:

- name: Generate fstar
run: |
docker run --rm -v ${{ github.workspace }}:/edhoc-rs hacspec-v2 bash -c "cd edhoc-rs/hacspec && cargo-hax -C -p edhoc-hacspec -p edhoc-crypto -p edhoc-consts -p edhoc-crypto-hacspec \; into fstar"
docker run --rm -v ${{ github.workspace }}:/edhoc-rs hacspec-v2 bash -c "cd edhoc-rs/hacspec && cargo-hax -C --package edhoc-rs --package edhoc-crypto --package edhoc-ead --no-default-features --features="rust-psa, ead-none" --release \; into fstar"
zip -j -r edhoc-rs-fstar.zip $(find . -name *fst)
- name: Upload artifact
Expand Down Expand Up @@ -197,7 +196,7 @@ jobs:

release:
runs-on: ubuntu-latest
needs: [build-edhoc-package, run-example-on-qemu, build-example-for-cortex-m4, build-coap-example, hacspec-to-fstar, build-static-lib-and-headers]
needs: [build-edhoc-package, run-example-on-qemu, build-example-for-cortex-m4, build-coap-example, generate-fstar, build-static-lib-and-headers]
if: >-
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
Expand Down

0 comments on commit 0d84bec

Please sign in to comment.