Skip to content

Commit

Permalink
Rename binary file from cortex-cpp to cortex
Browse files Browse the repository at this point in the history
  • Loading branch information
hientominh committed Sep 9, 2024
1 parent f241d9c commit 0e61156
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 275 deletions.
250 changes: 0 additions & 250 deletions .github/workflows/cortex-build.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/cortex-cpp-quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: cortex-cpp-${{ matrix.os }}-${{ matrix.name }}
path: ./engine/cortex-cpp
name: cortex-${{ matrix.os }}-${{ matrix.name }}
path: ./engine/cortex

- name: Upload ccache to s3
continue-on-error: true
if: always() && runner.os == 'Windows'
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
env:
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cortex-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: cortex-cpp-${{ matrix.os }}-${{ matrix.name }}
path: ./engine/cortex-cpp
name: cortex-${{ matrix.os }}-${{ matrix.name }}
path: ./engine/cortex

- name: Upload ccache to s3
continue-on-error: true
if: always() && runner.os == 'Windows'
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
env:
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
Expand Down
2 changes: 1 addition & 1 deletion engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)

project(cortex-cpp C CXX)
project(cortex C CXX)

# Build using CMAKE-JS
if(DEFINED CMAKE_JS_INC)
Expand Down
36 changes: 18 additions & 18 deletions engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ endif

pre-package:
ifeq ($(OS),Windows_NT)
@powershell -Command "mkdir -p cortex-cpp;"
@powershell -Command "cp build\cortex-cpp.exe .\cortex-cpp\;"
@powershell -Command "cp ..\.github\patches\windows\msvcp140.dll .\cortex-cpp\;"
@powershell -Command "cp ..\.github\patches\windows\vcruntime140_1.dll .\cortex-cpp\;"
@powershell -Command "cp ..\.github\patches\windows\vcruntime140.dll .\cortex-cpp\;"
@powershell -Command "mkdir -p cortex;"
@powershell -Command "cp build\cortex.exe .\cortex\;"
@powershell -Command "cp ..\.github\patches\windows\msvcp140.dll .\cortex\;"
@powershell -Command "cp ..\.github\patches\windows\vcruntime140_1.dll .\cortex\;"
@powershell -Command "cp ..\.github\patches\windows\vcruntime140.dll .\cortex\;"
else ifeq ($(shell uname -s),Linux)
@mkdir -p cortex-cpp; \
cp build/cortex-cpp cortex-cpp/;
@mkdir -p cortex; \
cp build/cortex cortex/;
else
@mkdir -p cortex-cpp; \
cp build/cortex-cpp cortex-cpp/;
@mkdir -p cortex; \
cp build/cortex cortex/;
endif

codesign:
Expand All @@ -67,29 +67,29 @@ endif

ifeq ($(OS),Windows_NT)
@powershell -Command "dotnet tool install --global AzureSignTool;"
@powershell -Command 'azuresigntool.exe sign -kvu "$(AZURE_KEY_VAULT_URI)" -kvi "$(AZURE_CLIENT_ID)" -kvt "$(AZURE_TENANT_ID)" -kvs "$(AZURE_CLIENT_SECRET)" -kvc "$(AZURE_CERT_NAME)" -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\cortex-cpp\cortex-cpp.exe";'
@powershell -Command 'azuresigntool.exe sign -kvu "$(AZURE_KEY_VAULT_URI)" -kvi "$(AZURE_CLIENT_ID)" -kvt "$(AZURE_TENANT_ID)" -kvs "$(AZURE_CLIENT_SECRET)" -kvc "$(AZURE_CERT_NAME)" -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\cortex-cpp\engines\cortex.llamacpp\engine.dll";'
@powershell -Command 'azuresigntool.exe sign -kvu "$(AZURE_KEY_VAULT_URI)" -kvi "$(AZURE_CLIENT_ID)" -kvt "$(AZURE_TENANT_ID)" -kvs "$(AZURE_CLIENT_SECRET)" -kvc "$(AZURE_CERT_NAME)" -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\cortex\cortex.exe";'
@powershell -Command 'azuresigntool.exe sign -kvu "$(AZURE_KEY_VAULT_URI)" -kvi "$(AZURE_CLIENT_ID)" -kvt "$(AZURE_TENANT_ID)" -kvs "$(AZURE_CLIENT_SECRET)" -kvc "$(AZURE_CERT_NAME)" -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\cortex\engines\cortex.llamacpp\engine.dll";'
else ifeq ($(shell uname -s),Linux)
@echo "Skipping Code Sign for linux"
@exit 0
else
find "cortex-cpp" -type f -exec codesign --force -s "$(DEVELOPER_ID)" --options=runtime {} \;
find "cortex" -type f -exec codesign --force -s "$(DEVELOPER_ID)" --options=runtime {} \;
endif

package:
ifeq ($(OS),Windows_NT)
@powershell -Command "7z a -ttar temp.tar cortex-cpp\*; 7z a -tgzip cortex-cpp.tar.gz temp.tar;"
@powershell -Command "7z a -ttar temp.tar cortex\*; 7z a -tgzip cortex.tar.gz temp.tar;"
else ifeq ($(shell uname -s),Linux)
tar -czvf cortex-cpp.tar.gz cortex-cpp;
tar -czvf cortex.tar.gz cortex;
else
tar -czvf cortex-cpp.tar.gz cortex-cpp;
tar -czvf cortex.tar.gz cortex;
endif

clean:
ifeq ($(OS),Windows_NT)
@powershell -Command "rm -rf build; rm -rf build-deps; rm -rf cortex-cpp; rm -rf cortex-cpp.tar.gz;"
@powershell -Command "rm -rf build; rm -rf build-deps; rm -rf cortex; rm -rf cortex.tar.gz;"
else ifeq ($(shell uname -s),Linux)
@rm -rf build; rm -rf build-deps; rm -rf cortex-cpp; rm -rf cortex-cpp.tar.gz;
@rm -rf build; rm -rf build-deps; rm -rf cortex; rm -rf cortex.tar.gz;
else
@rm -rf build; rm -rf build-deps; rm -rf cortex-cpp; rm -rf cortex-cpp.tar.gz;
@rm -rf build; rm -rf build-deps; rm -rf cortex; rm -rf cortex.tar.gz;
endif

0 comments on commit 0e61156

Please sign in to comment.