Skip to content

Commit

Permalink
fix: enable builds
Browse files Browse the repository at this point in the history
  • Loading branch information
vansangpfiev committed May 6, 2024
1 parent 413c065 commit 113f35d
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ jobs:
include:
- build: "amd64-avx2"
defines: "-DLLAMA_NATIVE=OFF"
# - build: "amd64-avx"
# defines: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
# - build: "amd64-avx512"
# defines: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
# - build: "amd64-vulkan"
# defines: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF"
- build: "amd64-avx"
defines: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
- build: "amd64-avx512"
defines: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
- build: "amd64-vulkan"
defines: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF"
# - build: "arm64"
# defines: "-A ARM64 -DLLAMA_NATIVE=OFF"

Expand Down Expand Up @@ -224,8 +224,8 @@ jobs:
include:
- cuda: "12-0"
flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF"
# - cuda: "11-7"
# flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON"
- cuda: "11-7"
flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON"

steps:
- name: Clone
Expand Down Expand Up @@ -464,12 +464,12 @@ jobs:
include:
- build: "amd64-avx2"
defines: "-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - build: "amd64-avx"
# defines: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - build: "amd64-avx512"
# defines: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - build: "amd64-vulkan"
# defines: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- build: "amd64-avx"
defines: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- build: "amd64-avx512"
defines: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- build: "amd64-vulkan"
defines: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - build: "arm64"
# defines: "-A ARM64 -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON"

Expand Down Expand Up @@ -592,21 +592,21 @@ jobs:
- cuda: "12-0"
instructions: "-DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - cuda: "12-0"
# instructions: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
# flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - cuda: "12-0"
# instructions: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
# flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - cuda: "11-7"
# instructions: "-DLLAMA_NATIVE=OFF"
# flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - cuda: "11-7"
# instructions: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
# flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
# - cuda: "11-7"
# instructions: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
# flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- cuda: "12-0"
instructions: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- cuda: "12-0"
instructions: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=ON -DCUDA_11_7=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- cuda: "11-7"
instructions: "-DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- cuda: "11-7"
instructions: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"
- cuda: "11-7"
instructions: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF"
flags: "-DCUDA_12_0=OFF -DCUDA_11_7=ON -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DWHISPER_SDL2=ON"

steps:
- name: Setup VSWhere.exe
Expand Down Expand Up @@ -651,6 +651,7 @@ jobs:
id: cmake_build
shell: cmd
run: |
cd cortex-cpp
cmake -S ./nitro_deps -B ./build_deps/nitro_deps
cmake --build ./build_deps/nitro_deps --config Release
mkdir -p build
Expand All @@ -663,14 +664,15 @@ jobs:
shell: cmd
run: |
set PATH=%PATH%;C:\Program Files\7-Zip\
cd cortex-cpp
mkdir .\build\Release\engines\cortex.llamacpp\
robocopy .\build\engines\cortex.llamacpp\ .\build\Release\engines\cortex.llamacpp\ engine.dll
robocopy build_deps\_install\bin\ .\build\Release\ zlib.dll
robocopy build\bin\Release\ .\build\Release\ llama.dll
robocopy build\bin\Release\ .\build\Release\ whisper.dll
robocopy .github\patches\windows\ .\build\Release\ msvcp140.dll
robocopy .github\patches\windows\ .\build\Release\ vcruntime140_1.dll
robocopy .github\patches\windows\ .\build\Release\ vcruntime140.dll
robocopy ..\.github\patches\windows\ .\build\Release\ msvcp140.dll
robocopy ..\.github\patches\windows\ .\build\Release\ vcruntime140_1.dll
robocopy ..\.github\patches\windows\ .\build\Release\ vcruntime140.dll
robocopy "$env:SDL2_DIR\..\lib\2.28.5\" .\build\Release\ SDL2.dll
dotnet tool install --global AzureSignTool
%USERPROFILE%\.dotnet\tools\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 ".\build\Release\nitro.exe"
Expand All @@ -682,15 +684,15 @@ jobs:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
with:
name: nitro-win-${{ matrix.instructions }}-cuda-${{ matrix.cuda }}
path: ./build/Release
path: ./cortex-cpp/build/Release

- uses: actions/[email protected]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
asset_path: ./nitro.tar.gz
asset_path: ./cortex-cpp/nitro.tar.gz
asset_name: nitro-${{ needs.create-draft-release.outputs.version }}-win-${{ matrix.instructions }}-cuda-${{ matrix.cuda }}.tar.gz
asset_content_type: application/gzip

Expand Down

0 comments on commit 113f35d

Please sign in to comment.