mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 00:09:01 +00:00
CI: cache AJA build [Win]
Since we must now build the new libajantv2, which takes some 3 minutes, cache the build in order not to increase the build time. Also use libajantv2 path for the SDK instead of AJA (doesn't require unneeded rename), which will be Windows specific. Only do it in MSW, since the build is slowest. But it can be easily used also for other platforms.
This commit is contained in:
21
.github/scripts/install-common-deps.sh
vendored
21
.github/scripts/install-common-deps.sh
vendored
@@ -35,22 +35,25 @@ download_install_cineform() {(
|
||||
sudo cmake --install .
|
||||
)}
|
||||
|
||||
install_aja() {(
|
||||
download_build_aja() {
|
||||
git clone --depth 1 https://github.com/aja-video/libajantv2.git
|
||||
cd libajantv2
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.13 # needed for arm64 mac
|
||||
cmake -DAJANTV2_DISABLE_DEMOS=ON -DAJANTV2_DISABLE_DRIVER=ON \
|
||||
-DAJANTV2_DISABLE_TOOLS=ON -DAJANTV2_DISABLE_TESTS=ON \
|
||||
-DAJANTV2_DISABLE_PLUGINS=ON -DAJANTV2_BUILD_SHARED=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release -Bbuild -S.
|
||||
cmake --build build --config Release -j "$(nproc)"
|
||||
-DCMAKE_BUILD_TYPE=Release -Blibajantv2/build -Slibajantv2
|
||||
cmake --build libajantv2/build --config Release -j "$(nproc)"
|
||||
}
|
||||
|
||||
install_aja() {(
|
||||
if [ ! -d libajantv2 ]; then
|
||||
download_build_aja
|
||||
fi
|
||||
if is_win; then
|
||||
cp build/ajantv2/Release/ajantv2.dll /usr/local/bin/
|
||||
cp build/ajantv2/Release/ajantv2.lib /usr/local/lib/
|
||||
cd ..
|
||||
mv libajantv2 "$GITHUB_WORKSPACE/AJA"
|
||||
cp libajantv2/build/ajantv2/Release/ajantv2.dll /usr/local/bin/
|
||||
cp libajantv2/build/ajantv2/Release/ajantv2.lib /usr/local/lib/
|
||||
else
|
||||
sudo cmake --install build
|
||||
sudo cmake --install libajantv2/build
|
||||
fi
|
||||
)}
|
||||
|
||||
|
||||
8
.github/workflows/ccpp.yml
vendored
8
.github/workflows/ccpp.yml
vendored
@@ -266,6 +266,14 @@ jobs:
|
||||
- name: Download XIMEA
|
||||
if: steps.cache-macos-ximea.outputs.cache-hit != 'true'
|
||||
run: curl 'https://www.ximea.com/support/attachments/download/37/XIMEA_API_Installer.exe' -o 'C:\XIMEA_API_Installer.exe'
|
||||
|
||||
- name: Cache libajantv2 build
|
||||
id: cache-aja
|
||||
uses: actions/cache@main
|
||||
with:
|
||||
path: 'libajantv2'
|
||||
key: cache-aja-${{ runner.os }}-${{ hashFiles('.github/scripts/install-common-deps.sh') }}
|
||||
|
||||
- name: bootsrap
|
||||
run: .github/scripts/Windows/prepare.ps1
|
||||
shell: pwsh -command ". '{0}'"
|
||||
|
||||
@@ -31,7 +31,7 @@ function run_vs10
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
export INCLUDE='src;AJA;AJA\ajantv2\includes;AJA\ajantv2\src\win'
|
||||
export INCLUDE='src;libajantv2;libajantv2\ajantv2\includes;libajantv2\ajantv2\src\win'
|
||||
|
||||
# rename both aja.cpp because msvc creates object aja.obj for both in the same directory
|
||||
cp src/video_capture/aja.cpp aja_capture.cpp
|
||||
@@ -45,7 +45,7 @@ cmd //Q //C call "$vssetup" "&&" cl //std:c++latest //EHsc //LD //D_XKEYCHECK_H
|
||||
src/aja_common.cpp aja_capture.cpp aja_display.cpp \
|
||||
src/video_capture/aja_win32_utils.cpp src/video_capture_params.cpp \
|
||||
src/utils/config_file.cpp src/utils/video_frame_pool.cpp \
|
||||
AJA/build/ajantv2/Release/ajantv2.lib advapi32.lib Netapi32.lib \
|
||||
libajantv2/build/ajantv2/Release/ajantv2.lib advapi32.lib Netapi32.lib \
|
||||
Shell32.lib Shlwapi.lib user32.lib winmm.lib //Feaja
|
||||
|
||||
cp aja.lib /usr/local/lib
|
||||
|
||||
Reference in New Issue
Block a user