formal-verifiation.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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::$(ls certora/scripts/{,**}/*.sh | grep -v '\WnoCI\W' | jq -Rsc 'split("\n")[:-1]')
  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:
  27. python-version: '3.10'
  28. cache: 'pip'
  29. - name: Install java
  30. uses: actions/setup-java@v1
  31. with:
  32. java-version: '11'
  33. java-package: 'jre'
  34. - name: Install certora
  35. run: pip install certora-cli
  36. - name: Install solc
  37. run: |
  38. wget https://github.com/ethereum/solidity/releases/download/v0.8.19/solc-static-linux
  39. sudo mv solc-static-linux /usr/local/bin/solc
  40. chmod +x /usr/local/bin/solc
  41. - name: Verify rule ${{ matrix.params }}
  42. run: |
  43. touch certora/applyHarness.patch
  44. make -C certora munged
  45. bash ${{ matrix.params }}
  46. env:
  47. CERTORAKEY: ${{ secrets.CERTORAKEY }}
  48. strategy:
  49. fail-fast: false
  50. max-parallel: 4
  51. matrix:
  52. params: ${{ fromJson(needs.list-scripts.outputs.matrix) }}