-
Notifications
You must be signed in to change notification settings - Fork 11
executable file
·69 lines (56 loc) · 1.47 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
env:
DEBUG: napi:*
APP_NAME: font-toolkit
MACOSX_DEPLOYMENT_TARGET: "10.13"
"on":
push:
branches:
- main
tags-ignore:
- "**"
# 忽略以下文件
paths-ignore:
- "**/*.md"
- "LICENSE"
- "**/*.gitignore"
- ".editorconfig"
- "docs/**"
- "example/*.png"
pull_request: null
jobs:
build-wasm:
name: Build and test wasm - node@${{ matrix.node }}(Linux-x64-gnu)
strategy:
fail-fast: false
matrix:
node: ["19"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Install
run: |
rustup target add wasm32-wasi
- name: Cache cargo
uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.settings.target }}-node@${{ matrix.node }}-cargo-cache
- name: Install cargo components
run: |
cargo install cargo-component && yarn global add @bytecodealliance/jco
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
- name: Build wasm
run: yarn build
- name: Test wasm
run: yarn test
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: wasm32
path: pkg/*.wasm