From 6b03bd849e311fb8186abf0be18d3bd7a0ee5b70 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:10:12 +0200 Subject: [PATCH 01/15] Try adding a new job for comparison --- .github/workflows/basic-optimized.yml | 189 ++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 .github/workflows/basic-optimized.yml diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml new file mode 100644 index 000000000..acb440511 --- /dev/null +++ b/.github/workflows/basic-optimized.yml @@ -0,0 +1,189 @@ +on: [pull_request] + +name: Basic Checks + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + RUST_VERSION: 1.88.0 + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + CARGO_TERM_COLOR: always + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" + RUST_BACKTRACE: short + # Combine all test env vars here + WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" + WAVS_CLI_EVM_CREDENTIAL: "test test test test test test test test test test test junk" + WAVS_AGGREGATOR_CREDENTIAL: "test test test test test test test test test test test junk" + WAVS_COSMOS_SUBMISSION_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" + WAVS_CLI_COSMOS_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" + +jobs: + # Quick checks first - fail fast + formatting: + name: Formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + components: rustfmt + + - name: Check formatting + run: cargo fmt --all -- --check + + # Linting in parallel with tests + linting: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Rust and lld + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_VERSION }} + sudo apt-get update && sudo apt-get install -y lld + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v1-rust" + shared-key: "clippy" + cache-targets: false + cache-on-failure: true + + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.6 + + - name: Run clippy + env: + RUSTC_WRAPPER: sccache + run: cargo clippy --all-targets --all-features + + # Split tests for parallelization + test-matrix: + name: Tests - ${{ matrix.package }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: + - wavs + - engine + - aggregator + - cli + - utils + - types + - dev-tool + - layer-tests + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y lld + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v1-rust" + shared-key: "test-${{ matrix.package }}" + cache-on-failure: true + + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.6 + + - name: Install Foundry (if needed) + if: matrix.package == 'layer-tests' || matrix.package == 'wavs' + uses: foundry-rs/foundry-toolchain@v1 + with: + cache: true + + - name: Run tests + env: + RUSTC_WRAPPER: sccache + RUST_LOG: info + run: | + cargo test -p ${{ matrix.package }} --locked -- --nocapture + + # Workspace-wide test as safety net + test-workspace: + name: Integration Tests + runs-on: ubuntu-latest + needs: [formatting] # Only after quick checks + steps: + - uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y lld + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v1-rust" + shared-key: "test-workspace" + cache-on-failure: true + + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.6 + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + cache: true + + - name: Run workspace tests + env: + RUSTC_WRAPPER: sccache + RUST_LOG: info + run: | + # Run only integration tests that span multiple packages + cargo test --workspace --locked -- --ignored --nocapture + + # Build check for WASM targets + build-wasm: + name: Build WASM + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + targets: wasm32-unknown-unknown + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + prefix-key: "v1-rust" + shared-key: "wasm" + cache-targets: false + cache-on-failure: true + + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.6 + + - name: Check WASM build + env: + RUSTC_WRAPPER: sccache + run: | + cargo check --target wasm32-unknown-unknown -p wavs-types From 08aef1b4d34b6f684163fddeaec5130c7e84f649 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:14:51 +0200 Subject: [PATCH 02/15] Use proper package names --- .github/workflows/basic-optimized.yml | 10 +-- .github/workflows/basic.yml | 103 -------------------------- 2 files changed, 5 insertions(+), 108 deletions(-) delete mode 100644 .github/workflows/basic.yml diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index acb440511..09e0384b1 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -74,12 +74,12 @@ jobs: matrix: package: - wavs - - engine - - aggregator - - cli + - wavs-engine + - wavs-aggregator + - wavs-cli - utils - - types - - dev-tool + - wavs-types + - wavs-dev-tools - layer-tests steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml deleted file mode 100644 index 7837e1af6..000000000 --- a/.github/workflows/basic.yml +++ /dev/null @@ -1,103 +0,0 @@ -# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml - -on: [pull_request] - -name: Basic Checks - -# Ensures that only a single workflow per PR will run at a time. -# Cancels in-progress jobs if new commit is pushed. -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - GO_VERSION: 1.21 - -# TODO: perform other tests on wasi examples -jobs: - test: - name: Wavs Test Suite - runs-on: linux-8-core - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.88.0 - # target: wasm32-unknown-unknown - override: true - - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - with: - key: test - cache-on-failure: "true" - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Set env - run: echo "WAVS_SUBMISSION_MNEMONIC=\"test test test test test test test test test test test junk\"" >> $GITHUB_ENV - - - name: Set env - run: echo "WAVS_CLI_EVM_CREDENTIAL=\"test test test test test test test test test test test junk\"" >> $GITHUB_ENV - - - name: Set env - run: echo "WAVS_AGGREGATOR_CREDENTIAL=\"test test test test test test test test test test test junk\"" >> $GITHUB_ENV - - - name: Set env - run: echo "WAVS_COSMOS_SUBMISSION_MNEMONIC=\"reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff\"" >> $GITHUB_ENV - - - name: Set env - run: echo "WAVS_CLI_COSMOS_MNEMONIC=\"reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff\"" >> $GITHUB_ENV - - - name: Run tests - uses: actions-rs/cargo@v1 - with: - toolchain: 1.88.0 - command: test - args: --workspace --locked -- --nocapture - env: - RUST_BACKTRACE: 1 - RUST_LOG: info - - lints: - name: Lints - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.88.0 - override: true - components: rustfmt, clippy - - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - with: - key: lint - cache-on-failure: "true" - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - toolchain: 1.88.0 - command: fmt - args: --all -- --check - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - toolchain: 1.88.0 - command: clippy - args: --all-targets -- -D warnings From b47c88cee0446a2e5b751562624f62ae93369ecd Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:24:10 +0200 Subject: [PATCH 03/15] Simplify the optimized job --- .github/workflows/basic-optimized.yml | 166 ++++---------------------- 1 file changed, 21 insertions(+), 145 deletions(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index 09e0384b1..50e6c4dd5 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -9,11 +9,7 @@ concurrency: env: RUST_VERSION: 1.88.0 CARGO_INCREMENTAL: 0 - CARGO_NET_RETRY: 10 - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" RUST_BACKTRACE: short - # Combine all test env vars here WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" WAVS_CLI_EVM_CREDENTIAL: "test test test test test test test test test test test junk" WAVS_AGGREGATOR_CREDENTIAL: "test test test test test test test test test test test junk" @@ -21,169 +17,49 @@ env: WAVS_CLI_COSMOS_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" jobs: - # Quick checks first - fail fast - formatting: - name: Formatting + test: + name: Test Suite runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - components: rustfmt - - - name: Check formatting - run: cargo fmt --all -- --check - - # Linting in parallel with tests - linting: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust and lld - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ env.RUST_VERSION }} - sudo apt-get update && sudo apt-get install -y lld - - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "v1-rust" - shared-key: "clippy" - cache-targets: false - cache-on-failure: true - - - name: Install sccache - uses: mozilla-actions/sccache-action@v0.0.6 - - - name: Run clippy - env: - RUSTC_WRAPPER: sccache - run: cargo clippy --all-targets --all-features - - # Split tests for parallelization - test-matrix: - name: Tests - ${{ matrix.package }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - package: - - wavs - - wavs-engine - - wavs-aggregator - - wavs-cli - - utils - - wavs-types - - wavs-dev-tools - - layer-tests - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y lld - + - name: Install Rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} - - - name: Cache Rust dependencies + + - name: Cache dependencies uses: Swatinem/rust-cache@v2 with: - prefix-key: "v1-rust" - shared-key: "test-${{ matrix.package }}" cache-on-failure: true - - - name: Install sccache - uses: mozilla-actions/sccache-action@v0.0.6 - - - name: Install Foundry (if needed) - if: matrix.package == 'layer-tests' || matrix.package == 'wavs' - uses: foundry-rs/foundry-toolchain@v1 - with: - cache: true - - - name: Run tests - env: - RUSTC_WRAPPER: sccache - RUST_LOG: info - run: | - cargo test -p ${{ matrix.package }} --locked -- --nocapture - - # Workspace-wide test as safety net - test-workspace: - name: Integration Tests - runs-on: ubuntu-latest - needs: [formatting] # Only after quick checks - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y lld - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "v1-rust" - shared-key: "test-workspace" - cache-on-failure: true - - - name: Install sccache - uses: mozilla-actions/sccache-action@v0.0.6 - + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - cache: true - - - name: Run workspace tests + + - name: Run tests + run: cargo test --workspace --locked -- --nocapture env: - RUSTC_WRAPPER: sccache RUST_LOG: info - run: | - # Run only integration tests that span multiple packages - cargo test --workspace --locked -- --ignored --nocapture - # Build check for WASM targets - build-wasm: - name: Build WASM + lint: + name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} - targets: wasm32-unknown-unknown - - - name: Cache Rust dependencies + components: rustfmt, clippy + + - name: Cache dependencies uses: Swatinem/rust-cache@v2 with: - prefix-key: "v1-rust" - shared-key: "wasm" - cache-targets: false cache-on-failure: true - - - name: Install sccache - uses: mozilla-actions/sccache-action@v0.0.6 - - - name: Check WASM build - env: - RUSTC_WRAPPER: sccache - run: | - cargo check --target wasm32-unknown-unknown -p wavs-types + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-targets -- -D warnings \ No newline at end of file From 3da281c37d4cc65c57db29162baf32fe2f00bdb6 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:38:27 +0200 Subject: [PATCH 04/15] rename new job --- .github/workflows/basic-optimized.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index 50e6c4dd5..a623fc2be 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -1,6 +1,6 @@ on: [pull_request] -name: Basic Checks +name: Basic Checks (Optimized) concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -22,20 +22,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} - + - name: Cache dependencies uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - + - name: Run tests run: cargo test --workspace --locked -- --nocapture env: @@ -46,20 +46,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} components: rustfmt, clippy - + - name: Cache dependencies uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - + - name: Check formatting run: cargo fmt --all -- --check - + - name: Run clippy - run: cargo clippy --all-targets -- -D warnings \ No newline at end of file + run: cargo clippy --all-targets -- -D warnings From ed26ab6b9d5d86b73b35413143e6157e57934479 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:46:49 +0200 Subject: [PATCH 05/15] Try to parallel the jobs --- .github/workflows/basic-optimized.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index a623fc2be..c25f67281 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -17,9 +17,26 @@ env: WAVS_CLI_COSMOS_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" jobs: + get-packages: + name: Get workspace packages + runs-on: ubuntu-latest + outputs: + packages: ${{ steps.packages.outputs.packages }} + steps: + - uses: actions/checkout@v4 + - id: packages + run: | + PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.workspace_members[] | split(" ")[0]]') + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT + test: - name: Test Suite + name: Test ${{ matrix.package }} + needs: get-packages runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: ${{ fromJson(needs.get-packages.outputs.packages) }} steps: - uses: actions/checkout@v4 @@ -32,12 +49,13 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + prefix-key: v0-${{ matrix.package }} - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - name: Run tests - run: cargo test --workspace --locked -- --nocapture + run: cargo test -p ${{ matrix.package }} --locked -- --nocapture env: RUST_LOG: info From 12bad33ea3af32deb076750b65fee0a975ea54ff Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:51:32 +0200 Subject: [PATCH 06/15] Test only packages --- .github/workflows/basic-optimized.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index c25f67281..0ba4227bf 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - id: packages run: | - PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.workspace_members[] | split(" ")[0]]') + PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.workspace_members[] | select(contains("packages/")) | split(" ")[0] | split("#")[0] | split("/") | .[-1]]') echo "packages=$PACKAGES" >> $GITHUB_OUTPUT test: From 4e3d408542907512910eaf861ee14cee795054e0 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 19:54:20 +0200 Subject: [PATCH 07/15] Use actual package names --- .github/workflows/basic-optimized.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index 0ba4227bf..c0c71b5bb 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - id: packages run: | - PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.workspace_members[] | select(contains("packages/")) | split(" ")[0] | split("#")[0] | split("/") | .[-1]]') + PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.packages[] | select(.manifest_path | contains("/packages/")) | .name]') echo "packages=$PACKAGES" >> $GITHUB_OUTPUT test: From a20bc5f6fbdafce48fe0c66c9ea946cf66a1fa3c Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 20:35:22 +0200 Subject: [PATCH 08/15] Build deps first --- .github/workflows/basic-optimized.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index c0c71b5bb..3dad180fd 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -54,6 +54,9 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + - name: Build dependencies + run: cargo build --workspace --all-targets --locked + - name: Run tests run: cargo test -p ${{ matrix.package }} --locked -- --nocapture env: From d5d85e3a999c3cb9c52e5a338a5b021bfc8e5799 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 20:58:30 +0200 Subject: [PATCH 09/15] Remove step building deps and use shared cache --- .github/workflows/basic-optimized.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic-optimized.yml index 3dad180fd..3c52820b2 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic-optimized.yml @@ -49,14 +49,11 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - prefix-key: v0-${{ matrix.package }} + shared-key: "v0-workspace" - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - - name: Build dependencies - run: cargo build --workspace --all-targets --locked - - name: Run tests run: cargo test -p ${{ matrix.package }} --locked -- --nocapture env: From 141f6c33bb0b57aa32e1b6ca081b472d3b7af3a5 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 21:20:21 +0200 Subject: [PATCH 10/15] Bring back simple approach --- .../{basic-optimized.yml => basic.yml} | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 deletions(-) rename .github/workflows/{basic-optimized.yml => basic.yml} (71%) diff --git a/.github/workflows/basic-optimized.yml b/.github/workflows/basic.yml similarity index 71% rename from .github/workflows/basic-optimized.yml rename to .github/workflows/basic.yml index 3c52820b2..f4a038fa5 100644 --- a/.github/workflows/basic-optimized.yml +++ b/.github/workflows/basic.yml @@ -10,6 +10,8 @@ env: RUST_VERSION: 1.88.0 CARGO_INCREMENTAL: 0 RUST_BACKTRACE: short + CARGO_TERM_COLOR: always + RUSTFLAGS: "-C link-arg=-fuse-ld=lld" WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" WAVS_CLI_EVM_CREDENTIAL: "test test test test test test test test test test test junk" WAVS_AGGREGATOR_CREDENTIAL: "test test test test test test test test test test test junk" @@ -17,29 +19,17 @@ env: WAVS_CLI_COSMOS_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" jobs: - get-packages: - name: Get workspace packages - runs-on: ubuntu-latest - outputs: - packages: ${{ steps.packages.outputs.packages }} - steps: - - uses: actions/checkout@v4 - - id: packages - run: | - PACKAGES=$(cargo metadata --no-deps --format-version 1 | jq -c '[.packages[] | select(.manifest_path | contains("/packages/")) | .name]') - echo "packages=$PACKAGES" >> $GITHUB_OUTPUT - test: - name: Test ${{ matrix.package }} - needs: get-packages - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - package: ${{ fromJson(needs.get-packages.outputs.packages) }} + name: Test Suite + runs-on: linux-8-core steps: - uses: actions/checkout@v4 + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y lld + - name: Install Rust uses: dtolnay/rust-toolchain@master with: @@ -49,19 +39,22 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - shared-key: "v0-workspace" + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + - name: Build tests first + run: cargo test --workspace --no-run --locked + - name: Run tests - run: cargo test -p ${{ matrix.package }} --locked -- --nocapture + run: cargo test --workspace --locked -- --nocapture --test-threads=4 env: RUST_LOG: info lint: name: Lint - runs-on: ubuntu-latest + runs-on: linux-8-core steps: - uses: actions/checkout@v4 From 8a4e16e57f82cdafed547b5c13e46e5b669cd0d9 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 21:35:14 +0200 Subject: [PATCH 11/15] Remove lld and env rust version --- .github/workflows/basic.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index f4a038fa5..1e5611849 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -11,7 +11,6 @@ env: CARGO_INCREMENTAL: 0 RUST_BACKTRACE: short CARGO_TERM_COLOR: always - RUSTFLAGS: "-C link-arg=-fuse-ld=lld" WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" WAVS_CLI_EVM_CREDENTIAL: "test test test test test test test test test test test junk" WAVS_AGGREGATOR_CREDENTIAL: "test test test test test test test test test test test junk" @@ -25,11 +24,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y lld - - name: Install Rust uses: dtolnay/rust-toolchain@master with: From 5e7fdb2e5b842805542ae5fd2313b61818734252 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 21:55:31 +0200 Subject: [PATCH 12/15] Remove env rust version --- .github/workflows/basic.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 1e5611849..eedbfe24f 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -7,7 +7,6 @@ concurrency: cancel-in-progress: true env: - RUST_VERSION: 1.88.0 CARGO_INCREMENTAL: 0 RUST_BACKTRACE: short CARGO_TERM_COLOR: always @@ -27,13 +26,12 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.RUST_VERSION }} + toolchain: 1.88.0 - name: Cache dependencies uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -55,7 +53,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.RUST_VERSION }} + toolchain: 1.88.0 components: rustfmt, clippy - name: Cache dependencies From 80b7d429b2be969749fc9d3de23f449904c5bf08 Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 23:38:47 +0200 Subject: [PATCH 13/15] Rerun to trigger cache --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index eedbfe24f..23933fe69 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -7,7 +7,7 @@ concurrency: cancel-in-progress: true env: - CARGO_INCREMENTAL: 0 + CARGO_INCREMENTAL: true RUST_BACKTRACE: short CARGO_TERM_COLOR: always WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" From 9c9ac41e996a518a44443ab15c3d20e7056ff50e Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 23:40:10 +0200 Subject: [PATCH 14/15] disable incremental --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 23933fe69..eedbfe24f 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -7,7 +7,7 @@ concurrency: cancel-in-progress: true env: - CARGO_INCREMENTAL: true + CARGO_INCREMENTAL: 0 RUST_BACKTRACE: short CARGO_TERM_COLOR: always WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" From 3d01839ad6adf0e08873e1fdbcc32e4e2cb6e56d Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 18 Sep 2025 23:58:13 +0200 Subject: [PATCH 15/15] One more try and bring back the original name --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index eedbfe24f..a9dd8aba4 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -1,6 +1,6 @@ on: [pull_request] -name: Basic Checks (Optimized) +name: Basic Checks concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}