|
| 1 | +name: CI (openvino) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: # allows manual triggering |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + paths: [ |
| 9 | + '.github/workflows/build-openvino.yml', |
| 10 | + '**/CMakeLists.txt', |
| 11 | + '**/.cmake', |
| 12 | + '**/*.h', |
| 13 | + '**/*.hpp', |
| 14 | + '**/*.c', |
| 15 | + '**/*.cpp', |
| 16 | + ] |
| 17 | + |
| 18 | + pull_request: |
| 19 | + types: [opened, synchronize, reopened] |
| 20 | + paths: [ |
| 21 | + '.github/workflows/build-openvino.yml', |
| 22 | + 'ggml/src/ggml-openvino/**' |
| 23 | + ] |
| 24 | + |
| 25 | +concurrency: |
| 26 | + group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} |
| 27 | + cancel-in-progress: true |
| 28 | + |
| 29 | +env: |
| 30 | + GGML_NLOOP: 3 |
| 31 | + GGML_N_THREADS: 1 |
| 32 | + LLAMA_LOG_COLORS: 1 |
| 33 | + LLAMA_LOG_PREFIX: 1 |
| 34 | + LLAMA_LOG_TIMESTAMPS: 1 |
| 35 | + |
| 36 | +jobs: |
| 37 | + ubuntu-24-openvino: |
| 38 | + name: ubuntu-24-openvino-${{ matrix.openvino_device }} |
| 39 | + |
| 40 | + concurrency: |
| 41 | + group: openvino-${{ matrix.variant }}-${{ github.head_ref || github.ref }} |
| 42 | + cancel-in-progress: false |
| 43 | + |
| 44 | + strategy: |
| 45 | + matrix: |
| 46 | + include: |
| 47 | + - variant: cpu |
| 48 | + runner: '"ubuntu-24.04"' |
| 49 | + openvino_device: "CPU" |
| 50 | + - variant: gpu |
| 51 | + runner: '["self-hosted","Linux","Intel","OpenVINO"]' |
| 52 | + openvino_device: "GPU" |
| 53 | + |
| 54 | + runs-on: ${{ fromJSON(matrix.runner) }} |
| 55 | + |
| 56 | + env: |
| 57 | + # Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile |
| 58 | + OPENVINO_VERSION_MAJOR: "2026.0" |
| 59 | + OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886" |
| 60 | + |
| 61 | + steps: |
| 62 | + - name: Clone |
| 63 | + id: checkout |
| 64 | + uses: actions/checkout@v6 |
| 65 | + |
| 66 | + - name: ccache |
| 67 | + if: runner.environment == 'github-hosted' |
| 68 | + uses: ggml-org/ccache-action@v1.2.21 |
| 69 | + with: |
| 70 | + key: ubuntu-24-openvino-${{ matrix.variant }}-no-preset-v1 |
| 71 | + evict-old-files: 1d |
| 72 | + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} |
| 73 | + |
| 74 | + - name: Dependencies |
| 75 | + id: depends |
| 76 | + run: | |
| 77 | + sudo apt-get update |
| 78 | + sudo apt-get install -y build-essential libssl-dev libtbb12 cmake ninja-build python3-pip |
| 79 | + sudo apt-get install -y ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd |
| 80 | +
|
| 81 | + - name: Use OpenVINO Toolkit Cache |
| 82 | + if: runner.environment == 'github-hosted' |
| 83 | + uses: actions/cache@v5 |
| 84 | + id: cache-openvino |
| 85 | + with: |
| 86 | + path: ./openvino_toolkit |
| 87 | + key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }} |
| 88 | + |
| 89 | + - name: Setup OpenVINO Toolkit |
| 90 | + if: steps.cache-openvino.outputs.cache-hit != 'true' |
| 91 | + uses: ./.github/actions/linux-setup-openvino |
| 92 | + with: |
| 93 | + path: ./openvino_toolkit |
| 94 | + version_major: ${{ env.OPENVINO_VERSION_MAJOR }} |
| 95 | + version_full: ${{ env.OPENVINO_VERSION_FULL }} |
| 96 | + |
| 97 | + - name: Install OpenVINO dependencies |
| 98 | + run: | |
| 99 | + cd ./openvino_toolkit |
| 100 | + chmod +x ./install_dependencies/install_openvino_dependencies.sh |
| 101 | + echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh |
| 102 | +
|
| 103 | + - name: Build |
| 104 | + id: cmake_build |
| 105 | + run: | |
| 106 | + source ./openvino_toolkit/setupvars.sh |
| 107 | + cmake -B build/ReleaseOV -G Ninja \ |
| 108 | + -DCMAKE_BUILD_TYPE=Release \ |
| 109 | + -DGGML_OPENVINO=ON |
| 110 | + time cmake --build build/ReleaseOV --config Release -j $(nproc) |
| 111 | +
|
| 112 | + - name: Test |
| 113 | + id: cmake_test |
| 114 | + # TODO: fix and re-enable the `test-llama-archs` test below |
| 115 | + run: | |
| 116 | + cd ${{ github.workspace }} |
| 117 | + if [ "${{ matrix.openvino_device }}" = "GPU" ]; then |
| 118 | + export GGML_OPENVINO_DEVICE=GPU |
| 119 | + fi |
| 120 | + ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs" --verbose --timeout 2000 |
0 commit comments