formal-verification.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: formal verification
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - release-v*
  7. pull_request:
  8. types:
  9. - opened
  10. - reopened
  11. - synchronize
  12. - labeled
  13. workflow_dispatch: {}
  14. env:
  15. PIP_VERSION: '3.10'
  16. JAVA_VERSION: '11'
  17. SOLC_VERSION: '0.8.19'
  18. jobs:
  19. apply-diff:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v3
  23. - name: Apply patches
  24. run: make -C certora apply
  25. verify:
  26. runs-on: ubuntu-latest
  27. if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'formal-verification')
  28. steps:
  29. - uses: actions/checkout@v3
  30. - name: Set up environment
  31. uses: ./.github/actions/setup
  32. - name: Install python
  33. uses: actions/setup-python@v4
  34. with:
  35. python-version: ${{ env.PIP_VERSION }}
  36. cache: 'pip'
  37. - name: Install python packages
  38. run: pip install -r requirements.txt
  39. - name: Install java
  40. uses: actions/setup-java@v3
  41. with:
  42. distribution: temurin
  43. java-version: ${{ env.JAVA_VERSION }}
  44. - name: Install solc
  45. run: |
  46. wget https://github.com/ethereum/solidity/releases/download/v${{ env.SOLC_VERSION }}/solc-static-linux
  47. sudo mv solc-static-linux /usr/local/bin/solc
  48. chmod +x /usr/local/bin/solc
  49. - name: Verify specification
  50. run: |
  51. make -C certora apply
  52. node certora/run.js >> "$GITHUB_STEP_SUMMARY"
  53. env:
  54. CERTORAKEY: ${{ secrets.CERTORAKEY }}