formal-verifiation.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Formal verification
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - release-v*
  7. - formal-verification
  8. pull_request: {}
  9. workflow_dispatch: {}
  10. jobs:
  11. list-scripts:
  12. runs-on: ubuntu-latest
  13. outputs:
  14. matrix: ${{ steps.set-matrix.outputs.matrix }}
  15. steps:
  16. - uses: actions/checkout@v2
  17. - id: set-matrix
  18. run: echo ::set-output name=matrix::$(cat certora/matrix.json)
  19. verify:
  20. runs-on: ubuntu-latest
  21. needs: list-scripts
  22. steps:
  23. - uses: actions/checkout@v2
  24. - name: Install python
  25. uses: actions/setup-python@v2
  26. with: { python-version: 3.6, cache: 'pip' }
  27. - name: Install java
  28. uses: actions/setup-java@v1
  29. with: { java-version: "11", java-package: jre }
  30. - name: Install certora
  31. run: pip install certora-cli
  32. - name: Install solc
  33. run: |
  34. wget https://github.com/ethereum/solidity/releases/download/v0.8.17/solc-static-linux
  35. sudo mv solc-static-linux /usr/local/bin/solc
  36. chmod +x /usr/local/bin/solc
  37. - name: Verify rule ${{ matrix.params.spec }}
  38. if: matrix.params.disabled != true
  39. run: |
  40. echo "key length" ${#CERTORAKEY}
  41. make -C certora munged
  42. certoraRun ${{ matrix.params.file }} --verify ${{ matrix.params.name }}:$${{ matrix.params.spec }} --solc solc --optimistic_loop --loop_iter 3 --rule_sanity advanced --cloud
  43. env:
  44. CERTORAKEY: ${{ secrets.CERTORAKEY }}
  45. strategy:
  46. fail-fast: false
  47. max-parallel: 4
  48. matrix:
  49. params: ${{ fromJson(needs.list-scripts.outputs.matrix) }}