Improved CI build scripts 3.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-08-03 16:01:34 -03:00
parent d7e35cb235
commit aa8b8c07bb
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
3 changed files with 6 additions and 9 deletions

View file

@ -3,6 +3,7 @@ name: Windows MSYS
on: [push, pull_request] on: [push, pull_request]
env: env:
DISABLE_CCACHE: 1
NJOBS: 4 NJOBS: 4
jobs: jobs:

View file

@ -35,8 +35,6 @@ INSTALL_PREFIX=${PWD}/package-data-${COMPILER}
echo echo
echo "Building x64 virtual camera driver" echo "Building x64 virtual camera driver"
echo echo
COMPILER_C=x86_64-w64-mingw32-${COMPILER_C}
COMPILER_CXX=x86_64-w64-mingw32-${COMPILER_CXX}
buildDir=build-${COMPILER}-x64 buildDir=build-${COMPILER}-x64
mkdir ${buildDir} mkdir ${buildDir}
x86_64-w64-mingw32-cmake \ x86_64-w64-mingw32-cmake \
@ -45,16 +43,14 @@ x86_64-w64-mingw32-cmake \
-B ${buildDir} \ -B ${buildDir} \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \ -DCMAKE_C_COMPILER="x86_64-w64-mingw32-${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \ -DCMAKE_CXX_COMPILER="x86_64-w64-mingw32-${COMPILER_CXX}" \
${EXTRA_PARAMS} ${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS} cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install cmake --build ${buildDir} --target install
echo echo
echo "Building x86 virtual camera driver" echo "Building x86 virtual camera driver"
echo echo
COMPILER_C=i686-w64-mingw32-${COMPILER_C}
COMPILER_CXX=i686-w64-mingw32-${COMPILER_CXX}
buildDir=build-${COMPILER}-x86 buildDir=build-${COMPILER}-x86
mkdir ${buildDir} mkdir ${buildDir}
i686-w64-mingw32-cmake \ i686-w64-mingw32-cmake \
@ -63,8 +59,8 @@ i686-w64-mingw32-cmake \
-B ${buildDir} \ -B ${buildDir} \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_C_COMPILER="${COMPILER_C}" \ -DCMAKE_C_COMPILER="i686-w64-mingw32-${COMPILER_C}" \
-DCMAKE_CXX_COMPILER="${COMPILER_CXX}" \ -DCMAKE_CXX_COMPILER="i686-w64-mingw32-${COMPILER_CXX}" \
${EXTRA_PARAMS} ${EXTRA_PARAMS}
cmake --build ${buildDir} --parallel ${NJOBS} cmake --build ${buildDir} --parallel ${NJOBS}
cmake --build ${buildDir} --target install cmake --build ${buildDir} --target install

View file

@ -26,7 +26,7 @@ else
COMPILER_CXX=g++ COMPILER_CXX=g++
fi fi
if [ -z "${DISABLE_CCACHE}" ]; then if [ "${DISABLE_CCACHE}" != 1 ]; then
EXTRA_PARAMS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache" EXTRA_PARAMS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache"
fi fi