@@ -2,10 +2,14 @@ name: deploy javascript sdk
2
2
on :
3
3
workflow_dispatch :
4
4
jobs :
5
- build-javascript-sdk :
5
+ build-javascript-sdk-macos-windows :
6
6
strategy :
7
7
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
+ ]
9
13
include :
10
14
- neon-out-name : " x86_64-unknown-linux-gnu-index.node"
11
15
os : " ubuntu-22.04"
37
41
- name : Upload built .node file
38
42
uses : actions/upload-artifact@v3
39
43
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
41
92
path : pgml-sdks/pgml/javascript/dist/${{ matrix.neon-out-name }}
42
93
retention-days : 1
43
94
# publish-javascript-sdk:
69
120
# - name: Generate types declaration
70
121
# run: |
71
122
# npm i
72
- # npm run build
123
+ # npm run build
73
124
# rm index.node
74
125
# - run: npm ci
75
126
# - run: npm publish
0 commit comments