formal-verification.yml 1.4 KB

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