-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from euler-xyz/main
License
- Loading branch information
Showing
5 changed files
with
251 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# A workflow file for running Certora verification through GitHub actions. | ||
# Find results for each push in the "Actions" tab on the GitHub website. | ||
name: Certora verification | ||
|
||
on: | ||
push: {} | ||
workflow_dispatch: {} | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# check out the current version | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
submodules: recursive | ||
|
||
# install Certora dependencies and CLI | ||
- name: Install python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
# cache: 'pip' | ||
- name: Install certora | ||
run: pip3 install certora-cli | ||
|
||
# the following is only necessary if your project depends on contracts | ||
# installed using yarn | ||
# - name: Install yarn | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 16 | ||
# cache: 'yarn' | ||
# - name: Install dependencies | ||
# run: yarn | ||
|
||
# Install the appropriate version of solc | ||
- name: Install solc | ||
run: | | ||
pip install solc-select | ||
solc-select install 0.8.20 | ||
solc-select use 0.8.20 | ||
# It is also possible to download the solc binaries directly | ||
# wget https://github.com/ethereum/solidity/releases/download/v0.8.0/solc-static-linux | ||
# sudo mv solc-static-linux /usr/local/bin/solc8.0 | ||
# chmod +x /usr/local/bin/solc8.0 | ||
# ln -s /usr/local/bin/solc8.0 /usr/local/bin/solc | ||
|
||
# Do the actual verification. The `run` field could be simply | ||
# | ||
# certoraRun certora/conf/${{ matrix.params }} | ||
# | ||
# but we do a little extra work to get the commit messages into the | ||
# `--msg` argument | ||
# | ||
# Here ${{ matrix.params }} gets replaced with each of the parameters | ||
# listed in the `params` section below. | ||
- name: Verify rule ${{ matrix.params.name }} | ||
run: > | ||
message="$(git log -n 1 --pretty=format:'CI_${{matrix.params.name}}_%h')"; | ||
./formal-verification/run.sh ${{ matrix.params.command }} \ | ||
--msg "$(echo $message | sed 's/[^a-zA-Z0-9., _-]/ /g')" \ | ||
env: | ||
# For this to work, you must set your CERTORAKEY secret on the GitHub | ||
# website (settings > secrets > actions > new repository secret) | ||
CERTORAKEY: ${{ secrets.CERTORAKEY }} | ||
|
||
# The following two steps save the output json as a GitHub artifact. | ||
# This can be useful for automation that collects the output. | ||
- name: Download output json | ||
if: always() | ||
run: > | ||
outputLink=$(sed 's/zipOutput/output/g' .zip-output-url.txt | sed 's/?/\/output.json?/g'); | ||
curl -L -b "certoraKey=$CERTORAKEY;" ${outputLink} --output output.json || true; | ||
touch output.json; | ||
- name: Archive output json | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: output for ${{ matrix.params.name }} | ||
path: output.json | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
params: | ||
# Each of these commands is passed to the "Verify rule" step above, | ||
# which runs certoraRun on certora/conf/<contents of the command> | ||
# | ||
# Note that each of these lines will appear as a separate run on | ||
# prover.certora.com | ||
# | ||
# It is often helpful to split up by rule or even by method for a | ||
# parametric rule, although it is certainly possible to run everything | ||
# at once by not passing the `--rule` or `--method` options | ||
#- {name: transferSpec, command: 'ERC20'} | ||
#- {name: generalRulesOnERC20, command: 'generalRules_ERC20'} | ||
#- {name: generalRulesOnVAULT, command: 'generalRules_VAULT'} | ||
- {name: RulesForFeeFlowController, command: 'default'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters