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

fix: binaries for CLI and Server #1499

Merged
merged 54 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5454488
fix: update swagger
vansangpfiev Oct 14, 2024
5caa3be
Merge branch 'dev' of github.com:janhq/nitro into fix/swagger
vansangpfiev Oct 14, 2024
3e3dff6
fix: start stop model with API call
vansangpfiev Oct 14, 2024
1bd0bbf
fix: model del
vansangpfiev Oct 14, 2024
536e8ad
fix: model get
vansangpfiev Oct 15, 2024
e4a6f7c
fix: model alias
vansangpfiev Oct 15, 2024
30e62fd
fix: model import
vansangpfiev Oct 15, 2024
0f2e0a4
fix: model status
vansangpfiev Oct 15, 2024
d37f0bf
fix: model list
vansangpfiev Oct 15, 2024
2a00d34
fix: models update
vansangpfiev Oct 15, 2024
55b5ae2
fix: engine list
vansangpfiev Oct 15, 2024
963d83f
fix: engine get
vansangpfiev Oct 15, 2024
ca7b235
fix: engine uninstall
vansangpfiev Oct 15, 2024
6bd9af2
Merge branch 'dev' of github.com:janhq/nitro into fix/swagger
vansangpfiev Oct 15, 2024
bb2a431
Merge branch 'dev' into fix/swagger
vansangpfiev Oct 16, 2024
0fa1edf
fix: add cmake for cli
vansangpfiev Oct 16, 2024
69d0878
Merge branch 'dev' of github.com:janhq/nitro into fix/swagger
vansangpfiev Oct 16, 2024
f404b9a
Merge branch 'fix/swagger' of github.com:janhq/nitro into fix/swagger
vansangpfiev Oct 16, 2024
ab84659
Merge branch 'fix/swagger' into fix/2-b
vansangpfiev Oct 16, 2024
8eef533
fix: binary name
vansangpfiev Oct 16, 2024
109bf0b
fix: test CMakeLists
sangjanai Oct 16, 2024
db649e5
fix: Makefile
sangjanai Oct 16, 2024
3a39b16
Merge branch 'dev' into fix/2-b
vansangpfiev Oct 16, 2024
8d437f8
fix: installer for 2 binaries
hiento09 Oct 16, 2024
ec1131a
Merge branch 'fix/2-b' of github.com:janhq/cortex.cpp into fix/2-b
hiento09 Oct 16, 2024
1e64d35
fix: installer for 2 binaries
hiento09 Oct 16, 2024
5a616f7
fix: windows installer disable dir page
hiento09 Oct 16, 2024
3114515
fix: add upd server cmd (in-progress)
vansangpfiev Oct 16, 2024
120ca7b
fix: add installer file to latest folder s3 for nightly updater
hiento09 Oct 16, 2024
fa5e761
fix: installer adds param skip post install
hiento09 Oct 16, 2024
be04f4b
fix: skip postinstall macos
jan-service-account Oct 16, 2024
2411315
fix: nightly installer
vansangpfiev Oct 17, 2024
ed1f0ab
fix: remove update server cmd
vansangpfiev Oct 17, 2024
4853daa
fix: pre-package
vansangpfiev Oct 17, 2024
363ec5c
Merge branch 'fix/2-b' of github.com:janhq/nitro into fix/2-b
vansangpfiev Oct 17, 2024
6de6aab
Merge branch 'dev' of github.com:janhq/nitro into fix/2-b
vansangpfiev Oct 17, 2024
d2cf334
fix: build
vansangpfiev Oct 17, 2024
ab02590
fix: support cortex update --server
sangjanai Oct 17, 2024
f548665
fix: installer adds param skip post install
hiento09 Oct 17, 2024
5b75268
fix: installer adds param skip post install
hiento09 Oct 17, 2024
00cb109
fix: correct command
sangjanai Oct 17, 2024
efb989d
Merge branch 'fix/2-b' of https://github.com/janhq/cortex.cpp into fi…
sangjanai Oct 17, 2024
5b79baa
fix: update beta and stable
sangjanai Oct 17, 2024
9704f65
fix: build
vansangpfiev Oct 17, 2024
40d8adf
Merge branch 'dev' of https://github.com/janhq/cortex.cpp into fix/2-b
sangjanai Oct 17, 2024
b2e6d84
chore: move commands to cli
sangjanai Oct 17, 2024
5159440
Merge branch 'dev' of https://github.com/janhq/cortex.cpp into fix/2-b
sangjanai Oct 17, 2024
6645e61
fix: models start timeout
sangjanai Oct 17, 2024
1e8a9ee
chore: refactor main cli
vansangpfiev Oct 17, 2024
8885cec
fix: log
vansangpfiev Oct 17, 2024
78d7627
fix: log
vansangpfiev Oct 17, 2024
c9ca89a
Merge branch 'dev' of github.com:janhq/nitro into fix/2-b
vansangpfiev Oct 17, 2024
d18926c
fix: support --port for server
vansangpfiev Oct 17, 2024
523bd4b
fix: build
vansangpfiev Oct 17, 2024
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
4 changes: 4 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/mac-universal-cortex-nightly.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/mac-universal/cortex-nightly.tar.gz
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/linux-amd64-cortex-nightly.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/linux-amd64/cortex-nightly.tar.gz
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/windows-amd64-cortex-nightly.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/windows-amd64/cortex-nightly.tar.gz
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/cortex-mac-universal-network-installer.pkg s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/mac-universal/cortex-mac-universal-network-installer.pkg
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/cortex-linux-amd64-network-installer.deb s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/linux-amd64/cortex-linux-amd64-network-installer.deb
aws s3 cp s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/cortex-windows-amd64-network-installer.exe s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/windows-amd64/cortex-windows-amd64-network-installer.exe


