Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 15 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Read pinned Rust version
id: rust-toolchain-file
# bash explicitly: the default shell on a Windows runner is PowerShell,
# where `$(...)` and `$GITHUB_OUTPUT` mean nothing, so the step passes
# having written no output — and the toolchain action then fails with
# "toolchain is a required input", eight steps from the real cause.
# rustup ships on GitHub-hosted runners and reads rust-toolchain.toml
# itself, so the version and components live in that one file and no
# third-party action sits between it and the build.
- name: Install Rust toolchain
shell: bash
run: echo "channel=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
toolchain: ${{ steps.rust-toolchain-file.outputs.channel }}
run: rustup toolchain install --profile minimal --no-self-update
- name: Install jq
run: sudo apt-get install -y jq
- name: Install cargo-audit
Expand Down Expand Up @@ -294,18 +289,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Read pinned Rust version
id: rust-toolchain-file
# bash explicitly: the default shell on a Windows runner is PowerShell,
# where `$(...)` and `$GITHUB_OUTPUT` mean nothing, so the step passes
# having written no output — and the toolchain action then fails with
# "toolchain is a required input", eight steps from the real cause.
# rustup ships on GitHub-hosted runners and reads rust-toolchain.toml
# itself, so the version and components live in that one file and no
# third-party action sits between it and the build.
- name: Install Rust toolchain
shell: bash
run: echo "channel=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
toolchain: ${{ steps.rust-toolchain-file.outputs.channel }}
components: rustfmt, clippy
run: rustup toolchain install --profile minimal --no-self-update
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: src-tauri
Expand Down Expand Up @@ -340,17 +329,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Read pinned Rust version
id: rust-toolchain-file
# bash explicitly: the default shell on a Windows runner is PowerShell,
# where `$(...)` and `$GITHUB_OUTPUT` mean nothing, so the step passes
# having written no output — and the toolchain action then fails with
# "toolchain is a required input", eight steps from the real cause.
# rustup ships on GitHub-hosted runners and reads rust-toolchain.toml
# itself, so the version and components live in that one file and no
# third-party action sits between it and the build.
- name: Install Rust toolchain
shell: bash
run: echo "channel=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
toolchain: ${{ steps.rust-toolchain-file.outputs.channel }}
run: rustup toolchain install --profile minimal --no-self-update
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: src-tauri
Expand Down
39 changes: 14 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Read pinned Rust version
id: rust-toolchain-file
# bash explicitly: the default shell on a Windows runner is PowerShell,
# where `$(...)` and `$GITHUB_OUTPUT` mean nothing, so the step passes
# having written no output — and the toolchain action then fails with
# "toolchain is a required input", eight steps from the real cause.
# rustup ships on GitHub-hosted runners and reads rust-toolchain.toml
# itself, so the version and components live in that one file and no
# third-party action sits between it and the build.
- name: Install Rust toolchain
shell: bash
run: echo "channel=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
toolchain: ${{ steps.rust-toolchain-file.outputs.channel }}
run: rustup toolchain install --profile minimal --no-self-update
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: src-tauri
Expand Down Expand Up @@ -181,22 +176,16 @@ jobs:
node-version-file: ".node-version"
cache: "npm"

- name: Read pinned Rust version
id: rust-toolchain-file
# bash explicitly: the default shell on a Windows runner is PowerShell,
# where `$(...)` and `$GITHUB_OUTPUT` mean nothing, so the step passes
# having written no output — and the toolchain action then fails with
# "toolchain is a required input", eight steps from the real cause.
shell: bash
run: echo "channel=$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)" >> "$GITHUB_OUTPUT"

# From rust-toolchain.toml, so releases build on the same version CI
# tests against. rustup ships on GitHub-hosted runners and reads the
# file itself; bash, because the Windows default shell is PowerShell.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
# From rust-toolchain.toml, so releases build on the same version
# CI tests against.
toolchain: ${{ steps.rust-toolchain-file.outputs.channel }}
targets: ${{ matrix.rust_target }}
shell: bash
env:
RUST_TARGET: ${{ matrix.rust_target }}
run: |
rustup toolchain install --profile minimal --no-self-update
rustup target add "$RUST_TARGET"

- name: Rust cache
uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
Expand Down
4 changes: 2 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# contributor runs before `just <task>`.
#
# CI does NOT depend on mise — it reads .node-version and rust-toolchain.toml
# directly via actions/setup-node and dtolnay/rust-toolchain, so those two
# files stay the source of truth and nothing here can drift from them.
# directly via actions/setup-node and rustup, so those two files stay the
# source of truth and nothing here can drift from them.
#
# Note: mise can read those idiomatic files itself, but that is off by
# default (idiomatic_version_file_enable_tools), so the versions are
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Single source of truth for the Rust toolchain.
#
# Read natively by rustup, by dtolnay/rust-toolchain in CI, and by mise.
# Read natively by rustup (locally and in CI) and by mise.
# Pinned to an exact version rather than "stable": SQLPilot is an
# application, not a published library, so a reproducible build matters
# more than a wide MSRV — and an unpinned toolchain means a new stable
Expand Down
Loading