Skip to content

Commit ade4a2d

Browse files
committed
Add OV CI cache
1 parent 038bdc5 commit ade4a2d

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
@@ -703,6 +703,11 @@ jobs:
703703
ubuntu-24-cmake-openvino:
704704
runs-on: ubuntu-24.04
705705

706+
env:
707+
# Make sure this is in sync with build-cache.yml
708+
OPENVINO_VERSION_MAJOR: "2025.2"
709+
OPENVINO_VERSION_FULL: "2025.2.0.19140.c01cd93e24d"
710+
706711
steps:
707712
- name: Clone
708713
id: checkout
@@ -717,23 +722,28 @@ jobs:
717722
- name: Dependencies
718723
id: depends
719724
run: |
720-
export OPENVINO_VERSION_MAJOR=2025.2
721-
export OPENVINO_VERSION_FULL=2025.2.0.19140.c01cd93e24d
722725
sudo apt-get update
723-
sudo apt-get install -y build-essential libcurl4-openssl-dev libtbb12 cmake ninja-build python3-pip curl wget tar
724-
sudo mkdir -p /opt/intel
725-
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
726-
tar -xf openvino_${OPENVINO_VERSION_MAJOR}.tgz
727-
sudo mv openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64 /opt/intel/openvino_${OPENVINO_VERSION_MAJOR}
728-
rm openvino_${OPENVINO_VERSION_MAJOR}.tgz
729-
cd /opt/intel/openvino_${OPENVINO_VERSION_MAJOR}
730-
echo "Y" | sudo -E ./install_dependencies/install_openvino_dependencies.sh && cd -
731-
sudo ln -s /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} /opt/intel/openvino
726+
sudo apt-get install -y build-essential libcurl4-openssl-dev libtbb12 cmake ninja-build python3-pip
727+
728+
- name: Use OpenVINO Toolkit Cache
729+
uses: actions/cache@v4
730+
id: cache-openvino
731+
with:
732+
path: ./openvino_toolkit
733+
key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
734+
735+
- name: Setup OpenVINO Toolkit
736+
if: steps.cache-openvino.outputs.cache-hit != 'true'
737+
uses: ./.github/actions/linux-setup-openvino
738+
with:
739+
path: ./openvino_toolkit
740+
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
741+
version_full: ${{ env.OPENVINO_VERSION_FULL }}
732742

733743
- name: Build
734744
id: cmake_build
735745
run: |
736-
source /opt/intel/openvino/setupvars.sh
746+
source ./openvino_toolkit/setupvars.sh
737747
cmake -B build/ReleaseOV -G Ninja \
738748
-DCMAKE_BUILD_TYPE=Release \
739749
-DGGML_OPENVINO=ON

0 commit comments

Comments
 (0)