This commit is contained in:
tooomm 2025-08-03 05:37:06 -03:00 committed by GitHub
commit e07ee45740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 144 additions and 148 deletions

View file

@ -114,6 +114,11 @@ if [[ $PACKAGE_TYPE ]]; then
flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE")
fi
#if [[ $RUNNER_OS == Windows ]]; then
# VCPKG_TOOLCHAIN_FILE="D:/a/Cockatrice/vcpkg/scripts/buildsystems/vcpkg.cmake"
# flags+=("-DCMAKE_TOOLCHAIN_FILE=$VCPKG_TOOLCHAIN_FILE" "-DVCPKG_TARGET_TRIPLET=x64-windows")
#fi
# Add cmake --build flags
buildflags=(--config "$BUILDTYPE")
@ -151,19 +156,13 @@ if [[ $USE_CCACHE ]]; then
echo "::endgroup::"
fi
echo "::group::Configure cmake"
echo "::group::Configure CMake"
cmake --version
cmake .. "${flags[@]}"
echo "::endgroup::"
echo "::group::Build project"
if [[ $RUNNER_OS == Windows ]]; then
# Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
# and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt
cmake --build . "${buildflags[@]}" -- -p:UseMultiToolTask=true -p:EnableClServerMode=true
else
cmake --build . "${buildflags[@]}"
fi
cmake --build . "${buildflags[@]}"
echo "::endgroup::"
if [[ $USE_CCACHE ]]; then
@ -184,6 +183,27 @@ if [[ $MAKE_INSTALL ]]; then
echo "::endgroup::"
fi
if [[ $RUNNER_OS == Windows ]]; then
echo "Searching for liblzma.dll after build..."
FOUND_DLL=$(find . -name "liblzma.dll" 2>/dev/null)
if [ -n "$FOUND_DLL" ]; then
echo "liblzma.dll found at:"
echo "$FOUND_DLL"
echo "Cleaning up duplicate debug DLLs"
rm -f ./oracle/liblzma.dll
rm -f ./vcpkg_installed/x64-windows/debug/bin/liblzma.dll
find . -iname "liblzma.dll"
else
echo "ERROR: liblzma.dll not found after build!"
exit 1
fi
fi
if [[ $MAKE_PACKAGE ]]; then
echo "::group::Create package"