Skip to content
name: CI Quality Gate PR
on:
workflow_call:
secrets:
MINIO_BUCKET_NAME:
required: false
MINIO_REGION:
required: false
MINIO_ENDPOINT:
required: false
MINIO_ACCESS_KEY_ID:
required: false
MINIO_SECRET_ACCESS_KEY:
required: false
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:
runs-on: ${{ matrix.runs-on }}
if: ${{ ! startsWith(github.head_ref, 'update-submodule') }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:

Check failure on line 29 in .github/workflows/template-quality-gate-pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/template-quality-gate-pr.yml

Invalid workflow file

You have an error in your yaml syntax on line 29
- os: "windows"
name: "amd64-avx2"
runs-on: "windows-2019"
cmake-flags: "-DCORTEXLLAMA_VERSION="${{ CI_COMMIT_TAG }}-${{ CI_COMMIT_SHORT_SHA }}" -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -GNinja"
run-e2e: true
vulkan: false
sccache: false
sccache-conf-path: ""
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: create sccache.conf
if: ${{ matrix.sccache }}
run: |
echo "[cache.s3]" > ${{ matrix.sccache-conf-path }}
echo 'bucket = "${{ secrets.MINIO_BUCKET_NAME }}"' >> ${{ matrix.sccache-conf-path }}
echo 'endpoint = "${{ secrets.MINIO_ENDPOINT }}"' >> ${{ matrix.sccache-conf-path }}
echo 'key_prefix = "${{ matrix.os }}-${{ matrix.name }}"' >> ${{ matrix.sccache-conf-path }}
echo 'use_ssl = false' >> ${{ matrix.sccache-conf-path }}
echo 'server_side_encryption = false' >> ${{ matrix.sccache-conf-path }}
echo 'no_credentials = false' >> ${{ matrix.sccache-conf-path }}
- name: Install choco on Windows
if: runner.os == 'Windows'
run: |
choco install make sccache ninja -y
- name: Install ninja build on Linux
if: runner.os == 'Linux'
run: |
sudo apt install ninja-build -y
- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: ilammy/[email protected]
- name: start scache server
if: ${{ matrix.sccache }}
run: |
sccache --start-server
env:
SCCACHE_BUCKET: "${{ secrets.MINIO_BUCKET_NAME }}"
SCCACHE_REGION: "${{ secrets.MINIO_REGION }}"
SCCACHE_ENDPOINT: "${{ secrets.MINIO_ENDPOINT }}"
SCCACHE_S3_USE_SSL: "false"
SCCACHE_S3_SERVER_SIDE_ENCRYPTION: "false"
SCCACHE_S3_KEY_PREFIX: "${{ matrix.os }}-${{ matrix.name }}"
SCCACHE_LOG: "debug"
SCCACHE_CONF: '${{ matrix.sccache-conf-path }}'
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
SCCACHE_IDLE_TIMEOUT: "0"
- name: Build
run: |
make build-example-server CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}"
- name: Pre Package
run: |
make pre-package
- 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
- name: Clean
if: always()
continue-on-error: true
run: |
sccache --stop-server
rm ${{ matrix.sccache-conf-path }}