Skip to content

Commit be65fd6

Browse files
authored
Merge pull request #99 from fwcd/build-wasm-ci
Build WASM binary in normal build workflow
2 parents 7587b4a + 9c5cbfa commit be65fd6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/build.yml

+13
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13+
env:
14+
EMSCRIPTEN_VERSION: '2.0.17'
1315
steps:
1416
- uses: actions/checkout@v3
1517
- name: Set up Node
1618
uses: actions/setup-node@v3
1719
with:
1820
node-version: '18'
21+
- name: Install Emscripten
22+
uses: mymindstorm/setup-emsdk@v12
23+
with:
24+
version: ${{ env.EMSCRIPTEN_VERSION }}
1925
- name: Install dependencies
2026
run: npm install
2127
- name: Generate parser
@@ -27,6 +33,13 @@ jobs:
2733
test -z "$diff"
2834
- name: Run tests
2935
run: npm test
36+
- name: Build WASM binary
37+
run: npm run build-wasm
38+
- name: Upload WASM binary
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: tree-sitter-kotlin.wasm
42+
path: ./tree-sitter-kotlin.wasm
3043
- name: Set up Rust
3144
uses: actions-rs/toolchain@v1
3245
with:

.github/workflows/deploy-to-github.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
env:
11+
EMSCRIPTEN_VERSION: '2.0.17'
1012
steps:
1113
- uses: actions/checkout@v3
1214
- name: Set up Node
1315
uses: actions/setup-node@v3
1416
with:
1517
node-version: '18'
18+
- name: Install Emscripten
19+
uses: mymindstorm/setup-emsdk@v12
20+
with:
21+
version: ${{ env.EMSCRIPTEN_VERSION }}
1622
- name: Install dependencies
1723
run: npm install
1824
- name: Compile grammar

0 commit comments

Comments
 (0)