From 0f06dab7deeae5710ac02ee60990df85e3756ae8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 23:16:49 +0000 Subject: [PATCH] Move the Anchor CI jobs to Solana CLI 4.3.2 The two Anchor workflows installed Solana CLI 3.1.14 through release.anza.xyz. Agave's current release is 4.4.1, and the examples themselves pin the Agave crates at ~4.3: LiteSVM 0.18.1 resolves the solana-* crates in that range (3134c69b). So CI was building the .so with a toolchain two major versions older than the runtime that executes it in the tests. Install 4.3.2 instead, matching the pinned crate line rather than jumping to 4.4.x, which the examples deliberately avoid because LiteSVM 0.18.1 does not compile against Agave 4.4.0. Fetch it from the GitHub release instead of release.anza.xyz. That host has no usable artefact for parts of the 4.x line - the beta-channel comments in native.yml record a 404 for v4.0 - whereas the release asset is a plain static URL. It needs no GitHub API call either, so it avoids the rate limiting that made the other workflows pin an exact version. Only anchor.yml and anchor-v1.yml change. native.yml, pinocchio.yml, quasar.yml and solana-asm.yml reach the CLI through heyAyushh/setup-solana, whose behaviour on 4.3.2 is untested here, and their pins carry their own documented reasons. Verified locally with 4.3.2: all twelve Anchor projects whose programs changed in the stored-bump work build a .so with `cargo build-sbf` and pass their LiteSVM suites, token-swap at 28 tests per variant. The install snippet in this diff was run as written and yields solana-cli 4.3.2 with cargo-build-sbf 4.4.0 and platform-tools v1.57. Claude-Session: https://claude.ai/code/session_01YTTjefTz2Kbj8t5qg77kXg --- .github/workflows/anchor-v1.yml | 17 +++++++++++++++-- .github/workflows/anchor.yml | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/anchor-v1.yml b/.github/workflows/anchor-v1.yml index 3a02bf4e..262301e4 100644 --- a/.github/workflows/anchor-v1.yml +++ b/.github/workflows/anchor-v1.yml @@ -194,10 +194,23 @@ jobs: - uses: actions/setup-node@v4 with: node-version: lts/* + # Fetched from the GitHub release rather than release.anza.xyz: that host + # has no usable artefact for parts of the 4.x line (the beta-channel notes + # in native.yml record a 404 for v4.0), and the release asset is a plain + # static URL, so this also avoids the GitHub API rate limiting that made + # the other workflows pin an exact version. + # + # 4.3.2 matches the Agave crate line the examples pin: LiteSVM 0.18.1 + # resolves solana-* at ~4.3 (see the pins added in 3134c69b), so the + # toolchain that builds the .so is from the same era as the runtime that + # executes it. Bump this together with those crate pins. - name: Install Solana CLI run: | - sh -c "$(curl -sSfL https://release.anza.xyz/v3.1.14/install)" - echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH" + curl -sSfL -o /tmp/solana-release.tar.bz2 \ + https://github.com/anza-xyz/agave/releases/download/v4.3.2/solana-release-x86_64-unknown-linux-gnu.tar.bz2 + mkdir -p "$HOME/.local/share/solana-release" + tar -xjf /tmp/solana-release.tar.bz2 -C "$HOME/.local/share/solana-release" --strip-components=1 + echo "$HOME/.local/share/solana-release/bin" >> "$GITHUB_PATH" - name: Cache Anchor toolchain uses: actions/cache@v4 with: diff --git a/.github/workflows/anchor.yml b/.github/workflows/anchor.yml index 257da478..d0eff5e1 100644 --- a/.github/workflows/anchor.yml +++ b/.github/workflows/anchor.yml @@ -195,10 +195,23 @@ jobs: - uses: actions/setup-node@v4 with: node-version: lts/* + # Fetched from the GitHub release rather than release.anza.xyz: that host + # has no usable artefact for parts of the 4.x line (the beta-channel notes + # in native.yml record a 404 for v4.0), and the release asset is a plain + # static URL, so this also avoids the GitHub API rate limiting that made + # the other workflows pin an exact version. + # + # 4.3.2 matches the Agave crate line the examples pin: LiteSVM 0.18.1 + # resolves solana-* at ~4.3 (see the pins added in 3134c69b), so the + # toolchain that builds the .so is from the same era as the runtime that + # executes it. Bump this together with those crate pins. - name: Install Solana CLI run: | - sh -c "$(curl -sSfL https://release.anza.xyz/v3.1.14/install)" - echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH" + curl -sSfL -o /tmp/solana-release.tar.bz2 \ + https://github.com/anza-xyz/agave/releases/download/v4.3.2/solana-release-x86_64-unknown-linux-gnu.tar.bz2 + mkdir -p "$HOME/.local/share/solana-release" + tar -xjf /tmp/solana-release.tar.bz2 -C "$HOME/.local/share/solana-release" --strip-components=1 + echo "$HOME/.local/share/solana-release/bin" >> "$GITHUB_PATH" - name: Cache Anchor toolchain uses: actions/cache@v4 with: