From dd7d88d6c9aa61fb87def0a878221486888682ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20=C4=8Cerni=C4=8D?= Date: Thu, 23 May 2024 11:51:42 +0200 Subject: [PATCH 1/9] feat: use self-hosted runner --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c143a1f0b..2b17260d4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ concurrency: jobs: toml: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -31,7 +31,7 @@ jobs: echo 'Please run taplo format' format: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -51,7 +51,7 @@ jobs: echo 'Please run cargo fmt --all' clippy_build_and_test: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 - name: Cargo caching From 5fe160a1dd1b75a90cebdc27c117eb88ce66c910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20=C4=8Cerni=C4=8D?= Date: Thu, 23 May 2024 16:11:19 +0200 Subject: [PATCH 2/9] chore: installed protobuf-compiler directly on the runner --- .github/workflows/ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2b17260d4..d740dbc8b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,10 +64,6 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }} - - name: Install protobuf compiler - run: | - sudo apt-get update - sudo apt-get install protobuf-compiler - uses: dtolnay/rust-toolchain@stable with: toolchain: 1.77.0 From 024c0b4a52d61c563364b1e0f224ba6c732b5013 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 16:44:29 -0700 Subject: [PATCH 3/9] build(ci): Changed order in which clippy is running --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d740dbc8b..882367457 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,8 +73,6 @@ jobs: run: | cargo --version cargo clippy --version - - name: Cargo clippy - run: cargo clippy --locked -q --no-deps -- -D warnings - name: Build with try-runtime feature run: RUSTFLAGS="-D warnings" cargo build --locked -q --features try-runtime - name: Build node runtime @@ -83,6 +81,8 @@ jobs: run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-node --features runtime-benchmarks - name: Build in release mode run: RUSTFLAGS="-D warnings" cargo build --locked -q --release + - name: Cargo clippy + run: cargo clippy --locked -q --no-deps -- -D warnings - name: Run tests run: RUSTFLAGS="-D warnings" cargo test --locked -q --workspace - name: Failure handling From 38747885eb43987265b185d769620a1600b1a994 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 16:44:50 -0700 Subject: [PATCH 4/9] chore(cs): Code style fix --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 882367457..0f13d8032 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,9 +2,9 @@ name: CI on: pull_request: - types: [labeled] + types: [ labeled ] push: - branches: [develop, main] + branches: [ develop, main ] concurrency: group: ${{ github.ref }} From b59a03582552a86fd166135d9de637c7d5c0c34d Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 16:45:22 -0700 Subject: [PATCH 5/9] build(ci): Added info about targets --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f13d8032..e5f41a94b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -71,6 +71,7 @@ jobs: components: clippy rust-src - name: List version run: | + rustup show cargo --version cargo clippy --version - name: Build with try-runtime feature From f399ae5845ea8258208ca93815eead2d2cb9c37b Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 16:55:47 -0700 Subject: [PATCH 6/9] build(ci): Added 'needs' properties to ensure jobs run in the proper sequence --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e5f41a94b..11133bad8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,6 +32,7 @@ jobs: format: runs-on: self-hosted + needs: toml steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -52,6 +53,9 @@ jobs: clippy_build_and_test: runs-on: self-hosted + needs: + - toml + - format steps: - uses: actions/checkout@v4 - name: Cargo caching From ea916e77e827e87d6cdc12a82373979c3cec6519 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 19:36:15 -0700 Subject: [PATCH 7/9] Revert "build(ci): Changed order in which clippy is running" This reverts commit 024c0b4a52d61c563364b1e0f224ba6c732b5013. --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11133bad8..cffe59075 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,6 +78,8 @@ jobs: rustup show cargo --version cargo clippy --version + - name: Cargo clippy + run: cargo clippy --locked -q --no-deps -- -D warnings - name: Build with try-runtime feature run: RUSTFLAGS="-D warnings" cargo build --locked -q --features try-runtime - name: Build node runtime @@ -86,8 +88,6 @@ jobs: run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-node --features runtime-benchmarks - name: Build in release mode run: RUSTFLAGS="-D warnings" cargo build --locked -q --release - - name: Cargo clippy - run: cargo clippy --locked -q --no-deps -- -D warnings - name: Run tests run: RUSTFLAGS="-D warnings" cargo test --locked -q --workspace - name: Failure handling From c2fa367f4a6dc96d52904a4b4f058c69950830a1 Mon Sep 17 00:00:00 2001 From: Serhii Temchenko Date: Thu, 23 May 2024 20:39:08 -0700 Subject: [PATCH 8/9] Revert "Revert "build(ci): Changed order in which clippy is running"" This reverts commit ea916e77e827e87d6cdc12a82373979c3cec6519. --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cffe59075..11133bad8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,8 +78,6 @@ jobs: rustup show cargo --version cargo clippy --version - - name: Cargo clippy - run: cargo clippy --locked -q --no-deps -- -D warnings - name: Build with try-runtime feature run: RUSTFLAGS="-D warnings" cargo build --locked -q --features try-runtime - name: Build node runtime @@ -88,6 +86,8 @@ jobs: run: RUSTFLAGS="-D warnings" cargo build --locked -q -p polka-storage-node --features runtime-benchmarks - name: Build in release mode run: RUSTFLAGS="-D warnings" cargo build --locked -q --release + - name: Cargo clippy + run: cargo clippy --locked -q --no-deps -- -D warnings - name: Run tests run: RUSTFLAGS="-D warnings" cargo test --locked -q --workspace - name: Failure handling From c306f72702dbbf394a38b8cd0d8039a6b69e131e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20=C4=8Cerni=C4=8D?= Date: Fri, 24 May 2024 11:20:43 +0200 Subject: [PATCH 9/9] build: remove dependency on toml --- .github/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11133bad8..77d35dcd1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,9 +2,9 @@ name: CI on: pull_request: - types: [ labeled ] + types: [labeled] push: - branches: [ develop, main ] + branches: [develop, main] concurrency: group: ${{ github.ref }} @@ -54,7 +54,6 @@ jobs: clippy_build_and_test: runs-on: self-hosted needs: - - toml - format steps: - uses: actions/checkout@v4