@@ -10,121 +10,121 @@ permissions:
10
10
workflow_dispatch : {}
11
11
workflow_call : {}
12
12
jobs :
13
- build-macos :
14
- name : Build macOS bindings
15
- runs-on : macos-latest
16
- defaults :
17
- run :
18
- working-directory : rust/js_bindings
19
- steps :
20
- - uses : actions/checkout@v4
21
- - name : Install pnpm
22
- uses : pnpm/action-setup@v4
23
- with :
24
- version : 9
25
- run_install : false
26
- - name : Setup node
27
- uses : useblacksmith/setup-node@v5
28
- with :
29
- node-version : 20
30
- cache : pnpm
31
- cache-dependency-path : rust/js_bindings/pnpm-lock.yaml
32
- - name : Set up Rust toolchain
33
- uses : actions-rs/toolchain@v1
34
- with :
35
- toolchain : stable
36
- override : true
37
- - name : Install Protoc
38
- uses : arduino/setup-protoc@v3
39
- with :
40
- repo-token : ${{ secrets.GITHUB_TOKEN }}
41
- - name : Add targets
42
- run : |
43
- rustup target add x86_64-apple-darwin
44
- rustup target add aarch64-apple-darwin
45
- - name : Cache cargo
46
- uses : actions/cache@v4
47
- with :
48
- path : |
49
- ~/.cargo/registry/index/
50
- ~/.cargo/registry/cache/
51
- ~/.cargo/git/db/
52
- rust/js_bindings/.cargo-cache
53
- rust/js_bindings/target/
54
- key : macos-cargo
55
- - name : Install dependencies
56
- run : pnpm install
57
- - name : Build ARM64
58
- run : pnpm build --target aarch64-apple-darwin
59
- shell : bash
60
- - name : Build x86_64
61
- run : pnpm build --target x86_64-apple-darwin
62
- shell : bash
63
- - name : Upload ARM64 artifact
64
- uses : actions/upload-artifact@v4
65
- with :
66
- name : bindings-aarch64-apple-darwin
67
- path : rust/js_bindings/chromadb-js-bindings.darwin-arm64.node
68
- if-no-files-found : error
69
- - name : Upload x86_64 artifact
70
- uses : actions/upload-artifact@v4
71
- with :
72
- name : bindings-x86_64-apple-darwin
73
- path : rust/js_bindings/chromadb-js-bindings.darwin-x64.node
74
- if-no-files-found : error
13
+ # build-macos:
14
+ # name: Build macOS bindings
15
+ # runs-on: macos-latest
16
+ # defaults:
17
+ # run:
18
+ # working-directory: rust/js_bindings
19
+ # steps:
20
+ # - uses: actions/checkout@v4
21
+ # - name: Install pnpm
22
+ # uses: pnpm/action-setup@v4
23
+ # with:
24
+ # version: 9
25
+ # run_install: false
26
+ # - name: Setup node
27
+ # uses: useblacksmith/setup-node@v5
28
+ # with:
29
+ # node-version: 20
30
+ # cache: pnpm
31
+ # cache-dependency-path: rust/js_bindings/pnpm-lock.yaml
32
+ # - name: Set up Rust toolchain
33
+ # uses: actions-rs/toolchain@v1
34
+ # with:
35
+ # toolchain: stable
36
+ # override: true
37
+ # - name: Install Protoc
38
+ # uses: arduino/setup-protoc@v3
39
+ # with:
40
+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
41
+ # - name: Add targets
42
+ # run: |
43
+ # rustup target add x86_64-apple-darwin
44
+ # rustup target add aarch64-apple-darwin
45
+ # - name: Cache cargo
46
+ # uses: actions/cache@v4
47
+ # with:
48
+ # path: |
49
+ # ~/.cargo/registry/index/
50
+ # ~/.cargo/registry/cache/
51
+ # ~/.cargo/git/db/
52
+ # rust/js_bindings/.cargo-cache
53
+ # rust/js_bindings/target/
54
+ # key: macos-cargo
55
+ # - name: Install dependencies
56
+ # run: pnpm install
57
+ # - name: Build ARM64
58
+ # run: pnpm build --target aarch64-apple-darwin
59
+ # shell: bash
60
+ # - name: Build x86_64
61
+ # run: pnpm build --target x86_64-apple-darwin
62
+ # shell: bash
63
+ # - name: Upload ARM64 artifact
64
+ # uses: actions/upload-artifact@v4
65
+ # with:
66
+ # name: bindings-aarch64-apple-darwin
67
+ # path: rust/js_bindings/chromadb-js-bindings.darwin-arm64.node
68
+ # if-no-files-found: error
69
+ # - name: Upload x86_64 artifact
70
+ # uses: actions/upload-artifact@v4
71
+ # with:
72
+ # name: bindings-x86_64-apple-darwin
73
+ # path: rust/js_bindings/chromadb-js-bindings.darwin-x64.node
74
+ # if-no-files-found: error
75
75
76
- build-windows :
77
- name : Build Windows bindings
78
- runs-on : windows-latest
79
- defaults :
80
- run :
81
- working-directory : rust/js_bindings
82
- steps :
83
- - uses : actions/checkout@v4
84
- - name : Install pnpm
85
- uses : pnpm/action-setup@v4
86
- with :
87
- version : 9
88
- run_install : false
89
- - name : Setup node
90
- uses : useblacksmith/setup-node@v5
91
- with :
92
- node-version : 20
93
- cache : pnpm
94
- cache-dependency-path : rust/js_bindings/pnpm-lock.yaml
95
- - name : Set up Rust toolchain
96
- uses : actions-rs/toolchain@v1
97
- with :
98
- toolchain : stable
99
- override : true
100
- - name : Install Protoc
101
- uses : arduino/setup-protoc@v3
102
- with :
103
- repo-token : ${{ secrets.GITHUB_TOKEN }}
104
- - name : Add target
105
- run : rustup target add x86_64-pc-windows-msvc
106
- shell : bash
107
- - name : Cache cargo
108
- uses : actions/cache@v4
109
- with :
110
- path : |
111
- ~/.cargo/registry/index/
112
- ~/.cargo/registry/cache/
113
- ~/.cargo/git/db/
114
- rust/js_bindings/.cargo-cache
115
- rust/js_bindings/target/
116
- key : windows-cargo
117
- - name : Install dependencies
118
- run : pnpm install
119
- - name : Build x86_64
120
- run : pnpm build --target x86_64-pc-windows-msvc
121
- shell : bash
122
- - name : Upload x86_64 artifact
123
- uses : actions/upload-artifact@v4
124
- with :
125
- name : bindings-x86_64-pc-windows-msvc
126
- path : rust/js_bindings/chromadb-js-bindings.win32-x64-msvc.node
127
- if-no-files-found : error
76
+ # build-windows:
77
+ # name: Build Windows bindings
78
+ # runs-on: windows-latest
79
+ # defaults:
80
+ # run:
81
+ # working-directory: rust/js_bindings
82
+ # steps:
83
+ # - uses: actions/checkout@v4
84
+ # - name: Install pnpm
85
+ # uses: pnpm/action-setup@v4
86
+ # with:
87
+ # version: 9
88
+ # run_install: false
89
+ # - name: Setup node
90
+ # uses: useblacksmith/setup-node@v5
91
+ # with:
92
+ # node-version: 20
93
+ # cache: pnpm
94
+ # cache-dependency-path: rust/js_bindings/pnpm-lock.yaml
95
+ # - name: Set up Rust toolchain
96
+ # uses: actions-rs/toolchain@v1
97
+ # with:
98
+ # toolchain: stable
99
+ # override: true
100
+ # - name: Install Protoc
101
+ # uses: arduino/setup-protoc@v3
102
+ # with:
103
+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
104
+ # - name: Add target
105
+ # run: rustup target add x86_64-pc-windows-msvc
106
+ # shell: bash
107
+ # - name: Cache cargo
108
+ # uses: actions/cache@v4
109
+ # with:
110
+ # path: |
111
+ # ~/.cargo/registry/index/
112
+ # ~/.cargo/registry/cache/
113
+ # ~/.cargo/git/db/
114
+ # rust/js_bindings/.cargo-cache
115
+ # rust/js_bindings/target/
116
+ # key: windows-cargo
117
+ # - name: Install dependencies
118
+ # run: pnpm install
119
+ # - name: Build x86_64
120
+ # run: pnpm build --target x86_64-pc-windows-msvc
121
+ # shell: bash
122
+ # - name: Upload x86_64 artifact
123
+ # uses: actions/upload-artifact@v4
124
+ # with:
125
+ # name: bindings-x86_64-pc-windows-msvc
126
+ # path: rust/js_bindings/chromadb-js-bindings.win32-x64-msvc.node
127
+ # if-no-files-found: error
128
128
129
129
build-linux :
130
130
name : Build Linux bindings
@@ -188,30 +188,30 @@ jobs:
188
188
# Build with the correct environment
189
189
pnpm build --target aarch64-unknown-linux-gnu
190
190
shell : bash
191
- - name : Build x86_64
192
- run : pnpm build --target x86_64-unknown-linux-gnu
193
- shell : bash
191
+ # - name: Build x86_64
192
+ # run: pnpm build --target x86_64-unknown-linux-gnu
193
+ # shell: bash
194
194
- name : Upload ARM64 artifact
195
195
uses : actions/upload-artifact@v4
196
196
with :
197
197
name : bindings-aarch64-unknown-linux-gnu
198
198
path : rust/js_bindings/chromadb-js-bindings.linux-arm64-gnu.node
199
199
if-no-files-found : error
200
- - name : Upload x86_64 artifact
201
- uses : actions/upload-artifact@v4
202
- with :
203
- name : bindings-x86_64-unknown-linux-gnu
204
- path : rust/js_bindings/chromadb-js-bindings.linux-x64-gnu.node
205
- if-no-files-found : error
200
+ # - name: Upload x86_64 artifact
201
+ # uses: actions/upload-artifact@v4
202
+ # with:
203
+ # name: bindings-x86_64-unknown-linux-gnu
204
+ # path: rust/js_bindings/chromadb-js-bindings.linux-x64-gnu.node
205
+ # if-no-files-found: error
206
206
publish :
207
207
name : Publish
208
208
runs-on : ubuntu-latest
209
209
defaults :
210
210
run :
211
211
working-directory : rust/js_bindings
212
212
needs :
213
- - build-macos
214
- - build-windows
213
+ # - build-macos
214
+ # - build-windows
215
215
- build-linux
216
216
steps :
217
217
- uses : actions/checkout@v4
@@ -231,50 +231,17 @@ jobs:
231
231
- name : Download all artifacts
232
232
uses : actions/download-artifact@v4
233
233
with :
234
- path : artifacts
235
- - name : Debug artifact structure
236
- run : |
237
- find artifacts -type f -name "*.node" | sort
238
- mkdir -p npm
239
- shell : bash
240
- - name : Move artifacts to npm packages
241
- run : |
242
- # Darwin/macOS
243
- if [ -f artifacts/bindings-aarch64-apple-darwin/chromadb-js-bindings.darwin-arm64.node ]; then
244
- mkdir -p npm/darwin-arm64
245
- cp artifacts/bindings-aarch64-apple-darwin/chromadb-js-bindings.darwin-arm64.node npm/darwin-arm64/
246
- fi
247
-
248
- if [ -f artifacts/bindings-x86_64-apple-darwin/chromadb-js-bindings.darwin-x64.node ]; then
249
- mkdir -p npm/darwin-x64
250
- cp artifacts/bindings-x86_64-apple-darwin/chromadb-js-bindings.darwin-x64.node npm/darwin-x64/
251
- fi
252
-
253
- # Linux
254
- if [ -f artifacts/bindings-aarch64-unknown-linux-gnu/chromadb-js-bindings.linux-arm64-gnu.node ]; then
255
- mkdir -p npm/linux-arm64-gnu
256
- cp artifacts/bindings-aarch64-unknown-linux-gnu/chromadb-js-bindings.linux-arm64-gnu.node npm/linux-arm64-gnu/
257
- fi
258
-
259
- if [ -f artifacts/bindings-x86_64-unknown-linux-gnu/chromadb-js-bindings.linux-x64-gnu.node ]; then
260
- mkdir -p npm/linux-x64-gnu
261
- cp artifacts/bindings-x86_64-unknown-linux-gnu/chromadb-js-bindings.linux-x64-gnu.node npm/linux-x64-gnu/
262
- fi
263
-
264
- # Windows
265
- if [ -f artifacts/bindings-x86_64-pc-windows-msvc/chromadb-js-bindings.win32-x64-msvc.node ]; then
266
- mkdir -p npm/win32-x64-msvc
267
- cp artifacts/bindings-x86_64-pc-windows-msvc/chromadb-js-bindings.win32-x64-msvc.node npm/win32-x64-msvc/
268
- fi
269
-
270
- # Run napi artifacts to create package.json files
271
- pnpm artifacts
272
-
273
- # Verify .node files are in the right place
274
- find npm -type f -name "*.node" | sort
275
- shell : bash
234
+ path : rust/js_bindings/artifacts
235
+ - name : List downloads
236
+ run : ls -R /home/runner/work/chroma/chroma/artifacts
237
+ - name : Flatten artifact directory
238
+ run : find artifacts -type f -name '*.node' -exec mv {} ./artifacts/ \;
239
+ - name : List downloads
240
+ run : ls -R /home/runner/work/chroma/chroma/artifacts
241
+ - name : Move artifacts
242
+ run : pnpm artifacts
276
243
- name : List packages
277
- run : ls -R ./npm
244
+ run : ls -R .
278
245
shell : bash
279
246
- name : Publish
280
247
run : |
0 commit comments