Bump the actions group across 1 directory with 6 updates #452
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
| name: E2E | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - ".gitignore" | |
| - ".claude/**" | |
| - ".serena/**" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| - ".gitignore" | |
| - ".claude/**" | |
| - ".serena/**" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| SOLANA_VERSION: "2.3.13" | |
| ANCHOR_VERSION: "0.32.1" | |
| jobs: | |
| build-relayer: | |
| name: Build Relayer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@1.100.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: relayer-build | |
| - name: Build relayer binary | |
| run: cargo build -p mercury-cli --release | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: mercury-relayer | |
| path: target/release/mercury-relayer | |
| build-e2e-artifacts: | |
| name: Build E2E Artifacts | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@1.100.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: e2e-build | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| cache: true | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/cache@v6 | |
| id: sp1-cache | |
| with: | |
| path: | | |
| ~/.sp1 | |
| ~/.rustup/toolchains/succinct | |
| key: sp1-5.2.4 | |
| - name: Install SP1 toolchain | |
| if: steps.sp1-cache.outputs.cache-hit != 'true' | |
| run: | | |
| curl -L --retry 3 --retry-delay 5 https://sp1.succinct.xyz | bash | |
| for i in 1 2 3; do ~/.sp1/bin/sp1up --version 5.2.4 && break || sleep 5; done | |
| - name: Add SP1 to PATH | |
| run: echo "$HOME/.sp1/bin" >> "$GITHUB_PATH" | |
| - uses: actions/cache@v6 | |
| with: | |
| path: external/solidity-ibc-eureka/node_modules | |
| key: bun-${{ hashFiles('external/solidity-ibc-eureka/bun.lock') }} | |
| - name: Install Solidity dependencies | |
| run: for i in 1 2 3; do bun install --frozen-lockfile && break || sleep 5; done | |
| working-directory: external/solidity-ibc-eureka | |
| - name: Build SP1 programs | |
| run: cargo prove build | |
| working-directory: external/solidity-ibc-eureka/programs/sp1-programs | |
| env: | |
| CARGO_PROFILE_RELEASE_TRIM_PATHS: "false" | |
| - name: Install binaryen (wasm-opt) | |
| run: | | |
| curl -fsSL --retry 3 --retry-delay 5 https://github.com/WebAssembly/binaryen/releases/download/version_126/binaryen-version_126-x86_64-linux.tar.gz \ | |
| | sudo tar -xz -C /usr/local --strip-components=1 | |
| - name: Build mock WASM light client | |
| run: | | |
| rustup target add wasm32-unknown-unknown | |
| cargo build --target wasm32-unknown-unknown --release -p mock-wasm-eth-lc | |
| wasm-opt --llvm-memory-copy-fill-lowering -Os \ | |
| target/wasm32-unknown-unknown/release/mock_wasm_eth_lc.wasm \ | |
| -o target/wasm32-unknown-unknown/release/mock_wasm_eth_lc.optimized.wasm | |
| gzip -kf target/wasm32-unknown-unknown/release/mock_wasm_eth_lc.optimized.wasm | |
| cp target/wasm32-unknown-unknown/release/mock_wasm_eth_lc.optimized.wasm.gz \ | |
| e2e/mock-wasm-eth-lc/mock_wasm_eth_lc.wasm.gz | |
| - name: Build and archive tests | |
| run: cargo nextest archive --archive-file mercury-e2e.tar.zst --package mercury-e2e | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-archive | |
| path: mercury-e2e.tar.zst | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: sp1-elfs | |
| path: external/solidity-ibc-eureka/programs/sp1-programs/target/elf-compilation/riscv32im-succinct-zkvm-elf/release/sp1-ics07-tendermint-* | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: mock-wasm-eth-lc | |
| path: e2e/mock-wasm-eth-lc/mock_wasm_eth_lc.wasm.gz | |
| - name: Generate matrix | |
| id: matrix | |
| run: | | |
| matrix=$(python3 .github/scripts/generate-e2e-matrix.py mercury-e2e.tar.zst e2e-matrix.toml) | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| build-solana: | |
| name: Build Solana | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@1.100.0 | |
| - uses: solana-developers/github-actions/setup-all@v0.2.11 | |
| with: | |
| anchor_version: ${{ env.ANCHOR_VERSION }} | |
| solana_version: ${{ env.SOLANA_VERSION }} | |
| - uses: arduino/setup-protoc@v3 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: solana-build | |
| workspaces: external/solidity-ibc-eureka/programs/solana -> target | |
| - name: Build Solana programs | |
| run: anchor build | |
| working-directory: external/solidity-ibc-eureka/programs/solana | |
| - name: Prepare Solana program fixtures | |
| run: | | |
| mkdir -p solana-programs | |
| cp external/solidity-ibc-eureka/programs/solana/target/deploy/*.so solana-programs/ | |
| cp external/solidity-ibc-eureka/solana-keypairs/localnet/*-keypair.json solana-programs/ | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: solana-programs | |
| path: solana-programs/ | |
| e2e-test: | |
| name: E2E / ${{ matrix.binary }} / ${{ matrix.test }} | |
| needs: [build-relayer, build-e2e-artifacts, build-solana] | |
| if: needs.build-e2e-artifacts.outputs.matrix != '[]' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: ${{ matrix.timeout }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON(needs.build-e2e-artifacts.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: e2e-archive | |
| - uses: ./.github/actions/cosmos-setup | |
| if: contains(toJSON(matrix.setup), '"cosmos"') | |
| - uses: ./.github/actions/ethereum-setup | |
| if: contains(toJSON(matrix.setup), '"ethereum"') | |
| - uses: ./.github/actions/kurtosis-setup | |
| if: contains(toJSON(matrix.setup), '"kurtosis"') | |
| - uses: ./.github/actions/solana-setup | |
| if: contains(toJSON(matrix.setup), '"solana"') | |
| - name: Download Solana programs | |
| if: contains(toJSON(matrix.setup), '"solana"') | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: solana-programs | |
| path: solana-programs | |
| - name: Download SP1 ELFs | |
| if: contains(toJSON(matrix.setup), '"ethereum"') | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: sp1-elfs | |
| path: sp1-elfs | |
| - name: Download mock WASM light client | |
| if: contains(toJSON(matrix.setup), '"ethereum"') | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: mock-wasm-eth-lc | |
| path: e2e/mock-wasm-eth-lc | |
| - name: Download relayer binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: mercury-relayer | |
| path: . | |
| - name: Make relayer binary executable | |
| run: chmod +x mercury-relayer | |
| - name: Run test | |
| env: | |
| NEXTEST_PROFILE: ci | |
| MERCURY_RELAYER_BIN: ${{ github.workspace }}/mercury-relayer | |
| SP1_ELF_DIR: ${{ github.workspace }}/sp1-elfs | |
| SOLANA_PROGRAMS_DIR: ${{ github.workspace }}/solana-programs | |
| run: | | |
| cargo nextest run \ | |
| --archive-file mercury-e2e.tar.zst \ | |
| --workspace-remap . \ | |
| --run-ignored all \ | |
| -E 'binary(=${{ matrix.binary }}) & test(=${{ matrix.test }})' |