chore: 指定项目 rust 版本为 1.93.0,调整 ci 以读取配置 (#626)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2026-01-28 18:56:54 +08:00
committed by GitHub
parent 22bc6bb3e8
commit 716c78b1e3
3 changed files with 12 additions and 8 deletions

View File

@@ -75,17 +75,18 @@ jobs:
with:
name: web-build
path: web/build
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Install musl-tools
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.target, 'musl')
- name: Read Toolchain Version
uses: SebRollen/toml-action@v1.2.0
id: read_rust_toolchain
with:
file: rust-toolchain.toml
field: toolchain.channel
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.platform.target }}
toolchain: stable
toolchain: ${{ steps.read_rust_toolchain.outputs.value }}
args: "--locked --release"
strip: true
- name: Package as archive

View File

@@ -26,7 +26,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- run: rustup default stable && rustup component add clippy && rustup component add rustfmt --toolchain nightly
- run: rustup install && rustup component add rustfmt --toolchain nightly
- name: Cache dependencies
uses: swatinem/rust-cache@v2

3
rust-toolchain.toml Normal file
View File

@@ -0,0 +1,3 @@
[toolchain]
channel = "1.93.0"
components = ["clippy"]