-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.37 KB
/
Copy pathnode.yml
File metadata and controls
52 lines (40 loc) · 1.37 KB
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
name: Node
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
smoke:
name: Build + smoke test Node binding
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [20, 22]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Build the binding (release)
run: cargo build -p profanite-node --release
- name: Stage .node binary (Linux)
if: runner.os == 'Linux'
run: cp target/release/libprofanite_node.so crates/profanite-node/profanite.linux-x64.node
- name: Stage .node binary (macOS)
if: runner.os == 'macOS'
run: cp target/release/libprofanite_node.dylib crates/profanite-node/profanite.darwin-$(uname -m).node
- name: Stage .node binary (Windows)
if: runner.os == 'Windows'
shell: bash
run: cp target/release/profanite_node.dll crates/profanite-node/profanite.win32-x64.node
- name: Smoke test
run: node crates/profanite-node/test/smoke.js
- name: Perf sanity (informational)
if: runner.os != 'Windows'
run: node crates/profanite-node/test/perf.js