Skip to content

Fix CI: install stellar-cli from pinned release binary#6

Merged
yvesfracari merged 1 commit into
mainfrom
pedro/fix-ci-stellar-cli-install
Jun 12, 2026
Merged

Fix CI: install stellar-cli from pinned release binary#6
yvesfracari merged 1 commit into
mainfrom
pedro/fix-ci-stellar-cli-install

Conversation

@yvesfracari

Copy link
Copy Markdown
Contributor

Problem

Every CI run fails at the Install stellar-cli (pinned) step of the contract job:

error: cannot install package `stellar-cli 26.1.0`, it requires rustc 1.93.0 or newer,
while the currently active rustc version is 1.91.1

The repo pins rustc 1.91.1 (.tool-versions, CI, Docker image) and stellar-cli 26.1.0, but that pair cannot coexist under cargo install: the stellar-cli 26.1.0 crate declares rust-version = 1.93.0, so the pinned compiler refuses to build it.

Why not bump Rust?

The rustc version is the codegen-relevant pin: the on-chain fixture hash in docker/toolchain-manifest.json (6fe7bd58…e4b) was derived with 1.91.1, and the whole reproducible-build story depends on rebuilding with exactly that toolchain. Bumping to 1.93 could change the emitted WASM and break source↔WASM matching against the deployed fixture.

The compiler needed to build the CLI itself is a separate concern — the CLI binary's own compiler has no effect on contract codegen, since stellar contract build shells out to the cargo/rustc on PATH.

Fix

Install stellar-cli 26.1.0 from the official prebuilt release tarball, pinned by version and SHA-256, instead of compiling it from crates.io:

  • CI (.github/workflows/ci.yml): download + checksum-verify the x86_64 linux tarball. Side benefit: seconds instead of a multi-minute compile.
  • Docker builder image (docker/Dockerfile): same latent bug — FROM rust:1.91.1-bookworm + cargo install would fail identically at docker build. Now arch-aware (amd64/arm64) with per-arch pinned digests.

Verification

Locally with the pinned rustc 1.91.1:

  • cargo test --locked → 3/3 pass
  • stellar contract build --locked → WASM SHA-256 6fe7bd58e5a33dc27daefc74acfae6eb70f101fdbde860475cf18fde87288e4b, exactly matching the on-chain fixture hash in toolchain-manifest.json — confirming 1.91.1 is the correct pin to preserve.

stellar-cli 26.1.0 declares rust-version 1.93.0, so 'cargo install' fails
under the repo's pinned rustc 1.91.1 — every CI run died at the install
step. Bumping rustc instead would risk changing contract codegen and
invalidating the fixture WASM hash in docker/toolchain-manifest.json.

Install the official v26.1.0 release tarball (SHA-256 verified) in both
CI and the reproducible-build Docker image. The compiler that built the
CLI binary has no effect on the contract WASM; 'stellar contract build'
shells out to the pinned cargo/rustc on PATH. Verified locally: cargo
test passes and the rebuilt WASM hash matches the on-chain fixture
(6fe7bd58e5a33dc27daefc74acfae6eb70f101fdbde860475cf18fde87288e4b).
@yvesfracari yvesfracari merged commit 257c8e0 into main Jun 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant