From 0b7b50980848e63ea5ca965809b910ab0e04bf0e Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 15:20:02 -0700 Subject: [PATCH 01/16] Attempt to cache --- .github/workflows/test.yml | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..d45ef90d4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,80 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: ["*"] + tags: ["*"] + +env: + CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness + CARGO_NET_RETRY: 10 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings" + RUSTUP_MAX_RETRIES: 10 + +jobs: + + build: + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-build + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Rust install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Build + run: cargo build --all --release + + fmt: + needs: build + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-fmt + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Rust install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Check formatting + run: cargo fmt -- --check From b2d24a2a201bf9cbea93142d982a873ca313d1b5 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 15:20:52 -0700 Subject: [PATCH 02/16] Rename workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d45ef90d4..71a3684b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI +name: TESTS on: pull_request: From 77d622412679e2a8bd44f83c16e79fb60056432d Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 15:41:41 -0700 Subject: [PATCH 03/16] Add tests and clippy --- .github/workflows/test.yml | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 71a3684b3..54388ff9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,3 +78,80 @@ jobs: - name: Check formatting run: cargo fmt -- --check + clippy: + needs: build + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-clippy + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Rust install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Clippy + run: cargo clippy --all-targets -- -Dclippy::all -D warnings + + tests: + needs: build + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-tests + cancel-in-progress: true + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Rust install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Run unit and integration tests + env: + DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" + run: cargo test -r -- --include-ignored \ No newline at end of file From 466c7210f98c909e60a9cbf927100e0fb2943238 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 15:59:46 -0700 Subject: [PATCH 04/16] tests in parallel --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54388ff9c..e094791d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,8 +113,12 @@ jobs: tests: needs: build runs-on: oracles-20.04 + strategy: + fail-fast: false + matrix: + package: [boost_manager,custom_tracing,db_store,denylist,file_store,ingest,iot_config,iot_config,iot_packet_verifier,iot_verifier,metrics,mobile_config,mobile_config_cli,mobile_packet_verifier,mobile_verifier,poc_entropy,price,reward_index,reward_scheduler,solana,task_manager] concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-tests + group: ${{ github.workflow }}-${{ github.ref }}-tests-${{ matrix.package }} cancel-in-progress: true services: postgres: @@ -154,4 +158,4 @@ jobs: - name: Run unit and integration tests env: DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -r -- --include-ignored \ No newline at end of file + run: cargo test -r -p ${{ matrix.package }} -- --include-ignored \ No newline at end of file From c3e5900b8e0feccbfa0a456ba24909c9b79b1539 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 16:09:24 -0700 Subject: [PATCH 05/16] Fix package names --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e094791d5..dc8d3b5f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: false matrix: - package: [boost_manager,custom_tracing,db_store,denylist,file_store,ingest,iot_config,iot_config,iot_packet_verifier,iot_verifier,metrics,mobile_config,mobile_config_cli,mobile_packet_verifier,mobile_verifier,poc_entropy,price,reward_index,reward_scheduler,solana,task_manager] + package: [boost-manager,custom-tracing,db-store,denylist,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,metrics,mobile-config,mobile-config-cli,mobile-packet-verifier,mobile-verifier,poc-entropy,price,reward-index,reward-scheduler,solana,task-manager] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-tests-${{ matrix.package }} cancel-in-progress: true From 995b350b3d229d852d2f9df102b258cca796aa1f Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 19:55:51 -0700 Subject: [PATCH 06/16] Remove metrics and build tests in build step --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc8d3b5f4..81ff92512 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build - run: cargo build --all --release + run: cargo build --all --release --tests fmt: needs: build @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: false matrix: - package: [boost-manager,custom-tracing,db-store,denylist,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,metrics,mobile-config,mobile-config-cli,mobile-packet-verifier,mobile-verifier,poc-entropy,price,reward-index,reward-scheduler,solana,task-manager] + package: [boost-manager,custom-tracing,db-store,denylist,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,mobile-config,mobile-config-cli,mobile-packet-verifier,mobile-verifier,poc-entropy,price,reward-index,reward-scheduler,solana,task-manager] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-tests-${{ matrix.package }} cancel-in-progress: true From 2e58861bac67f4774f5f3c25bc5ba1eec7388064 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 20:24:29 -0700 Subject: [PATCH 07/16] Release in own step --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81ff92512..9fa7e1635 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build - run: cargo build --all --release --tests + run: cargo build --all --tests fmt: needs: build @@ -158,4 +158,35 @@ jobs: - name: Run unit and integration tests env: DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -r -p ${{ matrix.package }} -- --include-ignored \ No newline at end of file + run: cargo test -r -p ${{ matrix.package }} -- --include-ignored + release: + needs: build + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-clippy + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Rust install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Build + run: cargo build --all --release \ No newline at end of file From f5f3f94c46852cedfcf462480780bfc815cefdb1 Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 22:12:20 -0700 Subject: [PATCH 08/16] Do not run test in release mode --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9fa7e1635..51c101054 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -158,7 +158,7 @@ jobs: - name: Run unit and integration tests env: DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -r -p ${{ matrix.package }} -- --include-ignored + run: cargo test -p ${{ matrix.package }} -- --include-ignored release: needs: build runs-on: oracles-20.04 From b16e6e229d5430e1ab6bac95267e75ccd408974e Mon Sep 17 00:00:00 2001 From: Macpie Date: Mon, 6 May 2024 22:22:50 -0700 Subject: [PATCH 09/16] fix concurency group --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51c101054..658538f34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,7 +163,7 @@ jobs: needs: build runs-on: oracles-20.04 concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-clippy + group: ${{ github.workflow }}-${{ github.ref }}-release cancel-in-progress: true steps: - name: Checkout From f53f8379a62f263c7860ed91112782057643cbba Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 09:35:09 -0700 Subject: [PATCH 10/16] Rename files and setup CI to run on test success --- .github/workflows/CI.yml | 55 ++++++++++++++++++ .github/workflows/{test.yml => Tests.yml} | 4 +- .github/workflows/rust.yml | 71 ----------------------- 3 files changed, 57 insertions(+), 73 deletions(-) create mode 100644 .github/workflows/CI.yml rename .github/workflows/{test.yml => Tests.yml} (99%) delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000..2c5e6a9f2 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,55 @@ +name: CI + +on: + workflow_run: + workflows: [Tests] + types: [completed] + +env: + CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness + CARGO_NET_RETRY: 10 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings" + RUSTUP_MAX_RETRIES: 10 + +jobs: + on-failure: + runs-on: oracles-20.04 + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - run: echo 'The triggering workflow failed' + on-success: + runs-on: oracles-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-build-release + cancel-in-progress: true + if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler + + - name: 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: Build Release + run: cargo build --all --release + + - name: Debian packaging + env: + PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }} + run: | + chmod +x ./.github/scripts/make_debian.sh + ./.github/scripts/make_debian.sh diff --git a/.github/workflows/test.yml b/.github/workflows/Tests.yml similarity index 99% rename from .github/workflows/test.yml rename to .github/workflows/Tests.yml index 658538f34..8d14f164b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/Tests.yml @@ -1,10 +1,10 @@ -name: TESTS +name: Tests on: pull_request: branches: [main] push: - branches: ["*"] + branches: ["main"] tags: ["*"] env: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index c141ecc9e..000000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: CI - -on: - pull_request: - branches: [main] - push: - branches: [main] - tags: ["*"] - -env: - CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness - CARGO_NET_RETRY: 10 - RUST_BACKTRACE: short - RUSTFLAGS: "-D warnings" - RUSTUP_MAX_RETRIES: 10 - -jobs: - build: - runs-on: oracles-20.04 - - services: - postgres: - image: postgres - env: - POSTGRES_PASSWORD: postgres - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - - name: Install protoc - run: sudo apt-get install -y protobuf-compiler - - - name: Setup cache - uses: Swatinem/rust-cache@v2 - - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - - - name: Build - run: cargo build --all --release - - - name: Check formatting - run: cargo fmt -- --check - - - name: Clippy - run: cargo clippy --all-targets -- -Dclippy::all -D warnings - - - name: Run unit and integration tests - env: - DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -r -- --include-ignored - - - name: Debian packaging - if: contains(github.ref, 'refs/tags/') - env: - PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }} - run: | - chmod +x ./.github/scripts/make_debian.sh - ./.github/scripts/make_debian.sh From 72cc91f096d480c7613c8e32c931604262f9fdfb Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 10:01:52 -0700 Subject: [PATCH 11/16] Use actions/cache@v4 & remove release in tests --- .github/workflows/CI.yml | 4 ++-- .github/workflows/Tests.yml | 41 +++++-------------------------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2c5e6a9f2..4064d2f0e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }}-build-release cancel-in-progress: true - if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/') + if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/') steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable @@ -34,7 +34,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 8d14f164b..df6c04a67 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -34,7 +34,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -66,7 +66,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -97,7 +97,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -145,7 +145,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -158,35 +158,4 @@ jobs: - name: Run unit and integration tests env: DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres" - run: cargo test -p ${{ matrix.package }} -- --include-ignored - release: - needs: build - runs-on: oracles-20.04 - concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-release - cancel-in-progress: true - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Rust install - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - - name: Install protoc - run: sudo apt-get install -y protobuf-compiler - - - name: 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: Build - run: cargo build --all --release \ No newline at end of file + run: cargo test -p ${{ matrix.package }} -- --include-ignored \ No newline at end of file From 44a2351f3a10717c7349b2156486bfd06513d8ce Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 12:50:54 -0700 Subject: [PATCH 12/16] Try diff runner --- .github/workflows/Tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index df6c04a67..87ab70488 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -17,7 +17,7 @@ env: jobs: build: - runs-on: oracles-20.04 + runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }}-build cancel-in-progress: true @@ -49,7 +49,7 @@ jobs: fmt: needs: build - runs-on: oracles-20.04 + runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }}-fmt cancel-in-progress: true @@ -80,7 +80,7 @@ jobs: run: cargo fmt -- --check clippy: needs: build - runs-on: oracles-20.04 + runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }}-clippy cancel-in-progress: true @@ -112,7 +112,7 @@ jobs: tests: needs: build - runs-on: oracles-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: From d01359348244422c57d66b20fc079aa36101286d Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 13:02:33 -0700 Subject: [PATCH 13/16] go back to helium runner and try to remove protoc from tests --- .github/workflows/Tests.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 87ab70488..4a77450e9 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -17,7 +17,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: oracles-20.04 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-build cancel-in-progress: true @@ -27,8 +27,6 @@ jobs: - name: Rust install uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - name: Install protoc run: sudo apt-get install -y protobuf-compiler @@ -49,7 +47,7 @@ jobs: fmt: needs: build - runs-on: ubuntu-latest + runs-on: oracles-20.04 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-fmt cancel-in-progress: true @@ -60,7 +58,7 @@ jobs: - name: Rust install uses: dtolnay/rust-toolchain@stable with: - components: clippy, rustfmt + components: rustfmt - name: Install protoc run: sudo apt-get install -y protobuf-compiler @@ -80,7 +78,7 @@ jobs: run: cargo fmt -- --check clippy: needs: build - runs-on: ubuntu-latest + runs-on: oracles-20.04 concurrency: group: ${{ github.workflow }}-${{ github.ref }}-clippy cancel-in-progress: true @@ -91,7 +89,7 @@ jobs: - name: Rust install uses: dtolnay/rust-toolchain@stable with: - components: clippy, rustfmt + components: clippy - name: Install protoc run: sudo apt-get install -y protobuf-compiler @@ -112,7 +110,7 @@ jobs: tests: needs: build - runs-on: ubuntu-latest + runs-on: oracles-20.04 strategy: fail-fast: false matrix: @@ -138,11 +136,9 @@ jobs: - name: Rust install uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - name: Install protoc - run: sudo apt-get install -y protobuf-compiler + # - name: Install protoc + # run: sudo apt-get install -y protobuf-compiler - name: Cache uses: actions/cache@v4 From 489bfe2ed23c0303cd878a4620095fdb7c6db8a9 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 13:22:59 -0700 Subject: [PATCH 14/16] Put back protoc --- .github/workflows/Tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 4a77450e9..70520ca1b 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -137,8 +137,8 @@ jobs: - name: Rust install uses: dtolnay/rust-toolchain@stable - # - name: Install protoc - # run: sudo apt-get install -y protobuf-compiler + - name: Install protoc + run: sudo apt-get install -y protobuf-compiler - name: Cache uses: actions/cache@v4 From 622072c3893a895613636c3584ea8fa2fbdaec9d Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 13:38:53 -0700 Subject: [PATCH 15/16] Add max-parallel set to 5 to attempt to make runners run single tests faster --- .github/workflows/Tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 70520ca1b..1c6afc454 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -113,6 +113,7 @@ jobs: runs-on: oracles-20.04 strategy: fail-fast: false + max-parallel: 5 matrix: package: [boost-manager,custom-tracing,db-store,denylist,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,mobile-config,mobile-config-cli,mobile-packet-verifier,mobile-verifier,poc-entropy,price,reward-index,reward-scheduler,solana,task-manager] concurrency: From adf720fdd834b543e8098c79075431a081f50d67 Mon Sep 17 00:00:00 2001 From: Macpie Date: Tue, 7 May 2024 13:53:12 -0700 Subject: [PATCH 16/16] Remove max-parallel and only run packages that actually have tests in them --- .github/workflows/Tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 1c6afc454..53fb79e4f 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -113,9 +113,8 @@ jobs: runs-on: oracles-20.04 strategy: fail-fast: false - max-parallel: 5 matrix: - package: [boost-manager,custom-tracing,db-store,denylist,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,mobile-config,mobile-config-cli,mobile-packet-verifier,mobile-verifier,poc-entropy,price,reward-index,reward-scheduler,solana,task-manager] + package: [boost-manager,file-store,ingest,iot-config,iot-packet-verifier,iot-verifier,mobile-config,mobile-packet-verifier,mobile-verifier,reward-scheduler,task-manager] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-tests-${{ matrix.package }} cancel-in-progress: true