1313 - aws-s3
1414 default : none
1515
16- env :
17- LLM_MODEL_URL : https://delta.jan.ai/tinyllama-1.1b-chat-v0.3.Q2_K.gguf
18- EMBEDDING_MODEL_URL : https://catalog.jan.ai/dist/models/embeds/nomic-embed-text-v1.5.f16.gguf
19-
2016jobs :
2117 set-public-provider :
2218 runs-on : ubuntu-latest
@@ -86,149 +82,54 @@ jobs:
8682 with :
8783 submodules : recursive
8884
89- - name : Get Cer for code signing
90- if : runner.os == 'macOS'
91- run : base64 -d <<< "$NOTARIZE_P8_BASE64" > /tmp/notary-key.p8
92- shell : bash
93- env :
94- NOTARIZE_P8_BASE64 : ${{ secrets.NOTARIZE_P8_BASE64 }}
95-
96- - name : Install gettext-bast linux
97- if : runner.os == 'Linux'
98- run : sudo apt update && sudo apt install gettext-base -y
99-
100- - uses : apple-actions/import-codesign-certs@v2
101- continue-on-error : true
102- if : runner.os == 'macOS'
103- with :
104- p12-file-base64 : ${{ secrets.CODE_SIGN_P12_BASE64 }}
105- p12-password : ${{ secrets.CODE_SIGN_P12_PASSWORD }}
106-
107- - uses : actions/setup-dotnet@v3
108- if : runner.os == 'Windows'
109- with :
110- dotnet-version : " 8.0.x"
111-
112- - name : Install choco on Windows
113- if : runner.os == 'Windows'
114- run : |
115- choco install make pkgconfiglite ccache awscli 7zip ninja -y
116- dotnet tool install --global AzureSignTool
117-
118- - name : Download ccache from s3
119- if : runner.os == 'Windows'
120- continue-on-error : true
121- run : |
122- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
123- refreshenv
124- aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-${{ matrix.os }}-${{ matrix.name }} ${{ matrix.ccache-dir }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
125- env :
126- AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
127- AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
128- AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
129-
130- - name : Configure vcpkg
131- run : |
132- cd engine
133- make configure-vcpkg
134-
135- - name : Build
136- run : |
137- cd engine
138- make build CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ matrix.build-deps-cmake-flags }}"
139-
140- - name : Pre-package
141- run : |
142- cd engine
143- make pre-package
144-
145- - name : Code Signing binaries
146- run : |
147- cd engine
148- make codesign-binary CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" AZURE_KEY_VAULT_URI="${{ secrets.AZURE_KEY_VAULT_URI }}" AZURE_CLIENT_ID="${{ secrets.AZURE_CLIENT_ID }}" AZURE_TENANT_ID="${{ secrets.AZURE_TENANT_ID }}" AZURE_CLIENT_SECRET="${{ secrets.AZURE_CLIENT_SECRET }}" AZURE_CERT_NAME="${{ secrets.AZURE_CERT_NAME }}"
149-
150- - name : Notary macOS Binary
151- if : runner.os == 'macOS'
152- run : |
153- curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b /usr/local/bin
154- cd engine/cortex
155- # Notarize the binary
156- quill notarize ./cortex
157- env :
158- QUILL_NOTARY_KEY_ID : ${{ secrets.NOTARY_KEY_ID }}
159- QUILL_NOTARY_ISSUER : ${{ secrets.NOTARY_ISSUER }}
160- QUILL_NOTARY_KEY : " /tmp/notary-key.p8"
161-
162- - name : Build Installers
163- shell : bash
164- run : |
165- cd engine
166- make build-installer PACKAGE_NAME=cortexcpp-nightly VERSION=${{ needs.get-update-version.outputs.new_version }} SOURCE_BINARY_PATH="../../cortex/cortex" DESTINATION_BINARY_NAME="cortex-nightly" DATA_FOLDER_NAME=".cortex-nightly" CONFIGURATION_FILE_NAME=".cortexrc-nightly" UNINSTALLER_FILE_NAME="cortex-nightly-uninstall.sh"
167-
168- - name : Codesign and notary for macos installer
169- if : runner.os == 'macOS'
170- run : |
171- cd engine
172- productsign --sign "Developer ID Installer: ${{ secrets.DEVELOPER_ID }}" cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}-signed.pkg
173- rm cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg
174- mv cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}-signed.pkg cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg
175- xcrun notarytool submit cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg --apple-id ${{ secrets.APPLE_ID }} --password ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} --team-id ${{ secrets.APPLE_TEAM_ID }} --wait
176-
177- - name : Compile .ISS to .EXE Installer
178- uses : Minionguyjpro/Inno-Setup-Action@v1.2.2
179- if : runner.os == 'Windows'
180- with :
181- path : engine/templates/windows/installer-nightly.iss
182- options : /O+
183-
184- - name : Codesign for windows installer
185- if : runner.os == 'Windows'
186- run : |
187- cd engine
85+ build-macos-x64 :
86+ uses : ./.github/workflows/template-build-macos.yml
87+ needs : [get-update-version, set-public-provider]
88+ secrets : inherit
89+ with :
90+ ref : ${{ needs.set-public-provider.outputs.ref }}
91+ public_provider : ${{ needs.set-public-provider.outputs.public_provider }}
92+ new_version : ${{ needs.get-update-version.outputs.new_version }}
93+ runs-on : macos-12
94+ cmake-flags : " -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
95+ channel : nightly
96+ arch : amd64
97+
98+ build-macos-arm64 :
99+ uses : ./.github/workflows/template-build-macos.yml
100+ needs : [get-update-version, set-public-provider]
101+ secrets : inherit
102+ with :
103+ ref : ${{ needs.set-public-provider.outputs.ref }}
104+ public_provider : ${{ needs.set-public-provider.outputs.public_provider }}
105+ new_version : ${{ needs.get-update-version.outputs.new_version }}
106+ runs-on : macos-latest
107+ cmake-flags : " -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
108+ channel : nightly
109+ arch : arm64
110+
111+ build-windows-x64 :
112+ uses : ./.github/workflows/template-build-windows-x64.yml
113+ secrets : inherit
114+ needs : [get-update-version, set-public-provider]
115+ with :
116+ ref : ${{ needs.set-public-provider.outputs.ref }}
117+ public_provider : ${{ needs.set-public-provider.outputs.public_provider }}
118+ new_version : ${{ needs.get-update-version.outputs.new_version }}
119+ runs-on : windows-cuda-12-0
120+ cmake-flags : " -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=C:/w/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
121+ build-deps-cmake-flags : " -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
122+ ccache-dir : ' C:\Users\ContainerAdministrator\AppData\Local\ccache'
123+ channel : nightly
188124
189- set PATH=%PATH%;%USERPROFILE%\.dotnet\tools
190- azuresigntool.exe sign -kvu ${{ secrets.AZURE_KEY_VAULT_URI }} -kvi ${{ secrets.AZURE_CLIENT_ID }} -kvt ${{ secrets.AZURE_TENANT_ID }} -kvs ${{ secrets.AZURE_CLIENT_SECRET }} -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\templates\windows\setup.exe";'
191-
192- - name : Package
193- run : |
194- cd engine
195- make package
196-
197- - name : Upload Artifact
198- uses : actions/upload-artifact@v2
199- with :
200- name : cortex-${{ matrix.os }}-${{ matrix.name }}
201- path : ./engine/cortex
202-
203- - name : Upload windwos installer
204- if : runner.os == 'Windows'
205- uses : actions/upload-artifact@v2
206- with :
207- name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
208- path : ./engine/templates/windows/setup.exe
209-
210- - name : Upload macos installer
211- if : runner.os == 'macOS'
212- uses : actions/upload-artifact@v2
213- with :
214- name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
215- path : ./engine/cortexcpp-nightly.pkg
216-
217- - name : Upload linux installer
218- if : runner.os == 'Linux'
219- uses : actions/upload-artifact@v2
220- with :
221- name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
222- path : ./engine/cortexcpp-nightly.deb
223-
224- - name : Upload ccache to s3
225- continue-on-error : true
226- if : always() && runner.os == 'Windows'
227- run : |
228- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
229- refreshenv
230- aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
231- env :
232- AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
233- AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
234- AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
125+ build-linux-x64 :
126+ uses : ./.github/workflows/template-build-linux-x64.yml
127+ secrets : inherit
128+ needs : [get-update-version, set-public-provider]
129+ with :
130+ ref : ${{ needs.set-public-provider.outputs.ref }}
131+ public_provider : ${{ needs.set-public-provider.outputs.public_provider }}
132+ new_version : ${{ needs.get-update-version.outputs.new_version }}
133+ runs-on : ubuntu-20-04-cuda-12-0
134+ cmake-flags : " -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
135+ channel : nightly
0 commit comments