mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-07 21:15:03 +00:00
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:
parent
6118b346d6
commit
1108b39e3f
8 changed files with 21 additions and 30 deletions
9
.github/workflows/build-vscode-others.yml
vendored
9
.github/workflows/build-vscode-others.yml
vendored
|
@ -30,8 +30,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Run rust-cache
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
|
@ -118,15 +117,13 @@ jobs:
|
||||||
RUST_TARGET: wasm32-unknown-unknown
|
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')))))) }}
|
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:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
- uses: jetli/wasm-pack-action@v0.4.0
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||||||
with:
|
with:
|
||||||
version: "v0.13.1"
|
version: "v0.13.1"
|
||||||
- name: Run rust-cache
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: yarn install
|
run: yarn install
|
||||||
- name: Build tinymist vscode extension
|
- name: Build tinymist vscode extension
|
||||||
|
|
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -38,13 +38,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# https://github.com/dtolnay/rust-toolchain/issues/133
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
# https://github.com/rust-lang/rustup/issues/3635
|
with:
|
||||||
# Only needed if your action will run two or more rust
|
components: clippy, rustfmt
|
||||||
# commands concurrently, otherwise rustup will lazily
|
|
||||||
# install your rust-toolchain.toml when needed:
|
|
||||||
- name: 'Install from rust-toolchain.toml'
|
|
||||||
run: rustup show
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
@ -52,7 +48,6 @@ jobs:
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: yarn install
|
run: yarn install
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Check and build assets
|
- name: Check and build assets
|
||||||
run: |
|
run: |
|
||||||
yarn build:preview
|
yarn build:preview
|
||||||
|
@ -84,6 +79,9 @@ jobs:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.85.0 # check-min-version
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
@ -92,8 +90,6 @@ jobs:
|
||||||
run: yarn install
|
run: yarn install
|
||||||
- name: Check Rust Version
|
- name: Check Rust Version
|
||||||
run: yarn check-msrv
|
run: yarn check-msrv
|
||||||
- uses: dtolnay/rust-toolchain@1.83.0 # check-min-version
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Check and build assets
|
- name: Check and build assets
|
||||||
run: |
|
run: |
|
||||||
yarn build:preview
|
yarn build:preview
|
||||||
|
|
12
.github/workflows/release-asset-crate.yml
vendored
12
.github/workflows/release-asset-crate.yml
vendored
|
@ -16,13 +16,9 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
# https://github.com/dtolnay/rust-toolchain/issues/133
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
# https://github.com/rust-lang/rustup/issues/3635
|
with:
|
||||||
# Only needed if your action will run two or more rust
|
cache: false
|
||||||
# commands concurrently, otherwise rustup will lazily
|
|
||||||
# install your rust-toolchain.toml when needed:
|
|
||||||
- name: 'Install from rust-toolchain.toml'
|
|
||||||
run: rustup show
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
@ -32,8 +28,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install llvm
|
sudo apt-get install llvm
|
||||||
# - name: Run rust-cache
|
|
||||||
# uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: yarn install
|
run: yarn install
|
||||||
- name: Check and build assets
|
- name: Check and build assets
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -3218,9 +3218,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rpds"
|
name = "rpds"
|
||||||
version = "1.1.1"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a7f89f654d51fffdd6026289d07d1fd523244d46ae0a8bc22caa6dd7f9e8cb0b"
|
checksum = "a0e15515d3ce3313324d842629ea4905c25a13f81953eadb88f85516f59290a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"archery",
|
"archery",
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,7 +8,7 @@ license = "Apache-2.0"
|
||||||
homepage = "https://github.com/Myriad-Dreamin/tinymist"
|
homepage = "https://github.com/Myriad-Dreamin/tinymist"
|
||||||
repository = "https://github.com/Myriad-Dreamin/tinymist"
|
repository = "https://github.com/Myriad-Dreamin/tinymist"
|
||||||
# also change in ci.yml
|
# also change in ci.yml
|
||||||
rust-version = "1.83"
|
rust-version = "1.85"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
|
@ -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.
|
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]
|
## v0.13.12 - [2025-04-30]
|
||||||
|
|
||||||
* Bumped world crates to v0.13.12
|
* Bumped world crates to v0.13.12
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.85"
|
channel = "1.85"
|
||||||
components = ["rustc", "cargo", "rust-std", "clippy", "rustfmt"]
|
profile = "minimal"
|
||||||
|
|
|
@ -3,7 +3,7 @@ import fs from "fs";
|
||||||
const ciFile = fs.readFileSync(".github/workflows/ci.yml", "utf-8");
|
const ciFile = fs.readFileSync(".github/workflows/ci.yml", "utf-8");
|
||||||
|
|
||||||
const toolchainRe = (forWhat) =>
|
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];
|
const ciCheckedVersion = ciFile.match(toolchainRe("check-min-version"))?.[1];
|
||||||
if (!ciCheckedVersion) {
|
if (!ciCheckedVersion) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue