debug #269
Workflow file for this run
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
name: test | |
on: [workflow_dispatch, push, pull_request] | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
integration-tests: | |
#needs: [unit-tests] | |
strategy: | |
fail-fast: true | |
name: Integration Tests | |
runs-on: [self-hosted] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Deploy main contract | |
run: | | |
echo "CONTRACT_ADDRESS=$(forge script script/Deployment.s.sol:NovaVerifierDeployer --fork-url http://10.116.0.4:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast --non-interactive --silent | sed -n 's/.*Contract Address: //p' | tail -1)" >> $GITHUB_OUTPUT | |
id: deployment | |
- name: Load proof and public parameters | |
run: | | |
python loader.py verifier-key.json compressed-snark.json ${{steps.deployment.outputs.CONTRACT_ADDRESS}} http://10.116.0.4:8545 | |
- name: Check proof verification status | |
run: | | |
[[ $(cast call ${{steps.deployment.outputs.CONTRACT_ADDRESS}} "verify(uint32,uint256[],uint256[],bool)(bool)" "3" "[1]" "[0]" "false" --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://10.116.0.4:8545) == true ]] && exit 0 || exit 1 | |
#unit-tests: | |
# strategy: | |
# fail-fast: true | |
# name: Unit Tests | |
# runs-on: [self-hosted] | |
# steps: | |
# - uses: actions/checkout@v3 | |
# with: | |
# submodules: recursive | |
# - name: Set up Python | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8 | |
# - name: Install Foundry | |
# uses: foundry-rs/foundry-toolchain@v1 | |
# with: | |
# version: nightly | |
# - name: Check formatting | |
# run: | | |
# forge fmt --check | |
# id: formatting | |
# - name: Regenerate Contracts | |
# run: | | |
# python src/blocks/poseidon/poseidon-contract-gen.py neptune-constants-U24-pallas.json PoseidonU24Pallas > src/blocks/poseidon/PoseidonNeptuneU24pallas.sol | |
# python src/blocks/poseidon/poseidon-contract-gen.py neptune-constants-U24-vesta.json PoseidonU24Vesta > src/blocks/poseidon/PoseidonNeptuneU24vesta.sol | |
# - name: Run forge fmt on re-generated contracts | |
# run: | | |
# forge fmt | |
# - name: Check discrepancies | |
# run: | | |
# if [[ `git status --porcelain` ]]; then | |
# echo "There are discrepancies between the repository and the source. Please ensure the contracts are up to date." | |
# exit 1 | |
# fi | |
# - name: Run Forge build | |
# run: | | |
# forge --version | |
# forge build | |
# id: build | |
# - name: Run Forge tests | |
# run: | | |
# forge test -vvv | |
# id: test | |
# - name: Get sizes of compiled contracts | |
# run: | | |
# forge --version | |
# forge build --sizes || true | |
# id: build-with-sizes |