env:
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/template-build-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
if [ "${{ inputs.channel }}" == "stable" ]; then
echo "::set-output name=package_name::cortexcpp"
echo "::set-output name=destination_binary_name::cortex"
echo "::set-output name=destination_binary_server_name::cortex-server"
echo "::set-output name=data_folder_name::cortexcpp"
echo "::set-output name=configuration_file_name::.cortexrc"
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
Expand All @@ -94,6 +95,7 @@ jobs:
if [ "${{ inputs.channel }}" == "beta" ]; then
echo "::set-output name=package_name::cortexcpp-beta"
echo "::set-output name=destination_binary_name::cortex-beta"
echo "::set-output name=destination_binary_server_name::cortex-server-beta"
echo "::set-output name=data_folder_name::cortexcpp-beta"
echo "::set-output name=configuration_file_name::.cortexrc-beta"
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
Expand All @@ -104,6 +106,7 @@ jobs:
if [ "${{ inputs.channel }}" == "nightly" ]; then
echo "::set-output name=package_name::cortexcpp-nightly"
echo "::set-output name=destination_binary_name::cortex-nightly"
echo "::set-output name=destination_binary_server_name::cortex-server-nightly"
echo "::set-output name=data_folder_name::cortexcpp-nightly"
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
Expand Down Expand Up @@ -150,13 +153,13 @@ jobs:
- name: Pre-package
run: |
cd engine
make pre-package DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}"
make pre-package DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_SERVER_NAME="${{ steps.set-output-params.outputs.destination_binary_server_name }}"

- name: Build network Installers
shell: bash
run: |
cd engine
make build-installer PACKAGE_NAME="${{ steps.set-output-params.outputs.package_name }}" SOURCE_BINARY_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }}" VERSION=${{ inputs.new_version }} DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DATA_FOLDER_NAME="${{ steps.set-output-params.outputs.data_folder_name }}" CONFIGURATION_FILE_NAME="${{ steps.set-output-params.outputs.configuration_file_name }}" UNINSTALLER_FILE_NAME="${{ steps.set-output-params.outputs.uninstaller_file_name }}"
make build-installer PACKAGE_NAME="${{ steps.set-output-params.outputs.package_name }}" SOURCE_BINARY_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }}" SOURCE_BINARY_SERVER_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }}" VERSION=${{ inputs.new_version }} DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_SERVER_NAME="${{ steps.set-output-params.outputs.destination_binary_server_name }}" DATA_FOLDER_NAME="${{ steps.set-output-params.outputs.data_folder_name }}" CONFIGURATION_FILE_NAME="${{ steps.set-output-params.outputs.configuration_file_name }}" UNINSTALLER_FILE_NAME="${{ steps.set-output-params.outputs.uninstaller_file_name }}"
mv ${{ steps.set-output-params.outputs.package_name }}.deb ${{ steps.set-output-params.outputs.package_name }}-network.deb

