Skip to content

Install & test

Install & test #488

name: Install & test
on:
pull_request:
merge_group:
workflow_dispatch:
push:
branches: [main]
jobs:
tests:
name: nix-action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
run: nix build -L
- name: Install the toolchain
run: |
nix profile install nixpkgs#yq
nix profile install .#rustc
nix profile install .
- name: Test the toolchain
run: |
nix flake check -L
- name: Checkout specifications
uses: actions/checkout@v3
with:
repository: 'hacspec/specs'
- name: Extract specifications
run: |
paths=$(tomlq -r '.workspace.members | .[]' Cargo.toml)
for cratePath in $paths; do
crate=$(tomlq -r '.package.name' "$cratePath/Cargo.toml")
for backend in fstar coq; do
for skip in $SKIPLIST; do
if [[ "$skip" == "$crate" || "$skip" == "$crate-$backend" ]]; then
echo "⛔ $crate [$backend] (skipping)"
continue 2
fi
done
echo "::group::$crate [$backend]"
cargo hax -C -p "$crate" \; into "$backend"
echo "::endgroup::"
done
done
env:
SKIPLIST: |
tls_cryptolib
hacspec-merlin
hacspec-halo2-coq
hacspec-halo2-fstar
hacspec-weierstrass-coq
hacspec-weierstrass-fstar