Skip to content

CI

CI #145

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 8 * * 6'
jobs:
verify:
strategy:
matrix:
hsm:
- adder
- counter
- counter-picorv32
- fifo
- fifo1
- lockbox
- multi-lockbox-leak
- multi-lockbox-pad
- otp
- password-hasher
- pin-protected-backup
proof: [correctness, security]
name: Verify ${{ matrix.proof }} for ${{ matrix.hsm }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: docker build . -t anishathalye/knox
- name: Disable crashes and yield
run: |
sed -i 's/^\s*;;\s*\(#:without-\(crashes\|yield\)\).*$/\1 #t/' '${{ matrix.hsm }}/proof/correctness.rkt'
- name: Compile
run: |
docker run --rm -v "${PWD}/:/knox-hsm" -w "/knox-hsm/${{ matrix.hsm }}/proof" anishathalye/knox:latest /bin/bash -c "
make
"
- name: Verify
run: |
docker run --rm -v "${PWD}/:/knox-hsm" -w "/knox-hsm/${{ matrix.hsm }}/proof" anishathalye/knox:latest /bin/bash -c "
racket '${{ matrix.proof }}.rkt'
"
generate_bitstream:
strategy:
matrix:
hsm:
- otp
- password-hasher
- pin-protected-backup
name: Generate FPGA bitstream for ${{ matrix.hsm }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pull Docker image
run: docker pull anishathalye/knox:latest
- name: Generate bitstream
run: |
docker run --rm -v "${PWD}/:/knox-hsm" -w "/knox-hsm/${{ matrix.hsm }}/impl" anishathalye/knox:latest /bin/bash -c "
make fpga.bin
"
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
python -m pip install --upgrade pip
pip install mypy
- run: mypy --strict .
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable