@@ -36,16 +36,16 @@ jobs:
3636 # When adding a new `target`:
3737 # 1. Define a new platform alias above
3838 # 2. Add a new record to the matrix map in `cli/npm/install.js`
39- - { platform: linux-arm64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
40- - { platform: linux-arm , target: arm-unknown-linux-gnueabi , os: ubuntu-latest , use-cross: true }
41- - { platform: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , features: wasm } # See #2272
42- - { platform: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
43- - { platform: linux-powerpc64 , target: powerpc64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
44- - { platform: windows-arm64 , target: aarch64-pc-windows-msvc , os: windows-latest }
45- - { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , features: wasm }
46- - { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest }
47- - { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-14 , features: wasm }
48- - { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-13 , features: wasm }
39+ - { platform: linux-arm64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
40+ - { platform: linux-arm , target: arm-unknown-linux-gnueabi , os: ubuntu-latest , use-cross: true }
41+ - { platform: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-latest , features: wasm }
42+ - { platform: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
43+ - { platform: linux-powerpc64 , target: powerpc64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true }
44+ - { platform: windows-arm64 , target: aarch64-pc-windows-msvc , os: windows-latest }
45+ - { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , features: wasm }
46+ - { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest }
47+ - { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-latest , features: wasm }
48+ - { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-13 , features: wasm }
4949
5050 # Cross compilers for C library
5151 - { platform: linux-arm64 , cc: aarch64-linux-gnu-gcc , ar: aarch64-linux-gnu-ar }
8888
8989 - name : Install cross
9090 if : ${{ matrix.use-cross }}
91- run : RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross
91+ run : |
92+ if [ ! -x "$(command -v cross)" ]; then
93+ # TODO: Remove 'RUSTFLAGS=""' once https://github.com/cross-rs/cross/issues/1561 is resolved
94+ RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross
95+ fi
9296
9397 - name : Configure cross
9498 if : ${{ matrix.use-cross }}
@@ -152,7 +156,6 @@ jobs:
152156 printf 'CMAKE_PREFIX_PATH=%s\n' "$PWD/artifacts" >> $GITHUB_ENV
153157 env :
154158 WASMTIME_REPO : https://github.com/bytecodealliance/wasmtime
155- RUSTFLAGS : " "
156159
157160 - name : Build C library (make)
158161 if : ${{ runner.os != 'Windows' }}
@@ -183,7 +186,14 @@ jobs:
183186 - name : Build wasm library
184187 # No reason to build on the same Github runner hosts many times
185188 if : ${{ !matrix.no-run && !matrix.use-cross }}
186- run : $BUILD_CMD run -p xtask -- build-wasm
189+ shell : bash
190+ run : |
191+ cd lib/binding_web
192+ npm ci
193+ CJS=true npm run build
194+ CJS=true npm run build:debug
195+ npm run build
196+ npm run build:debug
187197
188198 - name : Build target
189199 run : $BUILD_CMD build --release --target=${{ matrix.target }} --features=${{ matrix.features }}
@@ -233,6 +243,16 @@ jobs:
233243 name : tree-sitter.wasm
234244 path : |
235245 lib/binding_web/tree-sitter.js
246+ lib/binding_web/tree-sitter.js.map
247+ lib/binding_web/tree-sitter.cjs
248+ lib/binding_web/tree-sitter.cjs.map
236249 lib/binding_web/tree-sitter.wasm
250+ lib/binding_web/tree-sitter.wasm.map
251+ lib/binding_web/debug/tree-sitter.cjs
252+ lib/binding_web/debug/tree-sitter.cjs.map
253+ lib/binding_web/debug/tree-sitter.js
254+ lib/binding_web/debug/tree-sitter.js.map
255+ lib/binding_web/debug/tree-sitter.wasm
256+ lib/binding_web/debug/tree-sitter.wasm.map
237257 if-no-files-found : error
238258 retention-days : 7
0 commit comments