chore: changes windows CI runners #196
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Quality Gate | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
env: | |
LLM_MODEL_URL: https://delta.jan.ai/tinyllama-1.1b-chat-v0.3.Q2_K.gguf | |
EMBEDDING_MODEL_URL: https://catalog.jan.ai/dist/models/embeds/nomic-embed-text-v1.5.f16.gguf | |
jobs: | |
build-and-test: | |
if: ${{ ! startsWith(github.head_ref, 'update-submodule') }} | |
runs-on: ${{ matrix.runs-on }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: "linux" | |
name: "amd64-avx2" | |
runs-on: "ubuntu-18-04" | |
cmake-flags: "-DLLAMA_NATIVE=OFF" | |
run-e2e: true | |
vulkan: false | |
- os: "linux" | |
name: "amd64-avx" | |
runs-on: "ubuntu-18-04" | |
cmake-flags: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF" | |
run-e2e: false | |
vulkan: false | |
- os: "linux" | |
name: "amd64-avx512" | |
runs-on: "ubuntu-18-04" | |
cmake-flags: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF" | |
run-e2e: false | |
vulkan: false | |
- os: "linux" | |
name: "amd64-vulkan" | |
runs-on: "ubuntu-18-04-cuda-11-7" | |
cmake-flags: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF" | |
run-e2e: false | |
vulkan: true | |
- os: "linux" | |
name: "amd64-cuda-11-7" | |
runs-on: "ubuntu-18-04-cuda-11-7" | |
cmake-flags: "-DLLAMA_NATIVE=OFF -DLLAMA_CUDA=ON" | |
run-e2e: false | |
vulkan: false | |
- os: "linux" | |
name: "amd64-cuda-12-0" | |
runs-on: "ubuntu-18-04-cuda-12-0" | |
cmake-flags: "-DLLAMA_NATIVE=OFF -DLLAMA_CUDA=ON" | |
run-e2e: false | |
vulkan: false | |
- os: "mac" | |
name: "amd64" | |
runs-on: "macos-13" | |
cmake-flags: "-DLLAMA_METAL=OFF" | |
run-e2e: true | |
vulkan: false | |
- os: "mac" | |
name: "arm64" | |
runs-on: "macos-silicon" | |
cmake-flags: "-DLLAMA_METAL_EMBED_LIBRARY=ON" | |
run-e2e: true | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx2" | |
runs-on: "windows-2019" | |
cmake-flags: "-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: true | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx" | |
runs-on: "windows-2019" | |
cmake-flags: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: true | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx512" | |
runs-on: "windows-2019" | |
cmake-flags: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-vulkan" | |
runs-on: "windows-2019" | |
cmake-flags: "-DLLAMA_VULKAN=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: true | |
- os: "windows" | |
name: "amd64-avx2-cuda-12-0" | |
runs-on: "windows-cuda-12-0" | |
cmake-flags: "-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx-cuda-12-0" | |
runs-on: "windows-cuda-12-0" | |
cmake-flags: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx512-cuda-12-0" | |
runs-on: "windows-cuda-12-0" | |
cmake-flags: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx2-cuda-11-7" | |
runs-on: "windows-cuda-11-7" | |
cmake-flags: "-DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx-cuda-11-7" | |
runs-on: "windows-cuda-11-7" | |
cmake-flags: "-DLLAMA_AVX2=OFF -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
- os: "windows" | |
name: "amd64-avx512-cuda-11-7" | |
runs-on: "windows-cuda-11-7" | |
cmake-flags: "-DLLAMA_AVX512=ON -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUDA=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE" | |
run-e2e: false | |
vulkan: false | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Prepare Vulkan SDK | |
if: ${{ matrix.vulkan }} | |
uses: humbletim/[email protected] | |
with: | |
vulkan-query-version: 1.3.275.0 | |
vulkan-components: Vulkan-Headers, Vulkan-Loader | |
vulkan-use-cache: true | |
# - name: Get Cer for code signing | |
# if: runner.os == 'macOS' | |
# run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12 | |
# shell: bash | |
# env: | |
# CODE_SIGN_P12_BASE64: ${{ secrets.CODE_SIGN_P12_BASE64 }} | |
# - uses: apple-actions/import-codesign-certs@v2 | |
# if: runner.os == 'macOS' | |
# with: | |
# p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }} | |
# p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }} | |
# - uses: actions/setup-dotnet@v3 | |
# if: runner.os == 'Windows' | |
# with: | |
# dotnet-version: "8.0.x" | |
- name: Install choco on Windows | |
if: runner.os == 'Windows' | |
run: | | |
choco install make -y | |
- name: Build | |
run: | | |
make build-example-server CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}" | |
- name: Pre Package | |
run: | | |
make pre-package | |
# - name: Code Signing macOS | |
# if: runner.os == 'macOS' | |
# run: | | |
# make codesign CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" | |
# - name: Code Signing Windows | |
# if: runner.os == 'Windows' | |
# shell: cmd | |
# run: | | |
# set PATH=%PATH%;%USERPROFILE%\.dotnet\tools | |
# make codesign CODE_SIGN=true 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 }}" | |
- name: Package | |
run: | | |
make package | |
- name: Run e2e testing | |
if: ${{ matrix.run-e2e }} | |
run: | | |
make run-e2e-test LLM_MODEL_URL=${{ env.LLM_MODEL_URL }} EMBEDDING_MODEL_URL=${{ env.EMBEDDING_MODEL_URL }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cortex.llamacpp-${{ matrix.os }}-${{ matrix.name }} | |
path: ./cortex.llamacpp |