chore: change destination upload directory for private fork #14785
Workflow file for this run
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: Test | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: full | |
| RUSTC_WRAPPER: "sccache" | |
| TEMPO_MAINNET_RPC_URL: ${{ secrets.TEMPO_MAINNET_RPC_URL }} | |
| TEMPO_TESTNET_RPC_URL: ${{ secrets.TEMPO_TESTNET_RPC_URL }} | |
| TEMPO_DEVNET_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }} | |
| jobs: | |
| check-precompiles: | |
| name: Check precompiles changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| coverage: ${{ steps.check.outputs.coverage }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Check for precompiles changes | |
| id: check | |
| env: | |
| EVENT_NAME: ${{ github.event_name }} | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| # Only run coverage on pull_request events when precompiles/contracts changed | |
| if [[ "$EVENT_NAME" != "pull_request" ]]; then | |
| echo "coverage=false" >> "$GITHUB_OUTPUT" | |
| echo "Skipping coverage: not a pull_request event (event: $EVENT_NAME)" | |
| elif git diff --name-only origin/"$BASE_REF"...HEAD | grep -qE '^(crates/(precompiles|contracts)/|tips/ref-impls/)'; then | |
| echo "coverage=true" >> "$GITHUB_OUTPUT" | |
| echo "Running coverage: precompiles/contracts changed" | |
| else | |
| echo "coverage=false" >> "$GITHUB_OUTPUT" | |
| echo "Skipping coverage: no precompiles/contracts changes" | |
| fi | |
| genesis: | |
| name: Genesis generation | |
| runs-on: depot-ubuntu-latest-4 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Generate genesis | |
| run: | | |
| cargo xtask generate-genesis \ | |
| --accounts 100 \ | |
| --no-dkg-in-genesis \ | |
| --output generated \ | |
| --coinbase 0xbba20Bb99dA4E103721B754b25071Fc85e7028A1 | |
| - name: Compare with existing test genesis | |
| run: | | |
| # Compare the generated genesis with the existing test-genesis.json | |
| if ! diff -u crates/node/tests/assets/test-genesis.json generated/genesis.json; then | |
| echo "Generated genesis differs from existing test-genesis.json" | |
| echo "Please update the test-genesis.json file with the generated content" | |
| exit 1 | |
| else | |
| echo "Generated genesis matches test-genesis.json" | |
| fi | |
| test: | |
| name: test (${{ matrix.partition }}/2) | |
| needs: check-precompiles | |
| runs-on: depot-ubuntu-latest-32 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| partition: [1, 2] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: ${{ needs.check-precompiles.outputs.coverage == 'true' && 'llvm-tools-preview' || '' }} | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - uses: taiki-e/install-action@3f67faa728964808f52294a9cd15561b15550b28 # v2.67.19 | |
| with: | |
| tool: nextest@0.9.124 | |
| # Build and run tests WITH coverage (only when precompiles changed) | |
| - name: Build and compile tests with coverage | |
| if: needs.check-precompiles.outputs.coverage == 'true' | |
| run: cargo nextest run --profile ci -E 'not (package(tempo-e2e) | (package(tempo-node) & binary(it) & test(/test_matrices_(testnet|devnet)/)))' --partition count:${{ matrix.partition }}/2 --no-run | |
| env: | |
| RUSTFLAGS: -C instrument-coverage | |
| - name: Run tests with coverage | |
| if: needs.check-precompiles.outputs.coverage == 'true' | |
| run: | | |
| mkdir -p coverage | |
| cargo nextest run --profile ci -E 'not (package(tempo-e2e) | (package(tempo-node) & binary(it) & test(/test_matrices_(testnet|devnet)/)))' --partition count:${{ matrix.partition }}/2 | |
| env: | |
| RUSTFLAGS: -C instrument-coverage | |
| LLVM_PROFILE_FILE: ${{ github.workspace }}/coverage/cargo-%p-%m.profraw | |
| # Build and run tests WITHOUT coverage (when precompiles not changed) | |
| - name: Build and compile tests | |
| if: needs.check-precompiles.outputs.coverage != 'true' | |
| run: cargo nextest run --profile ci -E 'not (package(tempo-e2e) | (package(tempo-node) & binary(it) & test(/test_matrices_(testnet|devnet)/)))' --partition count:${{ matrix.partition }}/2 --no-run | |
| - name: Run tests | |
| if: needs.check-precompiles.outputs.coverage != 'true' | |
| run: cargo nextest run --profile ci -E 'not (package(tempo-e2e) | (package(tempo-node) & binary(it) & test(/test_matrices_(testnet|devnet)/)))' --partition count:${{ matrix.partition }}/2 | |
| - name: Generate precompiles coverage profdata | |
| if: needs.check-precompiles.outputs.coverage == 'true' | |
| run: | | |
| LLVM_BIN="$(rustc --print sysroot)/lib/rustlib/$(rustc -vV | grep host | cut -d' ' -f2)/bin" | |
| "$LLVM_BIN/llvm-profdata" merge -sparse coverage/*.profraw -o coverage/cargo-test.profdata | |
| mkdir -p coverage/precompiles-bin | |
| # Copy precompiles and contracts test binaries | |
| find target/debug/deps -name 'tempo_precompiles-*' -type f -executable ! -name '*.d' -exec cp {} coverage/precompiles-bin/ \; | |
| find target/debug/deps -name 'tempo_contracts-*' -type f -executable ! -name '*.d' -exec cp {} coverage/precompiles-bin/ \; | |
| - name: Upload precompiles coverage artifacts | |
| if: needs.check-precompiles.outputs.coverage == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cargo-test-coverage-${{ matrix.partition }} | |
| path: | | |
| coverage/cargo-test.profdata | |
| coverage/precompiles-bin/ | |
| retention-days: 1 | |
| e2e: | |
| name: e2e (${{ matrix.partition }}/3) | |
| runs-on: depot-ubuntu-latest-32 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| partition: [1, 2, 3] | |
| env: | |
| # Set to 8 MiB because some tests run into stack overflows with jemalloc | |
| RUST_MIN_STACK: 8388608 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - uses: taiki-e/install-action@3f67faa728964808f52294a9cd15561b15550b28 # v2.67.19 | |
| with: | |
| tool: nextest@0.9.124 | |
| - name: Build e2e tests | |
| run: cargo nextest run --profile ci -E 'package(tempo-e2e)' --partition count:${{ matrix.partition }}/3 --no-run | |
| - name: Run e2e tests | |
| run: cargo nextest run --profile ci -E 'package(tempo-e2e)' --partition count:${{ matrix.partition }}/3 | |
| e2e-flaky: | |
| name: e2e-flaky | |
| runs-on: depot-ubuntu-latest-32 | |
| timeout-minutes: 30 | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| env: | |
| RUST_MIN_STACK: 8388608 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - uses: taiki-e/install-action@3f67faa728964808f52294a9cd15561b15550b28 # v2.67.19 | |
| with: | |
| tool: nextest@0.9.124 | |
| - name: Build flaky e2e tests | |
| run: cargo nextest run --profile ci-flaky --no-run | |
| - name: Run flaky e2e tests | |
| run: cargo nextest run --profile ci-flaky | |
| cli: | |
| name: CLI smoke tests | |
| runs-on: depot-ubuntu-latest-4 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Build tempo | |
| run: cargo build --bin tempo | |
| - name: Run CLI tests | |
| run: ./scripts/test-cli.sh | |
| msrv: | |
| name: MSRV | |
| runs-on: depot-ubuntu-latest-4 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.93" # MSRV | |
| - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - name: Build with MSRV | |
| run: cargo build --bin tempo | |
| env: | |
| RUSTFLAGS: -D warnings | |
| test-success: | |
| name: test success | |
| runs-on: ubuntu-latest | |
| if: always() | |
| permissions: {} | |
| needs: | |
| - check-precompiles | |
| - test | |
| - e2e | |
| - cli | |
| - msrv | |
| - genesis | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |