Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add build-deps for cortex-cpp binding #988

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
"**"
]
}
Loading