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

Commit 1fab7dc

Browse files
feat: add cortex-cpp version to log (#912)
Co-authored-by: vansangpfiev <sang@jan.ai>
1 parent 3442317 commit 1fab7dc

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

.github/workflows/cortex-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ jobs:
4343
- os: "linux"
4444
name: "amd64"
4545
runs-on: "ubuntu-20-04"
46-
cmake-flags: ""
46+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}}"
4747
build-deps-cmake-flags: ""
4848
arch: "x64"
4949
platform: "linux"
5050
- os: "mac"
5151
name: "amd64"
5252
runs-on: "macos-13"
53-
cmake-flags: ""
53+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}}"
5454
build-deps-cmake-flags: ""
5555
arch: "x64"
5656
platform: "darwin"
5757
- os: "mac"
5858
name: "arm64"
5959
runs-on: "macos-latest"
60-
cmake-flags: "-DMAC_ARM64=ON"
60+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}} -DMAC_ARM64=ON"
6161
build-deps-cmake-flags: ""
6262
arch: "arm64"
6363
platform: "darwin"
6464
- os: "windows"
6565
name: "amd64"
6666
runs-on: "windows-cuda-12-0"
67-
cmake-flags: "-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
67+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
6868
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
6969
arch: "x64"
7070
platform: "win32"

.github/workflows/cortex-cpp-quality-gate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ jobs:
2424
- os: "linux"
2525
name: "amd64"
2626
runs-on: "ubuntu-20-04"
27-
cmake-flags: ""
27+
cmake-flags: "-DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}}"
2828
build-deps-cmake-flags: ""
2929
ccache-dir: ''
3030
- os: "mac"
3131
name: "amd64"
3232
runs-on: "macos-13"
33-
cmake-flags: ""
33+
cmake-flags: "-DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}}"
3434
build-deps-cmake-flags: ""
3535
ccache-dir: ''
3636
- os: "mac"
3737
name: "arm64"
3838
runs-on: "mac-silicon"
39-
cmake-flags: "-DMAC_ARM64=ON"
39+
cmake-flags: "-DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DMAC_ARM64=ON"
4040
build-deps-cmake-flags: ""
4141
ccache-dir: ''
4242
- os: "windows"
4343
name: "amd64"
4444
runs-on: "windows-cuda-12-0"
45-
cmake-flags: "-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
45+
cmake-flags: "-DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
4646
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
4747
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
4848
steps:

.github/workflows/nightly-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ jobs:
5151
- os: "linux"
5252
name: "amd64"
5353
runs-on: "ubuntu-20-04"
54-
cmake-flags: ""
54+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}}"
5555
build-deps-cmake-flags: ""
5656
ccache-dir: ''
5757
- os: "mac"
5858
name: "amd64"
5959
runs-on: "macos-13"
60-
cmake-flags: ""
60+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}}"
6161
build-deps-cmake-flags: ""
6262
ccache-dir: ''
6363
- os: "mac"
6464
name: "arm64"
6565
runs-on: "mac-silicon"
66-
cmake-flags: "-DMAC_ARM64=ON"
66+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}} -DMAC_ARM64=ON"
6767
build-deps-cmake-flags: ""
6868
ccache-dir: ''
6969
- os: "windows"
7070
name: "amd64"
7171
runs-on: "windows-cuda-12-0"
72-
cmake-flags: "-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
72+
cmake-flags: "-DCORTEX_CPP_VERSION=${{needs.create-draft-release.outputs.version}} -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
7373
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
7474
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
7575

cortex-cpp/addon.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ void start() {
3636
#else
3737
LOG_INFO << "cortex-cpp version: undefined";
3838
#endif
39-
#ifdef CORTEX_LLAMACPP_VERSION
40-
LOG_INFO << "cortex.llamacpp version: " << CORTEX_LLAMACPP_VERSION;
41-
#endif
4239

4340
LOG_INFO << "Server started, listening at: " << host << ":" << port;
4441
LOG_INFO << "Please load your model";

cortex-cpp/main.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ int main(int argc, char* argv[]) {
7474
#else
7575
LOG_INFO << "cortex-cpp version: undefined";
7676
#endif
77-
#ifdef CORTEX_LLAMACPP_VERSION
78-
LOG_INFO << "cortex.llamacpp version: " << CORTEX_LLAMACPP_VERSION;
79-
#endif
8077

8178
LOG_INFO << "Server started, listening at: " << host << ":" << port;
8279
LOG_INFO << "Please load your model";

0 commit comments

Comments
 (0)