- name: Build local Installers
Expand Down Expand Up @@ -185,7 +188,7 @@ jobs:
rm -rf ${{ steps.set-output-params.outputs.package_name }}
rm ${{ steps.set-output-params.outputs.package_name }}.deb
chmod +x create_deb_local.sh
./create_deb_local.sh ${{ steps.set-output-params.outputs.package_name }} ${{ inputs.new_version }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.data_folder_name }} ${{ steps.set-output-params.outputs.configuration_file_name }};
./create_deb_local.sh ${{ steps.set-output-params.outputs.package_name }} ${{ inputs.new_version }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }} ${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.destination_binary_server_name }} ${{ steps.set-output-params.outputs.data_folder_name }} ${{ steps.set-output-params.outputs.configuration_file_name }};
cp ${{ steps.set-output-params.outputs.package_name }}.deb ../../${{ steps.set-output-params.outputs.package_name }}-local.deb

- name: Package
Expand Down Expand Up @@ -215,6 +218,7 @@ jobs:
if: inputs.public_provider == 'aws-s3'
run: |
aws s3 cp ./engine/cortex.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/linux-amd64-cortex-nightly.tar.gz
aws s3 cp ./engine/${{ steps.set-output-params.outputs.package_name }}-network.deb s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/cortex-linux-amd64-network-installer.deb

aws s3 cp ./engine/cortex.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/v${{ inputs.new_version }}/linux-amd64/cortex-nightly.tar.gz
aws s3 cp ./engine/${{ steps.set-output-params.outputs.package_name }}-network.deb s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/v${{ inputs.new_version }}/linux-amd64/cortex-${{ inputs.new_version }}-linux-amd64-network-installer.deb
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/template-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
if [ "${{ inputs.channel }}" == "stable" ]; then
echo "::set-output name=package_name::cortexcpp"
echo "::set-output name=destination_binary_name::cortex"
echo "::set-output name=destination_binary_server_name::cortex-server"
echo "::set-output name=data_folder_name::cortexcpp"
echo "::set-output name=configuration_file_name::.cortexrc"
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
Expand All @@ -118,6 +119,7 @@ jobs:
if [ "${{ inputs.channel }}" == "beta" ]; then
echo "::set-output name=package_name::cortexcpp-beta"
echo "::set-output name=destination_binary_name::cortex-beta"
echo "::set-output name=destination_binary_server_name::cortex-server-beta"
echo "::set-output name=data_folder_name::cortexcpp-beta"
echo "::set-output name=configuration_file_name::.cortexrc-beta"
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
Expand All @@ -128,6 +130,7 @@ jobs:
if [ "${{ inputs.channel }}" == "nightly" ]; then
echo "::set-output name=package_name::cortexcpp-nightly"
echo "::set-output name=destination_binary_name::cortex-nightly"
echo "::set-output name=destination_binary_server_name::cortex-server-nightly"
echo "::set-output name=data_folder_name::cortexcpp-nightly"
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
Expand Down Expand Up @@ -164,7 +167,7 @@ jobs:
- name: Pre-package
run: |
cd engine
make pre-package DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}"
make pre-package DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_SERVER_NAME="${{ steps.set-output-params.outputs.destination_binary_server_name }}"

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -192,6 +195,7 @@ jobs:
if [ "${{ inputs.channel }}" == "stable" ]; then
echo "::set-output name=package_name::cortexcpp"
echo "::set-output name=destination_binary_name::cortex"
echo "::set-output name=destination_binary_server_name::cortex-server"
echo "::set-output name=data_folder_name::cortexcpp"
echo "::set-output name=configuration_file_name::.cortexrc"
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
Expand All @@ -202,6 +206,7 @@ jobs:
if [ "${{ inputs.channel }}" == "beta" ]; then
echo "::set-output name=package_name::cortexcpp-beta"
echo "::set-output name=destination_binary_name::cortex-beta"
echo "::set-output name=destination_binary_server_name::cortex-server-beta"
echo "::set-output name=data_folder_name::cortexcpp-beta"
echo "::set-output name=configuration_file_name::.cortexrc-beta"
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
Expand All @@ -212,6 +217,7 @@ jobs:
if [ "${{ inputs.channel }}" == "nightly" ]; then
echo "::set-output name=package_name::cortexcpp-nightly"
echo "::set-output name=destination_binary_name::cortex-nightly"
echo "::set-output name=destination_binary_server_name::cortex-server-nightly"
echo "::set-output name=data_folder_name::cortexcpp-nightly"
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
Expand Down Expand Up @@ -250,20 +256,24 @@ jobs:
mkdir -p engine/cortex
ls -al
find . | grep ${{ steps.set-output-params.outputs.destination_binary_name }}
find . | grep ${{ steps.set-output-params.outputs.destination_binary_server_name }}
lipo -create cortex-${{ inputs.new_version }}-mac-arm64/${{ steps.set-output-params.outputs.destination_binary_name }} cortex-${{ inputs.new_version }}-mac-amd64/${{ steps.set-output-params.outputs.destination_binary_name }} -output engine/cortex/${{ steps.set-output-params.outputs.destination_binary_name }}
lipo -create cortex-${{ inputs.new_version }}-mac-arm64/${{ steps.set-output-params.outputs.destination_binary_server_name }} cortex-${{ inputs.new_version }}-mac-amd64/${{ steps.set-output-params.outputs.destination_binary_server_name }} -output engine/cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }}
chmod +x engine/cortex/${{ steps.set-output-params.outputs.destination_binary_name }}
chmod +x engine/cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }}

