From a4b0c501e4ef3f7086ed6df1bdff66b4474ced15 Mon Sep 17 00:00:00 2001 From: Phil Denhoff Date: Sat, 1 Aug 2026 13:18:21 -0400 Subject: [PATCH] chore(toolchain): install the pinned Rust toolchain in CI CI hardcoded its Rust version in four workflows while rust-toolchain.toml already pins it. Install with bare `rustup toolchain install` so the file stays the single source of truth for channel, profile, and components; README points at the pin instead of naming a version. --- .github/workflows/build.yml | 3 ++- .github/workflows/libcalibre-tests.yml | 6 +++--- .github/workflows/quality.yml | 7 ++++--- .github/workflows/release.yml | 3 ++- README.md | 15 +++++++++++++-- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f264a10..0a241227 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,8 @@ jobs: with: bun-version: latest - - run: rustup toolchain install --profile minimal 1.97.1 + - name: Install pinned Rust toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/libcalibre-tests.yml b/.github/workflows/libcalibre-tests.yml index 88345188..eaf07dd7 100644 --- a/.github/workflows/libcalibre-tests.yml +++ b/.github/workflows/libcalibre-tests.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v5 - name: Install Rust - run: rustup toolchain install --profile minimal 1.97.1 + run: rustup toolchain install - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v5 - name: Install Rust - run: rustup toolchain install --profile minimal 1.97.1 + run: rustup toolchain install - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov @@ -105,7 +105,7 @@ jobs: - uses: actions/checkout@v5 - name: Install Rust - run: rustup toolchain install --profile minimal 1.97.1 + run: rustup toolchain install - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 1be00332..71b75bb3 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -17,7 +17,8 @@ jobs: with: bun-version: latest - - run: rustup toolchain install --profile minimal 1.97.1 + - name: Install pinned Rust toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@v2 with: @@ -45,11 +46,11 @@ jobs: with: bun-version: latest - - run: rustup toolchain install --profile minimal 1.97.1 + - name: Install pinned Rust toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@v2 with: - # using the default — we can bust the cache by changing this prefix-key: "v1-rust" workspaces: "." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f92bdd37..147d1eef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,7 +153,8 @@ jobs: with: bun-version: latest - - run: rustup toolchain install --profile minimal 1.97.1 + - name: Install pinned Rust toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@v2 with: diff --git a/README.md b/README.md index ac0c3760..b09bdcda 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,9 @@ Download the `.dmg` from [Releases](https://github.com/everydaythingssoftware/ci ## Developing -As a prerequisite, you'll need to install [Bun](https://bun.sh) and [Rust](https://www.rust-lang.org/tools/install). +As a prerequisite, you'll need to install [Bun](https://bun.sh) and +[rustup](https://rustup.rs). Rust is pinned by `rust-toolchain.toml`; run +`rustup toolchain install` once in this repository to install it. Then, you can install the packages. @@ -57,6 +59,15 @@ bun run dev # or just bun dev ``` +### Updating Rust + +Rust upgrades are intentional repository changes. Update the channel in +`rust-toolchain.toml` and the workspace `rust-version` in `Cargo.toml` +together — CI installs the committed toolchain and derives its cache key from +the same file. Then run `bun format:check`, `bun lint`, and +`cargo test --workspace` before merging. Keep crate editions unchanged unless +an edition migration is planned separately. + ### Lint & Formatting To lint all source code, run `bun lint`. To autoformat, run `bun format`. @@ -98,4 +109,4 @@ Citadel can check for app updates and install them on request. Automatic update This project would not be possible without the north star created by Kovid Goyal, [Calibre](https://github.com/kovidgoyal/calibre). Without his hard work building such an extensive and powerful tool, Citadel would not exist. -Huge thanks to [Kemie Guaida](https://kemielikes.design/), who created an excellent [Calibre redesign Figma prototype](https://old.reddit.com/r/Calibre/comments/udzumn/testing_a_new_interface_for_calibre/), from which Citadel takes inspiration. Thank you, Kemie! \ No newline at end of file +Huge thanks to [Kemie Guaida](https://kemielikes.design/), who created an excellent [Calibre redesign Figma prototype](https://old.reddit.com/r/Calibre/comments/udzumn/testing_a_new_interface_for_calibre/), from which Citadel takes inspiration. Thank you, Kemie!