Skip to content

Commit 186ecfa

Browse files
authored
chore(ci): Expose more crates to JS (#8033)
1 parent 5283e5b commit 186ecfa

File tree

57 files changed

+1999
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1999
-64
lines changed

.github/actions/build-node/action.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "Build node.js binding"
2+
description: "Build a binding for node.js by using `settings` matrix"
3+
4+
inputs:
5+
package:
6+
description: "Package name"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
12+
steps:
13+
- name: Setup node x64
14+
uses: actions/setup-node@v3
15+
if: matrix.settings.target != 'i686-pc-windows-msvc'
16+
with:
17+
node-version: 18
18+
architecture: x64
19+
20+
- name: Setup node x86
21+
uses: actions/setup-node@v3
22+
if: matrix.settings.target == 'i686-pc-windows-msvc'
23+
with:
24+
node-version: 18
25+
architecture: x86
26+
27+
- name: Install
28+
uses: actions-rs/toolchain@v1
29+
if: ${{ !matrix.settings.docker }}
30+
with:
31+
profile: minimal
32+
override: true
33+
target: ${{ matrix.settings.target }}
34+
35+
- uses: goto-bus-stop/setup-zig@v2
36+
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
37+
with:
38+
version: 0.10.1
39+
40+
- shell: bash
41+
run: corepack enable
42+
43+
- name: Install node dependencies
44+
shell: bash
45+
working-directory: "./packages/minifier"
46+
run: corepack yarn
47+
48+
- name: Setup toolchain
49+
run: ${{ matrix.settings.setup }}
50+
if: ${{ matrix.settings.setup }}
51+
shell: bash
52+
53+
- name: Install dependencies
54+
shell: bash
55+
working-directory: "./packages"
56+
run: |
57+
# curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
58+
echo '/usr/local/cargo/bin' >> $GITHUB_PATH
59+
- name: Build in docker
60+
uses: addnab/docker-run-action@v3
61+
if: ${{ matrix.settings.docker }}
62+
with:
63+
image: ${{ matrix.settings.docker }}
64+
options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build
65+
run: >-
66+
yarn global add wasm-pack &&
67+
${{ matrix.settings.build }}
68+
- name: Build
69+
if: ${{ !matrix.settings.docker }}
70+
run: ${{ matrix.settings.build }}
71+
shell: bash
72+
73+
- run: ls -al ./packages/minifier
74+
shell: bash
75+
76+
- name: Upload artifact
77+
uses: actions/upload-artifact@v3
78+
with:
79+
name: |
80+
minifier-${{ matrix.settings.target }}
81+
path: |
82+
./packages/minifier/minifier*
83+
if-no-files-found: error

0 commit comments

Comments
 (0)