From df1219b41a7217f8274bf2be5c4705614da1145d Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Mon, 9 Dec 2024 11:42:38 +0100 Subject: [PATCH 1/2] Fix disabling cache when in forks or dependatbot (#1996) * Check if sccache is setup by Prep build * different debugging message * bad conditional statement --- .github/actions/sccache-gcloud/action.yml | 1 - .github/workflows/sanity-checks.yml | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/actions/sccache-gcloud/action.yml b/.github/actions/sccache-gcloud/action.yml index ee611db560..2677767f74 100644 --- a/.github/actions/sccache-gcloud/action.yml +++ b/.github/actions/sccache-gcloud/action.yml @@ -31,7 +31,6 @@ runs: # echo "SCCACHE_GCS_KEY_PATH=${{ steps.gauth.credentials_file_path }}" >> $GITHUB_ENV - name: setup Rust sccache wrapper - if: ${{ inputs.cache == 'enabled' }} shell: bash run: | echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV diff --git a/.github/workflows/sanity-checks.yml b/.github/workflows/sanity-checks.yml index d102ab1f31..5c76cc3f1d 100644 --- a/.github/workflows/sanity-checks.yml +++ b/.github/workflows/sanity-checks.yml @@ -35,12 +35,19 @@ jobs: # Required for integration tests evm interaction - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + + - name: Debug GitHub Environment Variables + shell: bash + run: | + echo "SCCACHE_GCS_BUCKET=${SCCACHE_GCS_BUCKET}" + echo "SCCACHE_GCS_RW_MODE=${SCCACHE_GCS_RW_MODE}" + echo "RUSTC_WRAPPER=${RUSTC_WRAPPER}" + echo "CARGO_INCREMENTAL=${CARGO_INCREMENTAL}" - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: TARGET: ${{ matrix.target }} - RUSTC_WRAPPER: "sccache" benchmark-check: if: ${{ !github.event.pull_request.draft }} @@ -63,10 +70,16 @@ jobs: GWIP: ${{ secrets.GWIP_SCCACHE }} GSA: ${{ secrets.GSA_SCCACHE }} + - name: Debug GitHub Environment Variables + shell: bash + run: | + echo "SCCACHE_GCS_BUCKET=${SCCACHE_GCS_BUCKET}" + echo "SCCACHE_GCS_RW_MODE=${SCCACHE_GCS_RW_MODE}" + echo "RUSTC_WRAPPER=${RUSTC_WRAPPER}" + echo "CARGO_INCREMENTAL=${CARGO_INCREMENTAL}" - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: TARGET: benchmark-check RUNTIME: ${{ matrix.runtime }} - RUSTC_WRAPPER: "sccache" From 6ca83c7646dc9cc0c8b7d267c649904505f639fc Mon Sep 17 00:00:00 2001 From: FT <140458077+zeevick10@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:17:09 +0100 Subject: [PATCH 2/2] fix: typos in documentation files (#1997) * Update check_runtime_changes.sh * Update lib.rs * Update tranches.rs --- ci/check_runtime_changes.sh | 2 +- pallets/liquidity-pools/src/lib.rs | 2 +- pallets/pool-system/src/tranches.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/check_runtime_changes.sh b/ci/check_runtime_changes.sh index dd847daf8e..4f539d0a80 100755 --- a/ci/check_runtime_changes.sh +++ b/ci/check_runtime_changes.sh @@ -48,7 +48,7 @@ RUNTIME_FILE_CHANGED=$(echo "${CHANGED_FILES}" | grep -e ^runtime/ | wc -l) echo "There are ${RUNTIME_FILE_CHANGED} file(s) changed in runtime " -# If there are no changes in the runtime file, exit sucessfully +# If there are no changes in the runtime file, exit successfully if (( $RUNTIME_FILE_CHANGED == 0 )) then echo -e "| ${OK} Nothing is changed in runtime" diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 657df1978c..e30b98612c 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -301,7 +301,7 @@ pub mod pallet { /// The metadata of the given asset does not declare it as transferable /// via LiquidityPools'. AssetNotLiquidityPoolsTransferable, - /// The asset is not a a wrapped token and thus cannot be + /// The asset is not a wrapped token and thus cannot be /// transferred via liquidity pools. AssetNotLiquidityPoolsWrappedToken, /// A pool could not be found. diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index 946977e587..b7d80f178d 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -2064,7 +2064,7 @@ pub mod test { fn replace_tranche_less_interest_than_next_works() { let mut tranches = default_tranches(); - // ensure we have an interest rate lower than the the left side tranche with a + // ensure we have an interest rate lower than the left side tranche with a // lower index, e.g. lower than 10% at index 1 let int_per_sec = Rate::one() / Rate::saturating_from_integer(SECS_PER_YEAR); let min_risk_buffer = Perquintill::from_rational(4u64, 5);