Skip to content

Add checksum KAT to Github Workflow #10

Add checksum KAT to Github Workflow

Add checksum KAT to Github Workflow #10

Workflow file for this run

name: Build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ "main" ]
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: Astyle
shell: nix develop .#ci -c bash -e {0}
run: |
err=$(astyle $(git ls-files "*.c" "*.h") --options=.astylerc --dry-run --formatted | awk '{print $2}')
if [[ ${#err} != 0 ]]; then
echo "$err" | while IFS= read -r file; do
echo "::error file={"$file"},title={checking}::Formatted $file"
done
exit 1
fi
- name: Build targets
shell: nix develop .#ci -c bash -e {0}
run: |
make
- name: Compare gen_KAT with known hash
shell: nix develop .#ci -c bash -e {0}
run: |
make kat;
./checksum.sh ./test/gen_KAT512 ec4ac397e595ac7457cb7d8830921faf3290898a10d7dd3864aab89ea61fe9a3
./checksum.sh ./test/gen_KAT768 9a0826ad3c5232dfd3b21bc4801408655c565a491b760f509b2ee2cd7180babe
./checksum.sh ./test/gen_KAT1024 6dafb867599b750a6a831b03e494cf41dea748c78a0e275e7b268bbb893cf37d