@@ -2,10 +2,14 @@ name: deploy javascript sdk
22on :
33 workflow_dispatch :
44jobs :
5- build-javascript-sdk :
5+ build-javascript-sdk-macos-windows :
66 strategy :
77 matrix :
8- os : ["ubuntu-22.04", "buildjet-4vcpu-ubuntu-2204-arm", "macos-latest", "windows-latest"]
8+ os :
9+ [
10+ " macos-latest" ,
11+ " windows-latest" ,
12+ ]
913 include :
1014 - neon-out-name : " x86_64-unknown-linux-gnu-index.node"
1115 os : " ubuntu-22.04"
3741 - name : Upload built .node file
3842 uses : actions/upload-artifact@v3
3943 with :
40- name : node-artifacts
44+ name : node-artifacts
45+ path : pgml-sdks/pgml/javascript/dist/${{ matrix.neon-out-name }}
46+ retention-days : 1
47+ build-javascript-sdk-linux :
48+ strategy :
49+ matrix :
50+ os :
51+ [
52+ " ubuntu-22.04" ,
53+ " buildjet-4vcpu-ubuntu-2204-arm" ,
54+ ]
55+ include :
56+ - neon-out-name : " x86_64-unknown-linux-gnu-index.node"
57+ os : " ubuntu-22.04"
58+ - neon-out-name : " aarch64-unknown-linux-gnu-index.node"
59+ os : " buildjet-4vcpu-ubuntu-2204-arm"
60+ runs-on : ubuntu-latest
61+ container : ubuntu:16.04
62+ defaults :
63+ run :
64+ working-directory : pgml-sdks/pgml/javascript
65+ steps :
66+ - uses : actions/checkout@v3
67+ - name : Install dependencies
68+ run : |
69+ apt update
70+ apt-get -y install curl
71+ apt-get -y install build-essential
72+ - uses : actions-rs/toolchain@v1
73+ with :
74+ toolchain : stable
75+ - name : Validate cargo is working
76+ uses : postgresml/gh-actions-cargo@master
77+ with :
78+ command : version
79+ - uses : actions/setup-node@v3
80+ with :
81+ node-version : 16
82+ - name : Do build
83+ env :
84+ TYPESCRIPT_DECLARATION_FILE : " javascript/index.d.ts"
85+ run : |
86+ npm i
87+ npm run build-release
88+ - name : Upload built .node file
89+ uses : actions/upload-artifact@v3
90+ with :
91+ name : node-artifacts
4192 path : pgml-sdks/pgml/javascript/dist/${{ matrix.neon-out-name }}
4293 retention-days : 1
4394 # publish-javascript-sdk:
69120 # - name: Generate types declaration
70121 # run: |
71122 # npm i
72- # npm run build
123+ # npm run build
73124 # rm index.node
74125 # - run: npm ci
75126 # - run: npm publish
0 commit comments