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

Commit 69ba031

Browse files
authored
fix: cortex-cpp node prebuild dependencies (#879)
1 parent 7052afa commit 69ba031

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

.github/workflows/cortex-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ jobs:
218218

219219
build-cortex-single-binary:
220220
runs-on: ${{ matrix.runs-on }}
221-
needs: [create-draft-release]
221+
needs: [create-draft-release, build-and-test]
222222
timeout-minutes: 20
223223
strategy:
224224
fail-fast: false

cortex-cpp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"install": "prebuild-install --runtime napi --backend cmake-js --config Release || cmake-js rebuild --config Release",
1313
"build": "cmake-js configure --config Release && cmake-js build --config Release",
1414
"rebuild": "cmake-js rebuild --config Release",
15-
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release",
15+
"prebuild": "prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\.(node|exp|lib|so)$\"",
1616
"upload": "prebuild --runtime napi --backend cmake-js --upload ${GITHUB_TOKEN}"
1717
},
1818
"author": "Jan <service@jan.ai>",

cortex-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"class-transformer": "^0.5.1",
5353
"class-validator": "^0.14.1",
5454
"cli-progress": "^3.12.0",
55-
"cortex-cpp": "^0.4.24",
55+
"cortex-cpp": "^0.4.25",
5656
"cortexso-node": "^0.0.4",
5757
"cpu-instructions": "^0.0.11",
5858
"decompress": "^4.2.1",

cortex-js/src/infrastructure/commanders/usecases/init.cli.usecases.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ export class InitCliUsecases {
8888
? '-mac'
8989
: '-linux',
9090
// CPU Instructions - CPU | GPU Non-Vulkan
91-
options?.instructions &&
92-
(options?.runMode === 'CPU' ||
93-
(options?.runMode === 'GPU' && !isVulkan))
91+
options?.instructions && !isVulkan
9492
? `-${options?.instructions?.toLowerCase()}`
9593
: '',
9694
// Cuda
@@ -229,11 +227,12 @@ export class InitCliUsecases {
229227
(e) => e.name === version.replace('v', ''),
230228
);
231229
}
232-
233230
// Find the asset for the current platform
234-
const toDownloadAsset = release.assets.find((asset: any) =>
235-
matchers.every((matcher) => asset.name.includes(matcher)),
236-
);
231+
const toDownloadAsset = release.assets
232+
.sort((a: any, b: any) => a.name.length - b.name.length)
233+
.find((asset: any) =>
234+
matchers.every((matcher) => asset.name.includes(matcher)),
235+
);
237236

238237
if (!toDownloadAsset) {
239238
console.log(

0 commit comments

Comments
 (0)