From f37af299571ee862307f2f432363d441f4695743 Mon Sep 17 00:00:00 2001 From: sou1118 Date: Wed, 5 Aug 2026 01:05:19 +0900 Subject: [PATCH] ci: manage toolchains with mise Replace dtolnay/rust-toolchain and typst-community/setup-typst with jdx/mise-action so tool versions are managed in mise.toml as a single source of truth for local development and CI. - Pin rust 1.97.1 (with rustfmt/clippy components) and typst 0.15.1 - Install only rust via install_args for jobs that do not need typst - Add rustup target add step for non-cross release builds - Keep Swatinem/rust-cache since it handles cargo caching, not toolchains --- .github/workflows/ci.yml | 10 +++------- .github/workflows/release.yml | 11 ++++++++--- mise.toml | 3 ++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a40b678..4db1ce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,21 +27,18 @@ jobs: include: - name: Format command: cargo fmt --check - components: rustfmt cache: false - name: Clippy command: cargo clippy -- -D warnings - components: clippy cache: true - name: Test command: cargo test - components: "" cache: true steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 + - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 with: - components: ${{ matrix.components }} + install_args: rust - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 if: ${{ matrix.cache }} - run: ${{ matrix.command }} @@ -52,9 +49,8 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 + - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 - - uses: typst-community/setup-typst@48aeee7543d37f01afd1ffb27307dc277387ba13 # v4.3.1 - name: Build typdiff run: cargo build - name: Diff and compile (basic fixtures) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7a9a39..163853d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,9 +38,12 @@ jobs: cross: false steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 + - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 with: - targets: ${{ matrix.target }} + install_args: rust + - name: Add build target + if: "!matrix.cross" + run: rustup target add ${{ matrix.target }} - name: Install cross if: matrix.cross run: cargo install cross --locked @@ -95,7 +98,9 @@ jobs: contents: read steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 + - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 + with: + install_args: rust - name: Authenticate with crates.io id: auth uses: rust-lang/crates-io-auth-action@b7e9a28eded4986ec6b1fa40eeee8f8f165559ec # v1.0.3 diff --git a/mise.toml b/mise.toml index aa3eba4..5a9e4a0 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,3 @@ [tools] -typst = "latest" +rust = { version = "1.97.1", components = "rustfmt,clippy" } +typst = "0.15.1"