fix: Use separate snapshots for sequencer and validator workloads #583
This file contains hidden or 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
| # Go test workflow | |
| name: test | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| go-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: true | |
| - name: Set up Go | |
| uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1 | |
| with: | |
| go-version: 1.24 | |
| - name: Install project dependencies | |
| run: | | |
| go mod download | |
| - name: Lint Go | |
| uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 | |
| with: | |
| version: v2.0 | |
| go-test: | |
| outputs: | |
| COVERAGE: ${{ steps.unit.outputs.coverage }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1 | |
| with: | |
| go-version: 1.24 | |
| - name: Install project dependencies | |
| run: | | |
| go mod download | |
| - name: Run Unit Tests | |
| id: unit | |
| run: | | |
| go test -v -coverprofile=coverage.out ./... | |
| basic-benchmarks: | |
| runs-on: ubuntu-latest | |
| env: | |
| RETH_VERSION: 9d56da53ec0ad60e229456a0c70b338501d923a5 | |
| GETH_VERSION: 4bc345b22fbee14d3162becd197373a9565b7c6d | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1 | |
| with: | |
| go-version: 1.24 | |
| - name: Set up Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0 | |
| - name: Install project dependencies | |
| run: | | |
| go mod download | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0 | |
| - name: Cache binaries | |
| uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3 | |
| id: cache-bin | |
| with: | |
| path: ${{ runner.temp }}/bin | |
| key: ${{ runner.os }}-binaries-reth-${{ env.RETH_VERSION }}-geth-${{ env.GETH_VERSION }} | |
| - name: Build Contracts | |
| run: | | |
| forge build --force | |
| - name: Download geth and reth | |
| if: steps.cache-bin.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p ${{ runner.temp }}/bin | |
| git clone https://github.com/paradigmxyz/reth | |
| git -C reth checkout --force ${{ env.RETH_VERSION }} | |
| pushd reth | |
| cargo build --features asm-keccak,jemalloc --profile release --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml | |
| cp ./target/release/op-reth ${{ runner.temp }}/bin/reth | |
| popd | |
| chmod +x ${{ runner.temp }}/bin/reth | |
| git clone https://github.com/ethereum-optimism/op-geth | |
| git -C op-geth checkout --force ${{ env.GETH_VERSION }} | |
| pushd op-geth | |
| make geth | |
| cp ./build/bin/geth ${{ runner.temp }}/bin/geth | |
| chmod +x ${{ runner.temp }}/bin/geth | |
| popd | |
| echo "binaries compiled:" | |
| ls -la ${{ runner.temp }}/bin | |
| - name: Run examples | |
| id: op-program | |
| run: | | |
| curl https://mise.run | sh | |
| pushd op-program | |
| mise x -- ./build.sh | |
| popd | |
| ./.github/scripts/run-example-benchmarks.sh ${{ runner.temp }} |