Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit e21aaf4

Browse files
authored
add build-deps for cortex-cpp binding (#988)
Co-authored-by: Hien To <tominhhien97@gmail.com>
1 parent 0ef01d9 commit e21aaf4

File tree

3 files changed

+14
-99
lines changed

3 files changed

+14
-99
lines changed

.github/workflows/cortex-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ jobs:
187187
rm package.json
188188
mv package-tmp.json package.json
189189
190+
- name: Remove build build-deps and build folder for windows
191+
if: runner.os == 'Windows'
192+
run: |
193+
cd cortex-cpp
194+
Remove-Item -Recurse -Force build
195+
Remove-Item -Recurse -Force build-deps
196+
190197
# build prebuilds
191198
- name: Build Prebuilds
192199
working-directory: cortex-cpp
@@ -207,7 +214,7 @@ jobs:
207214
asset_content_type: application/gzip
208215

209216
# Setup .npmrc file to publish to npm - upload only once
210-
- run: npm publish --access public
217+
- run: rm -rf build-deps && rm -rf build && rm -rf prebuilds && npm publish --access public
211218
continue-on-error: true
212219
if: runner.os == 'linux'
213220
env:

cortex-cpp/engines/cortex.llamacpp/engine.cmake

Lines changed: 0 additions & 92 deletions
This file was deleted.

cortex-cpp/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
"url": "git+https://github.com/janhq/cortex.git"
1010
},
1111
"scripts": {
12-
"install": "prebuild-install --runtime napi --backend cmake-js --config Release || cmake-js rebuild --config Release",
13-
"build": "cmake-js configure --config Release && cmake-js build --config Release",
14-
"rebuild": "cmake-js rebuild --config Release",
15-
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\.(node|exp|lib|so)$\"",
12+
"install": "prebuild-install --runtime napi --backend cmake-js --config Release || yarn build-deps && cmake-js rebuild --config Release",
13+
"build-deps": "cmake-js configure --directory ./cortex-cpp-deps --out ./build-deps/cortex-cpp-deps && cmake-js build --directory ./cortex-cpp-deps --out ./build-deps/cortex-cpp-deps --config Release",
14+
"build": "yarn build-deps && cmake-js configure --config Release && cmake-js build --config Release",
15+
"rebuild": "yarn build-deps && cmake-js rebuild --config Release",
16+
"prebuild": "yarn build-deps && prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\.(node|exp|lib|so)$\"",
1617
"upload": "prebuild --runtime napi --backend cmake-js --upload ${GITHUB_TOKEN}"
1718
},
1819
"author": "Jan <service@jan.ai>",
@@ -35,7 +36,6 @@
3536
]
3637
},
3738
"files": [
38-
"binding/*.js",
39-
"binding/*.d.ts"
39+
"**"
4040
]
4141
}

0 commit comments

Comments
 (0)