Skip to content

Commit

Permalink
Github action for certora (#297)
Browse files Browse the repository at this point in the history
* Move to home dir

* logging

* github path

* stdout

* assert no errors
  • Loading branch information
brittcyr authored Nov 26, 2024
1 parent e6d46bf commit d7b98c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci-certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,24 @@ jobs:
run: |
sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)"
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install certora platform tools
run: |
mkdir $HOME/platform-tools-certora
wget https://github.com/Certora/certora-solana-platform-tools/releases/download/linux-x86_64-ubuntu-20.04-10-22-2024/platform-tools-linux-x86_64.tar.bz2
cd $HOME
wget https://github.com/Certora/certora-solana-platform-tools/releases/download/linux-x86_64-ubuntu-20.04-10-22-2024/platform-tools-linux-x86_64.tar.bz2
tar -xvjf platform-tools-linux-x86_64.tar.bz2 -C $HOME/platform-tools-certora
export PLATFORM_TOOLS_DIR=$HOME/.cache/solana/v1.41
echo "Moving to active releases"
ls
cd $HOME/.local/share/solana/install/active_release/bin/sdk/sbf
echo "Inside active releases"
ls
source env.sh
echo "Moving to cache"
cd $HOME/.cache/solana/v1.41
ls
mv $PLATFORM_TOOLS_DIR/platform-tools $PLATFORM_TOOLS_DIR/platform-tools.backup
ln -sf $HOME/platform-tools-certora $PLATFORM_TOOLS_DIR/platform-tools
Expand Down
2 changes: 1 addition & 1 deletion programs/manifest/verify-manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def from_string(result: str) -> 'VerificationResult':
@staticmethod
def from_command_result(command_result: subprocess.CompletedProcess[str]) -> 'VerificationResult':
if command_result.returncode == 0:
assert "|Not violated" in command_result.stdout, "The verification terminated successfully, but cannot find the '|Not violated' substring in stdout"
assert ("|Not violated" in command_result.stdout or "No errors found by Prover!" in command_result.stdout), ("The verification terminated successfully, but cannot find the '|Not violated' substring in stdout" + str(command_result.stdout))
return VerificationResult.Verified
elif "|Violated" in command_result.stdout:
# If the return code is not zero, and in the stdout we find `|Violated`,
Expand Down

0 comments on commit d7b98c4

Please sign in to comment.