This repository was archived by the owner on Oct 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 405
97 lines (80 loc) · 2.62 KB
/
mac-nodejs-workflow.yml
File metadata and controls
97 lines (80 loc) · 2.62 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build Mac Node.js Module
on:
workflow_dispatch:
workflow_call:
inputs:
isNightly:
type: boolean
required: true
default: false
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
jobs:
build-mac-nodejs-arm64:
runs-on: self-hosted-mac-arm64
steps:
- uses: actions/checkout@v4
- name: Update nightly version
if: ${{ inputs.isNightly == true }}
run: |
pip3 install packaging
python3 update-nightly-build-version.py
working-directory: scripts
- name: Create Node.js source distribution
working-directory: tools/nodejs_api
run: |
rm -rf kuzu-source.tar.gz package *.node
node package
- name: Extract tarball
working-directory: tools/nodejs_api
run: tar -xvzf kuzu-source.tar.gz
- name: Build Node.js native module for Apple Silicon
working-directory: tools/nodejs_api/package
run: npm i
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
ARCHFLAGS: "-arch arm64"
- name: Move Node.js native module
working-directory: tools/nodejs_api/
run: mv package/kuzujs.node kuzujs-darwin-arm64.node
- uses: actions/upload-artifact@v4
with:
name: mac-nodejs-module-arm64
path: tools/nodejs_api/kuzujs-darwin-*.node
- name: Clean up
working-directory: tools/nodejs_api/
run: rm -rf package
build-mac-nodejs-x86_64:
runs-on: self-hosted-mac-x64
steps:
- uses: actions/checkout@v4
- name: Update nightly version
if: ${{ inputs.isNightly == true }}
run: |
pip3 install packaging
python3 update-nightly-build-version.py
working-directory: scripts
- name: Create Node.js source distribution
working-directory: tools/nodejs_api
run: |
rm -rf kuzu-source.tar.gz package *.node
node package
- name: Extract tarball
working-directory: tools/nodejs_api
run: tar -xvzf kuzu-source.tar.gz
- name: Build Node.js native module for Intel
working-directory: tools/nodejs_api/package
run: npm i
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
ARCHFLAGS: "-arch x86_64"
- name: Move Node.js native module
working-directory: tools/nodejs_api/
run: mv package/kuzujs.node kuzujs-darwin-x64.node
- uses: actions/upload-artifact@v4
with:
name: mac-nodejs-module-x86_64
path: tools/nodejs_api/kuzujs-darwin-*.node
- name: Clean up
working-directory: tools/nodejs_api/
run: rm -rf package