From 240a0c10195ab2fea125830c9784f5273509b4ca Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 19 Sep 2023 19:10:32 +0100 Subject: [PATCH 1/5] chore: default feature resolver --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 5b563ae9..947de95e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ exclude = [ "xcm-simulator" ] +resolver = "2" [profile.release] panic = "unwind" From e795ef79efb4f23c82b8eb5434606330f5a9c739 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 20 Sep 2023 01:15:10 +0100 Subject: [PATCH 2/5] chore: disable debug-info to reduce ci disk usage --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 947de95e..8be24138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,9 @@ inherits = "release" lto = true codegen-units = 1 +[profile.test] +debug = 0 + [workspace.package] authors = ["Trappist Network "] homepage = "https://trappist.io" From 65bf1e7a7d96cbc25fb5dd3b83565fa9bb5ccd1e Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 20 Sep 2023 01:15:38 +0100 Subject: [PATCH 3/5] ci: remove nightly --- .github/templates/setup-worker/action.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/templates/setup-worker/action.yaml b/.github/templates/setup-worker/action.yaml index 381feac9..f198aa8a 100644 --- a/.github/templates/setup-worker/action.yaml +++ b/.github/templates/setup-worker/action.yaml @@ -10,10 +10,3 @@ runs: - name: Setup Ubuntu dependencies shell: bash run: sudo apt update && sudo apt install -y git clang curl libssl-dev llvm libudev-dev cmake protobuf-compiler - - - name: Install Rust nightly - shell: bash - run: | - rustup toolchain install nightly-2023-01-01 --profile minimal --component rustfmt - rustup default nightly-2023-01-01 - rustup target add wasm32-unknown-unknown \ No newline at end of file From 44901975d1ba50cbab1c6b562133d213af3c0eab Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 20 Sep 2023 01:16:38 +0100 Subject: [PATCH 4/5] ci: use 'smart caching' for rust to reduce disk usage --- .github/workflows/check.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 855fb14f..f511ed67 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,6 +11,7 @@ on: workflow_dispatch: env: + CARGO_INCREMENTAL: 0 POLKA_VERSION: 1.0.0 jobs: @@ -35,16 +36,11 @@ jobs: uses: "./.github/templates/setup-worker" - name: Cache Build artefacts - uses: actions/cache@v3 + uses: Swatinem/rust-cache@v2.7.0 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-release-${{ env.POLKA_VERSION }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-release-${{ env.POLKA_VERSION }} + cache-on-failure: true + shared-key: ${{ env.POLKA_VERSION }} + key: "release" - name: Check Build Trappist node run: | @@ -64,16 +60,11 @@ jobs: uses: "./.github/templates/setup-worker" - name: Cache Build artefacts - uses: actions/cache@v3 + uses: Swatinem/rust-cache@v2.7.0 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-debug-${{ env.POLKA_VERSION }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-debug-${{ env.POLKA_VERSION }} + cache-on-failure: true + shared-key: ${{ env.POLKA_VERSION }} + key: "debug" - name: Run Trappist tests run: | From 1919d6357f31121d514b56b2d49657341bbcc8a5 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Wed, 20 Sep 2023 10:38:51 +0100 Subject: [PATCH 5/5] ci: fix cache keys --- .github/workflows/check.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f511ed67..3805d8d5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -39,8 +39,7 @@ jobs: uses: Swatinem/rust-cache@v2.7.0 with: cache-on-failure: true - shared-key: ${{ env.POLKA_VERSION }} - key: "release" + shared-key: ${{ env.POLKA_VERSION }}-release - name: Check Build Trappist node run: | @@ -63,8 +62,7 @@ jobs: uses: Swatinem/rust-cache@v2.7.0 with: cache-on-failure: true - shared-key: ${{ env.POLKA_VERSION }} - key: "debug" + shared-key: ${{ env.POLKA_VERSION }}-debug - name: Run Trappist tests run: |