formal-verifiation.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 | 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.17/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. if: ${{ !contains(matrix.params, 'noCI') }}
  43. run: |
  44. touch certora/applyHarness.patch
  45. make -C certora munged
  46. sh ${{ matrix.params }}
  47. env:
  48. CERTORAKEY: ${{ secrets.CERTORAKEY }}
  49. strategy:
  50. fail-fast: false
  51. max-parallel: 4
  52. matrix:
  53. params: ${{ fromJson(needs.list-scripts.outputs.matrix) }}