feat(ci): setup and cache minimal toolchain (#1683)

* feat(ci): setup and cache minimal toolchain

* dev: components

* fix: broken rpds

* fix: edition 2024??
This commit is contained in:
Myriad-Dreamin 2025-04-30 17:45:13 +08:00 committed by GitHub
parent 6118b346d6
commit 1108b39e3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 21 additions and 30 deletions

View file

@ -30,8 +30,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run rust-cache
uses: Swatinem/rust-cache@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install deps
run: yarn install
@ -118,15 +117,13 @@ jobs:
RUST_TARGET: wasm32-unknown-unknown
isNightly: ${{ ((startsWith(github.ref, 'refs/tags/') && !((!contains(github.ref, 'rc') && (endsWith(github.ref, '0') || endsWith(github.ref, '2') || endsWith(github.ref, '4') || endsWith(github.ref, '6') || endsWith(github.ref, '8')))))) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: "v0.13.1"
- name: Run rust-cache
uses: Swatinem/rust-cache@v2
- name: Install deps
run: yarn install
- name: Build tinymist vscode extension

View file

@ -38,13 +38,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://github.com/dtolnay/rust-toolchain/issues/133
# https://github.com/rust-lang/rustup/issues/3635
# Only needed if your action will run two or more rust
# commands concurrently, otherwise rustup will lazily
# install your rust-toolchain.toml when needed:
- name: 'Install from rust-toolchain.toml'
run: rustup show
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt
- name: Install Node.js
uses: actions/setup-node@v4
with:
@ -52,7 +48,6 @@ jobs:
cache: 'yarn'
- name: Install deps
run: yarn install
- uses: Swatinem/rust-cache@v2
- name: Check and build assets
run: |
yarn build:preview
@ -84,6 +79,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.85.0 # check-min-version
- name: Install Node.js
uses: actions/setup-node@v4
with:
@ -92,8 +90,6 @@ jobs:
run: yarn install
- name: Check Rust Version
run: yarn check-msrv
- uses: dtolnay/rust-toolchain@1.83.0 # check-min-version
- uses: Swatinem/rust-cache@v2
- name: Check and build assets
run: |
yarn build:preview

View file

@ -16,13 +16,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
# https://github.com/dtolnay/rust-toolchain/issues/133
# https://github.com/rust-lang/rustup/issues/3635
# Only needed if your action will run two or more rust
# commands concurrently, otherwise rustup will lazily
# install your rust-toolchain.toml when needed:
- name: 'Install from rust-toolchain.toml'
run: rustup show
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
@ -32,8 +28,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install llvm
# - name: Run rust-cache
# uses: Swatinem/rust-cache@v2
- name: Install deps
run: yarn install
- name: Check and build assets

4
Cargo.lock generated
View file

@ -3218,9 +3218,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
[[package]]
name = "rpds"
version = "1.1.1"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7f89f654d51fffdd6026289d07d1fd523244d46ae0a8bc22caa6dd7f9e8cb0b"
checksum = "a0e15515d3ce3313324d842629ea4905c25a13f81953eadb88f85516f59290a4"
dependencies = [
"archery",
]

View file

@ -8,7 +8,7 @@ license = "Apache-2.0"
homepage = "https://github.com/Myriad-Dreamin/tinymist"
repository = "https://github.com/Myriad-Dreamin/tinymist"
# also change in ci.yml
rust-version = "1.83"
rust-version = "1.85"
[workspace]
resolver = "2"

View file

@ -6,6 +6,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
The changelog lines unspecified with authors are all written by the @Myriad-Dreamin.
## v0.13.14 - [2025-05-31]
* Bumped MSRV to v1.85 in https://github.com/Myriad-Dreamin/tinymist/pull/1683
## v0.13.12 - [2025-04-30]
* Bumped world crates to v0.13.12

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "1.85"
components = ["rustc", "cargo", "rust-std", "clippy", "rustfmt"]
profile = "minimal"

View file

@ -3,7 +3,7 @@ import fs from "fs";
const ciFile = fs.readFileSync(".github/workflows/ci.yml", "utf-8");
const toolchainRe = (forWhat) =>
new RegExp(/dtolnay\/rust-toolchain@(\d+\.\d+\.\d+)/.source + `\\s*#\\s*${forWhat}`);
new RegExp(/toolchain: (\d+\.\d+\.\d+)/.source + `\\s*#\\s*${forWhat}`);
const ciCheckedVersion = ciFile.match(toolchainRe("check-min-version"))?.[1];
if (!ciCheckedVersion) {