Skip to content

Commit 912e250

Browse files
committed
Add OV CI cache
1 parent b9f2ae6 commit 912e250

File tree

3 files changed

+85
-12
lines changed

3 files changed

+85
-12
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Linux - Setup OpenVINO Toolkit"
2+
description: "Setup OpenVINO Toolkit for Linux"
3+
inputs:
4+
path:
5+
description: "Installation path"
6+
required: true
7+
version_major:
8+
description: "OpenVINO major version (e.g., 2025.2)"
9+
required: true
10+
version_full:
11+
description: "OpenVINO full version (e.g., 2025.2.0.19140.c01cd93e24d)"
12+
required: true
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Setup OpenVINO Toolkit
18+
id: setup
19+
uses: ./.github/actions/unarchive-tar
20+
with:
21+
url: https://storage.openvinotoolkit.org/repositories/openvino/packages/${{ inputs.version_major }}/linux/openvino_toolkit_ubuntu24_${{ inputs.version_full }}_x86_64.tgz
22+
path: ${{ inputs.path }}
23+
type: "z"
24+
strip: 1
25+
26+
- name: Install OpenVINO dependencies
27+
shell: bash
28+
run: |
29+
cd ${{ inputs.path }}
30+
echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh

.github/workflows/build-cache.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,39 @@ jobs:
6363
path: ./spacemit_toolchain
6464
version: ${{ env.SPACEMIT_IME_TOOLCHAIN_VERSION }}
6565

66+
ubuntu-24-openvino-cache:
67+
runs-on: ubuntu-24.04
68+
69+
env:
70+
# Make sure this is in sync with build.yml
71+
OPENVINO_VERSION_MAJOR: "2025.2"
72+
OPENVINO_VERSION_FULL: "2025.2.0.19140.c01cd93e24d"
73+
74+
steps:
75+
- name: Clone
76+
id: checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Dependencies
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y libtbb12
83+
84+
- name: Setup Cache
85+
uses: actions/cache@v4
86+
id: cache-openvino
87+
with:
88+
path: ./openvino_toolkit
89+
key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
90+
91+
- name: Setup OpenVINO Toolkit
92+
if: steps.cache-openvino.outputs.cache-hit != 'true'
93+
uses: ./.github/actions/linux-setup-openvino
94+
with:
95+
path: ./openvino_toolkit
96+
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
97+
version_full: ${{ env.OPENVINO_VERSION_FULL }}
98+
6699
windows-2022-rocm-cache:
67100
runs-on: windows-2022
68101

.github/workflows/build.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,11 @@ jobs:
670670
ubuntu-24-cmake-openvino:
671671
runs-on: ubuntu-24.04
672672

673+
env:
674+
# Make sure this is in sync with build-cache.yml
675+
OPENVINO_VERSION_MAJOR: "2025.2"
676+
OPENVINO_VERSION_FULL: "2025.2.0.19140.c01cd93e24d"
677+
673678
steps:
674679
- name: Clone
675680
id: checkout
@@ -684,23 +689,28 @@ jobs:
684689
- name: Dependencies
685690
id: depends
686691
run: |
687-
export OPENVINO_VERSION_MAJOR=2025.2
688-
export OPENVINO_VERSION_FULL=2025.2.0.19140.c01cd93e24d
689692
sudo apt-get update
690-
sudo apt-get install -y build-essential libcurl4-openssl-dev libtbb12 cmake ninja-build python3-pip curl wget tar
691-
sudo mkdir -p /opt/intel
692-
wget -O openvino_${OPENVINO_VERSION_MAJOR}.tgz https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION_MAJOR}/linux/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz
693-
tar -xf openvino_${OPENVINO_VERSION_MAJOR}.tgz
694-
sudo mv openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64 /opt/intel/openvino_${OPENVINO_VERSION_MAJOR}
695-
rm openvino_${OPENVINO_VERSION_MAJOR}.tgz
696-
cd /opt/intel/openvino_${OPENVINO_VERSION_MAJOR}
697-
echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh && cd -
698-
sudo ln -s /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} /opt/intel/openvino
693+
sudo apt-get install -y build-essential libcurl4-openssl-dev libtbb12 cmake ninja-build python3-pip
694+
695+
- name: Use OpenVINO Toolkit Cache
696+
uses: actions/cache@v4
697+
id: cache-openvino
698+
with:
699+
path: ./openvino_toolkit
700+
key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
701+
702+
- name: Setup OpenVINO Toolkit
703+
if: steps.cache-openvino.outputs.cache-hit != 'true'
704+
uses: ./.github/actions/linux-setup-openvino
705+
with:
706+
path: ./openvino_toolkit
707+
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
708+
version_full: ${{ env.OPENVINO_VERSION_FULL }}
699709

700710
- name: Build
701711
id: cmake_build
702712
run: |
703-
source /opt/intel/openvino/setupvars.sh
713+
source ./openvino_toolkit/setupvars.sh
704714
cmake -B build/ReleaseOV -G Ninja \
705715
-DCMAKE_BUILD_TYPE=Release \
706716
-DGGML_OPENVINO=ON

0 commit comments

Comments
 (0)