Skip to content

Commit 0ddf7c3

Browse files
author
pfeatherstone
committed
removed vcpkg. download and cache MKL manually to reduce build times on Github Actions
1 parent dd405ea commit 0ddf7c3

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/build_cpp.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ jobs:
5353

5454
- name: ubuntu-22.04-ffmpeg-513
5555
os : ubuntu-22.04
56-
build_tests : true
5756
build_ffmpeg : true
57+
build_ffmpeg_examples : true
5858
ffmpeg_version : 5.1.3
5959
c_compiler : gcc
6060
cxx_compiler : g++
@@ -215,24 +215,40 @@ jobs:
215215
include:
216216
- name: windows-latest-openblas
217217
os : windows-latest
218-
extra_packages : openblas:x64-windows
218+
build_openblas : true
219219

220220
- name: windows-latest-mkl
221221
os : windows-latest
222-
extra_packages : intel-mkl:x64-windows
222+
build_mkl : true
223223

224224
steps:
225225
- name: Checkout repository
226226
uses: actions/checkout@v4
227227

228-
- name: Install dependencies
229-
run: vcpkg install ${{ matrix.extra_packages }}
228+
- name: Prepare oneAPI dir for cache restore
229+
if: ${{ matrix.build_mkl }}
230+
run: mkdir -p "C:/Program Files (x86)/Intel/oneAPI/"
231+
232+
- name: Cache oneMKL (Windows)
233+
if: ${{ matrix.build_mkl}}
234+
uses: actions/cache@v3
235+
id: cache-oneapi
236+
with:
237+
path: |
238+
C:/Program Files (x86)/Intel/oneAPI/mkl
239+
C:/Program Files (x86)/Intel/oneAPI/tbb
240+
C:/Program Files (x86)/Intel/oneAPI/compiler
241+
key: oneapi-mkl-try0
242+
243+
- name: Download MKL
244+
if: ${{ matrix.build_mkl && (steps.cache-oneapi.outputs.cache-hit != 'true') }}
245+
run: |
246+
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/f5881e61-dcdc-40f1-9bd9-717081ac623c/intel-oneapi-base-toolkit-2025.2.1.46_offline.exe
247+
intel-oneapi-base-toolkit-2025.2.1.46_offline.exe -a --silent --eula accept --install-dir
230248
231249
- name: Configure
232250
run: |
233-
cmake dlib/test -B build \
234-
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
235-
-DVCPKG_TARGET_TRIPLET=x64-windows
251+
cmake dlib/test -B build
236252
237253
- name: Build just tests
238254
run: cmake --build build --config Release --target dtest --parallel 4

0 commit comments

Comments
 (0)