-
Notifications
You must be signed in to change notification settings - Fork 136
45 lines (35 loc) · 1.35 KB
/
wasm-package.yml
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
name: Build NPM package
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./src/wasm_package
steps:
- uses: actions/checkout@v3
with:
submodules: true
# Needed for build_wrappers.py, to extract function signatures from source code
# We sed out azure to attempt to mitigate apt network failues.
- run: sudo sed -i 's/azure\.//' /etc/apt/sources.list
# The deps script was written for Debian (11), but works as-is on Ubuntu too
- run: sudo ../../contrib/bullseye_deps.sh
# Build NPM package into a tgz file (pack internally triggers the build/prepare script)
- run: npm install && npm pack --foreground-scripts
name: Build & Pack
# Report the SHA256 digest of the final package. This should be deterministic (including generated WASM),
# so it should match the package published to the NPM registry and can be used to cross-check its integrity.
- run: 'echo SHA256 digest: && sha256sum wallycore-*.tgz'
- run: npm test
- uses: actions/upload-artifact@v3
with:
name: libwally-npm
path: src/wasm_package/wallycore-*.tgz
# upload-artifact doesn't seem to take the working-directory setting into account