formal-verification.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. concurrency: ${{ github.workflow }}-${{ github.ref }}
  19. jobs:
  20. apply-diff:
  21. runs-on: ubuntu-latest
  22. steps:
  23. - uses: actions/checkout@v3
  24. - name: Apply patches
  25. run: make -C certora apply
  26. verify:
  27. runs-on: ubuntu-latest
  28. if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'formal-verification')
  29. steps:
  30. - uses: actions/checkout@v3
  31. - name: Set up environment
  32. uses: ./.github/actions/setup
  33. - name: Install python
  34. uses: actions/setup-python@v4
  35. with:
  36. python-version: ${{ env.PIP_VERSION }}
  37. cache: 'pip'
  38. - name: Install python packages
  39. run: pip install -r requirements.txt
  40. - name: Install java
  41. uses: actions/setup-java@v3
  42. with:
  43. distribution: temurin
  44. java-version: ${{ env.JAVA_VERSION }}
  45. - name: Install solc
  46. run: |
  47. wget https://github.com/ethereum/solidity/releases/download/v${{ env.SOLC_VERSION }}/solc-static-linux
  48. sudo mv solc-static-linux /usr/local/bin/solc
  49. chmod +x /usr/local/bin/solc
  50. - name: Verify specification
  51. run: |
  52. make -C certora apply
  53. node certora/run.js >> "$GITHUB_STEP_SUMMARY"
  54. env:
  55. CERTORAKEY: ${{ secrets.CERTORAKEY }}