forked from umijs/dumi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: rewrite react demo swc plugin in rust (umijs#1579)
* chore: init rust swc plugin and cargo workspace * feat: rewrite rect demo swc plugin in rust * refactor: replace ts react plugin with swc react plugin * ci: add rust toolchain for build crates * ci: custom rust install for vercel deploy * build: correct cargo release config * ci: update custom-install for vercel deploy * ci: update scripts for vercel deploy * ci: update build script for vercel * refactor: correct swc plugin path * refactor: improve implementation for swc plugin Co-authored-by: Xiadong Zhu <[email protected]> * ci: enable cache for cargo --------- Co-authored-by: Xiadong Zhu <[email protected]>
- Loading branch information
1 parent
589a55f
commit dfc01d0
Showing
14 changed files
with
2,471 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,12 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org/' | ||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
# specific manually because action not support rust-toolchain.toml | ||
toolchain: nightly-2022-09-23 | ||
target: wasm32-wasi | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -56,15 +62,26 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pnpm-store-node${{ matrix.node-version }}- | ||
- name: Setup cargo cache | ||
uses: actions/cache@v3 | ||
with: | ||
# ref: https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-store-node${{ matrix.node-version }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install dependencies | ||
run: pnpm i | ||
|
||
- name: Lint code | ||
run: pnpm lint:es | ||
|
||
- name: Run build | ||
run: pnpm build | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,6 @@ | |
/examples/*/.dumi/tmp-production | ||
/docs/.upstream | ||
.idea | ||
/target | ||
/compiled/crates | ||
.swc |
Oops, something went wrong.