- name: Code Signing binaries
run: |
cd engine
make codesign-binary CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}"
make codesign-binary CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_SERVER_NAME="${{ steps.set-output-params.outputs.destination_binary_server_name }}"

- name: Notary macOS Binary
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b /usr/local/bin
cd engine/cortex
# Notarize the binary
quill notarize ./${{ steps.set-output-params.outputs.destination_binary_name }}
quill notarize ./${{ steps.set-output-params.outputs.destination_binary_server_name }}
env:
QUILL_NOTARY_KEY_ID: ${{ secrets.NOTARY_KEY_ID }}
QUILL_NOTARY_ISSUER: ${{ secrets.NOTARY_ISSUER }}
Expand All @@ -273,7 +283,7 @@ jobs:
shell: bash
run: |
cd engine
make build-installer PACKAGE_NAME="${{ steps.set-output-params.outputs.package_name }}" VERSION=${{ inputs.new_version }} SOURCE_BINARY_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DATA_FOLDER_NAME="${{ steps.set-output-params.outputs.data_folder_name }}" CONFIGURATION_FILE_NAME="${{ steps.set-output-params.outputs.configuration_file_name }}" UNINSTALLER_FILE_NAME="${{ steps.set-output-params.outputs.uninstaller_file_name }}"
make build-installer PACKAGE_NAME="${{ steps.set-output-params.outputs.package_name }}" VERSION=${{ inputs.new_version }} SOURCE_BINARY_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }}" SOURCE_BINARY_SERVER_PATH="../../cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }}" DESTINATION_BINARY_NAME="${{ steps.set-output-params.outputs.destination_binary_name }}" DESTINATION_BINARY_SERVER_NAME="${{ steps.set-output-params.outputs.destination_binary_server_name }}" DATA_FOLDER_NAME="${{ steps.set-output-params.outputs.data_folder_name }}" CONFIGURATION_FILE_NAME="${{ steps.set-output-params.outputs.configuration_file_name }}" UNINSTALLER_FILE_NAME="${{ steps.set-output-params.outputs.uninstaller_file_name }}"
cat templates/macos/Scripts/postinstall

- name: Codesign and notary for macos installer
Expand All @@ -298,7 +308,7 @@ jobs:

cd ../../
chmod +x create_pkg_local.sh
./create_pkg_local.sh ${{ steps.set-output-params.outputs.package_name }} ${{ inputs.new_version }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.data_folder_name }} ${{ steps.set-output-params.outputs.configuration_file_name }} ${{ steps.set-output-params.outputs.uninstaller_file_name }}
./create_pkg_local.sh ${{ steps.set-output-params.outputs.package_name }} ${{ inputs.new_version }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_name }} ../../cortex/${{ steps.set-output-params.outputs.destination_binary_server_name }} ${{ steps.set-output-params.outputs.destination_binary_name }} ${{ steps.set-output-params.outputs.destination_binary_server_name }} ${{ steps.set-output-params.outputs.data_folder_name }} ${{ steps.set-output-params.outputs.configuration_file_name }} ${{ steps.set-output-params.outputs.uninstaller_file_name }}
cp ${{ steps.set-output-params.outputs.package_name }}.pkg ../../

- name: Codesign and notary for macos installer
Expand Down Expand Up @@ -340,6 +350,7 @@ jobs:
if: inputs.public_provider == 'aws-s3'
run: |
aws s3 cp ./engine/cortex.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/mac-universal-cortex-nightly.tar.gz
aws s3 cp ./engine/${{ steps.set-output-params.outputs.package_name }}-network.pkg s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/temp-latest/cortex-mac-universal-network-installer.pkg

aws s3 cp ./engine/cortex.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/v${{ inputs.new_version }}/mac-universal/cortex-nightly.tar.gz
aws s3 cp ./engine/${{ steps.set-output-params.outputs.package_name }}-network.pkg s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/v${{ inputs.new_version }}/mac-universal/cortex-${{ inputs.new_version }}-mac-universal-network-installer.pkg
Expand Down
Loading
Loading