Skip to content

Commit

Permalink
add build-deps for cortex-cpp binding
Browse files Browse the repository at this point in the history
  • Loading branch information
hiento09 committed Aug 7, 2024
1 parent 0ef01d9 commit aad6165
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 99 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cortex-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ jobs:
rm package.json
mv package-tmp.json package.json
- name: Remove build build-deps and build folder for windows
if: runner.os == 'Windows'
run: |
cd cortex-cpp
Remove-Item -Recurse -Force build
Remove-Item -Recurse -Force build-deps
# build prebuilds
- name: Build Prebuilds
working-directory: cortex-cpp
Expand All @@ -207,7 +214,7 @@ jobs:
asset_content_type: application/gzip

# Setup .npmrc file to publish to npm - upload only once
- run: npm publish --access public
- run: rm -rf build-deps && rm -rf build && rm -rf prebuilds && npm publish --access public
continue-on-error: true
if: runner.os == 'linux'
env:
Expand Down
92 changes: 0 additions & 92 deletions cortex-cpp/engines/cortex.llamacpp/engine.cmake

This file was deleted.

12 changes: 6 additions & 6 deletions cortex-cpp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"url": "git+https://github.com/janhq/cortex.git"
},
"scripts": {
"install": "prebuild-install --runtime napi --backend cmake-js --config Release || cmake-js rebuild --config Release",
"build": "cmake-js configure --config Release && cmake-js build --config Release",
"rebuild": "cmake-js rebuild --config Release",
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\.(node|exp|lib|so)$\"",
"install": "prebuild-install --runtime napi --backend cmake-js --config Release || yarn build-deps && cmake-js rebuild --config Release",
"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",
"build": "yarn build-deps && cmake-js configure --config Release && cmake-js build --config Release",
"rebuild": "yarn build-deps && cmake-js rebuild --config Release",
"prebuild": "yarn build-deps && prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\.(node|exp|lib|so)$\"",
"upload": "prebuild --runtime napi --backend cmake-js --upload ${GITHUB_TOKEN}"
},
"author": "Jan <[email protected]>",
Expand All @@ -35,7 +36,6 @@
]
},
"files": [
"binding/*.js",
"binding/*.d.ts"
"**"
]
}

0 comments on commit aad6165

Please sign in to comment.