From bcc9b27c85545d7887a03680ead521d548b98187 Mon Sep 17 00:00:00 2001 From: vanity mnm Date: Wed, 30 Apr 2025 16:08:03 +0200 Subject: [PATCH 1/2] CI fails due to outdated dependencies and wrong formatting (#212) * Migrating CI cache dependency * Fixing formatting --- .github/workflows/pull-request-token-lending.yml | 6 +++--- .github/workflows/pull-request.yml | 10 +++++----- ci/install-build-deps.sh | 1 - token-lending/program/src/processor.rs | 2 +- ...igation_collateral_and_redeem_reserve_collateral.rs | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pull-request-token-lending.yml b/.github/workflows/pull-request-token-lending.yml index f1c1c1ff844..d07b8473868 100644 --- a/.github/workflows/pull-request-token-lending.yml +++ b/.github/workflows/pull-request-token-lending.yml @@ -30,20 +30,20 @@ jobs: override: true profile: minimal - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUST_STABLE}} - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/bin/rustfilt key: cargo-bpf-bins-${{ runner.os }} - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cache diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2221f07590c..9f3babb7076 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,7 +59,7 @@ jobs: profile: minimal components: clippy - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -96,7 +96,7 @@ jobs: override: true profile: minimal - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -104,13 +104,13 @@ jobs: # target # Removed due to build dependency caching conflicts key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUST_STABLE}} - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/bin/rustfilt key: cargo-bpf-bins-${{ runner.os }} - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cache @@ -143,7 +143,7 @@ jobs: override: true profile: minimal - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | ~/.cargo/registry diff --git a/ci/install-build-deps.sh b/ci/install-build-deps.sh index cd9c815df08..3962591173a 100755 --- a/ci/install-build-deps.sh +++ b/ci/install-build-deps.sh @@ -7,7 +7,6 @@ sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-1 sudo apt-get update sudo apt-get install -y openssl --allow-unauthenticated sudo apt-get install -y libssl-dev --allow-unauthenticated -sudo apt-get install -y libssl1.1 --allow-unauthenticated sudo apt-get install -y libudev-dev sudo apt-get install -y binutils-dev sudo apt-get install -y libunwind-dev diff --git a/token-lending/program/src/processor.rs b/token-lending/program/src/processor.rs index acf51d8e037..a932ba65ca4 100644 --- a/token-lending/program/src/processor.rs +++ b/token-lending/program/src/processor.rs @@ -2351,7 +2351,7 @@ fn process_withdraw_obligation_collateral_and_redeem_reserve_liquidity( )?; // Needed in the case where the obligation has no borrows => user doesn't refresh anything - // if the obligation has borrows, then withdraw_obligation_collateral ensures that the + // if the obligation has borrows, then withdraw_obligation_collateral ensures that the // obligation (and as a result, the reserves) were refreshed _refresh_reserve_interest(program_id, reserve_info, clock)?; _redeem_reserve_collateral( diff --git a/token-lending/program/tests/withdraw_obligation_collateral_and_redeem_reserve_collateral.rs b/token-lending/program/tests/withdraw_obligation_collateral_and_redeem_reserve_collateral.rs index 14b6b3026c1..7206f25006a 100644 --- a/token-lending/program/tests/withdraw_obligation_collateral_and_redeem_reserve_collateral.rs +++ b/token-lending/program/tests/withdraw_obligation_collateral_and_redeem_reserve_collateral.rs @@ -315,4 +315,4 @@ async fn test_withdraw_no_borrows() { ) .await .unwrap(); -} \ No newline at end of file +} From c6195f1c7e72397ca7f081db34c3dddbd94aa224 Mon Sep 17 00:00:00 2001 From: vanity mnm Date: Wed, 14 May 2025 04:46:03 +0200 Subject: [PATCH 2/2] We need newer CLI version because the old one stopped being shipped (#217) --- ci/solana-version.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/solana-version.sh b/ci/solana-version.sh index 78040ef6a63..9433577bb70 100755 --- a/ci/solana-version.sh +++ b/ci/solana-version.sh @@ -14,7 +14,9 @@ if [[ -n $SOLANA_VERSION ]]; then solana_version="$SOLANA_VERSION" else - solana_version=v1.16.20 + # we use 1.16.20 for sdk but this version has been deleted from the solana servers so we use + # this version's CLI instead + solana_version=v1.17.34 fi export solana_version="$solana_version" @@ -23,7 +25,7 @@ export PATH="$HOME"/.local/share/solana/install/active_release/bin:"$PATH" if [[ -n $1 ]]; then case $1 in install) - sh -c "$(curl -sSfL https://release.solana.com/$solana_version/install)" + sh -c "$(curl -sSfL https://release.anza.xyz/$solana_version/install)" solana --version ;; *)