From 716c78b1e36c5fd0e6dbbc5262bfa73ded3f9315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=80=E1=B4=8D=E1=B4=9B=E1=B4=8F=E1=B4=80=E1=B4=87?= =?UTF-8?q?=CA=80?= Date: Wed, 28 Jan 2026 18:56:54 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=8C=87=E5=AE=9A=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=20rust=20=E7=89=88=E6=9C=AC=E4=B8=BA=201.93.0=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20ci=20=E4=BB=A5=E8=AF=BB=E5=8F=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20(#626)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-binary.yaml | 15 ++++++++------- .github/workflows/pr-check.yaml | 2 +- rust-toolchain.toml | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/build-binary.yaml b/.github/workflows/build-binary.yaml index 248c195..9a01986 100644 --- a/.github/workflows/build-binary.yaml +++ b/.github/workflows/build-binary.yaml @@ -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 diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index 8e3d442..3fad791 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -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 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..0c1a074 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.93.0" +components = ["clippy"]