This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Transient Storage Support #4070
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: Integration Tests | |
on: | |
merge_group: | |
schedule: | |
- cron: '50 1 * * SUN' | |
pull_request: | |
types: [synchronize, labeled] | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
provertype: | |
description: 'invoke real vs mock prover (with or without root)' | |
required: true | |
default: 'sub_mock_prover' | |
type: choice | |
options: | |
- sub_real_prover | |
- sub_mock_prover | |
- root_mock_prover | |
- root_real_prover | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
set-outputs: | |
if: github.event_name == 'schedule' || | |
github.event_name == 'push' || | |
github.event_name == 'workflow_dispatch' || | |
contains(github.event.pull_request.labels.*.name, 'trigger-integration-tests') | |
runs-on: ubuntu-latest | |
outputs: | |
instancetype: ${{ steps.set-outputs.outputs.instancetype }} | |
provertype: ${{ steps.set-outputs.outputs.provertype }} | |
steps: | |
- id: set-outputs | |
name: Select instance and prover type | |
run: | | |
if [ "${{ github.event.inputs.provertype }}" = "root_real_prover" ] || [ "${{ github.event_name }}" = "schedule" ]; then | |
echo "instancetype=r6i.32xlarge" >> "$GITHUB_OUTPUT" | |
echo "provertype=root_real_prover" >> "$GITHUB_OUTPUT" | |
elif [ "${{ github.event.inputs.provertype }}" = "root_mock_prover" ]; then | |
echo "instancetype=r6i.32xlarge" >> "$GITHUB_OUTPUT" | |
echo "provertype=root_mock_prover" >> "$GITHUB_OUTPUT" | |
elif [ "${{ github.event.inputs.provertype }}" = "sub_real_prover" ]; then | |
echo "instancetype=r6i.32xlarge" >> "$GITHUB_OUTPUT" | |
echo "provertype=sub_real_prover" >> "$GITHUB_OUTPUT" | |
elif [ "${{ github.event.inputs.provertype }}" = "sub_mock_prover" ] || [ -z ${{ github.event.inputs.provertype }} ]; then | |
echo "instancetype=c5.9xlarge" >> "$GITHUB_OUTPUT" | |
echo "provertype=sub_mock_prover" >> "$GITHUB_OUTPUT" | |
else | |
exit 1 | |
fi | |
integration-tests: | |
if: github.event.pull_request.draft == false | |
name: Integration Tests | |
runs-on: ["${{github.run_id}}", self-hosted, "${{needs.set-outputs.outputs.instancetype}}"] | |
needs: set-outputs | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
override: false | |
- name: Setup golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ~1.21 | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Update git submodule | |
run: git submodule update --init --recursive --checkout integration-tests/contracts/vendor/openzeppelin-contracts | |
- name: Install openssl | |
run: sudo apt-get install -y pkg-config libssl-dev | |
# Run an initial build in a separate step to split the build time from execution time | |
- name: Build bins | |
run: cargo build --bin gen_blockchain_data | |
- name: Build tests | |
run: for testname in rpc circuit_input_builder circuits; do cargo test --profile release --test $testname --features $testname --no-run; done | |
- run: ./run.sh --steps "setup" | |
working-directory: integration-tests | |
- run: ./run.sh --steps "gendata" | |
working-directory: integration-tests | |
- run: ./run.sh --steps "tests" --tests "rpc" | |
working-directory: integration-tests | |
- run: ./run.sh --steps "tests" --tests "circuit_input_builder" | |
working-directory: integration-tests | |
- run: RUST_TEST_THREADS=1 ./run.sh --steps "tests" --tests "circuits::${{ needs.set-outputs.outputs.provertype }}" | |
working-directory: integration-tests | |
- run: ./run.sh --steps "cleanup" | |
working-directory: integration-tests |