diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 8658b29bd..6033f0d8f 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -17,7 +17,7 @@ jobs: matrix: include: - platform: mac-intel - os: macos-13 + os: macos-14 pack: 1 upload: 1 pack_type: Release @@ -26,11 +26,11 @@ jobs: preset: macos-conan-ninja-release conan_profile: macos-intel conan_prebuilts: dependencies-mac-intel - conan_options: --options with_apple_system_libs=True + conan_options: --profile=dependencies/conan_profiles/base/apple-system artifact_platform: intel - platform: mac-arm - os: macos-13 + os: macos-14 pack: 1 upload: 1 pack_type: Release @@ -39,11 +39,11 @@ jobs: preset: macos-arm-conan-ninja-release conan_profile: macos-arm conan_prebuilts: dependencies-mac-arm - conan_options: --options with_apple_system_libs=True + conan_options: --profile=dependencies/conan_profiles/base/apple-system artifact_platform: arm - platform: ios - os: macos-13 + os: macos-14 pack: 1 upload: 1 pack_type: Release @@ -52,7 +52,7 @@ jobs: preset: ios-release-conan-ccache conan_profile: ios-arm64 conan_prebuilts: dependencies-ios - conan_options: --options with_apple_system_libs=True + conan_options: --profile=dependencies/conan_profiles/base/apple-system - platform: msvc-x64 arch: x64 @@ -61,8 +61,10 @@ jobs: upload: 0 pack_type: RelWithDebInfo extension: zip - before_install: msvc.sh preset: windows-msvc-ninja-release + conan_profile: msvc-x64 + conan_prebuilts: dependencies-windows-x64 + conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:target_pre_windows10=True" artifact_platform: x64 cl: Hostx64/x64/cl.exe @@ -73,8 +75,10 @@ jobs: upload: 0 pack_type: RelWithDebInfo extension: zip - before_install: msvc.sh preset: windows-msvc-ninja-release-x86 + conan_profile: msvc-x86 + conan_prebuilts: dependencies-windows-x86 + conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:target_pre_windows10=True" artifact_platform: x86 cl: Hostx64/x86/cl.exe @@ -85,55 +89,43 @@ jobs: upload: 0 pack_type: RelWithDebInfo extension: zip - before_install: msvc.sh preset: windows-msvc-ninja-release-arm64 + conan_profile: msvc-arm64 + conan_prebuilts: dependencies-windows-arm64 + conan_options: -s "&:build_type=RelWithDebInfo" -c tools.env.virtualenv:powershell=pwsh -o "&:lua_lib=lua" artifact_platform: arm64 cl: HostARM64/ARM64/cl.exe - - platform: mingw_x86_64 - arch: x86_64 - os: ubuntu-24.04 - pack: 1 - pack_type: Release - extension: zip - cmake_args: -G Ninja - before_install: mingw.sh - preset: windows-mingw-conan-linux - conan_profile: mingw64-linux.jinja - conan_prebuilts: dependencies-mingw-x86-64 - - - platform: mingw_x86 - arch: x86 - os: ubuntu-24.04 - pack: 1 - pack_type: Release - extension: zip - cmake_args: -G Ninja - before_install: mingw.sh - preset: windows-mingw-conan-linux - conan_profile: mingw32-linux.jinja - conan_prebuilts: dependencies-mingw-x86 - - platform: android-32 - os: ubuntu-24.04 + os: ubuntu-latest upload: 1 extension: apk preset: android-conan-ninja-release - before_install: android.sh conan_profile: android-32-ndk conan_prebuilts: dependencies-android-armeabi-v7a + conan_options: --profile=dependencies/conan_profiles/base/android-system artifact_platform: armeabi-v7a - platform: android-64 - os: ubuntu-24.04 + os: ubuntu-latest upload: 1 extension: apk preset: android-conan-ninja-release - before_install: android.sh conan_profile: android-64-ndk conan_prebuilts: dependencies-android-arm64-v8a + conan_options: --profile=dependencies/conan_profiles/base/android-system artifact_platform: arm64-v8a + - platform: android-64-intel + os: ubuntu-latest + upload: 1 + extension: apk + preset: android-conan-ninja-release + conan_profile: android-x64-ndk + conan_prebuilts: dependencies-android-x64 + conan_options: --profile=dependencies/conan_profiles/base/android-system + artifact_platform: x64 + runs-on: ${{ matrix.os }} # Allow non-MSVC builds to fail without failing whole job # This keeps pipeline moving so Windows Installer job can still run @@ -148,11 +140,11 @@ jobs: uses: actions/checkout@v5 with: submodules: recursive - + - name: Prepare APT staging dir if: contains(matrix.os, 'ubuntu') run: mkdir -p "$RUNNER_TEMP/apt-cache" - + - name: APT cache restore if: contains(matrix.os, 'ubuntu') id: aptcache @@ -166,7 +158,7 @@ jobs: - name: Prepare CI if: "${{ matrix.before_install != '' }}" run: source '${{github.workspace}}/CI/before_install/${{matrix.before_install}}' '${{matrix.arch}}' - + # Save only on cache miss, GitHub caches are immutable per key - name: APT cache save if: contains(matrix.os, 'ubuntu') && steps.aptcache.outputs.cache-hit != 'true' @@ -177,11 +169,9 @@ jobs: - name: Install Conan Dependencies if: "${{ matrix.conan_prebuilts != '' }}" - run: source '${{github.workspace}}/CI/install_conan_dependencies.sh' '${{matrix.conan_prebuilts}}' - - - name: Install vcpkg Dependencies - if: ${{ startsWith(matrix.platform, 'msvc') }} - run: source '${{github.workspace}}/CI/install_vcpkg_dependencies.sh' '${{matrix.platform}}' 'vcpkg' + run: | + pipx install conan + source '${{github.workspace}}/CI/install_conan_dependencies.sh' '${{matrix.conan_prebuilts}}' - name: Setup MSVC Developer Command Prompt if: ${{ startsWith(matrix.platform, 'msvc') }} @@ -206,7 +196,7 @@ jobs: max-size: '5G' verbose: 2 job-summary: "" # <-- disable built-in summary to avoid duplicate block - + - name: Setup compiler cache for branch builds uses: hendrikmuhs/ccache-action@v1.2 if: ${{ github.event.number == '' }} @@ -220,7 +210,7 @@ jobs: max-size: '5G' verbose: 2 job-summary: "" # <-- disable built-in summary to avoid duplicate block - + - name: CCache tuning (Android) if: ${{ startsWith(matrix.platform, 'android') }} run: | @@ -230,33 +220,36 @@ jobs: ccache --set-config=hash_dir=true ccache --set-config=sloppiness=time_macros - - name: Install Conan - if: "${{ matrix.conan_profile != '' }}" - run: pipx install 'conan<2.0' - - name: Install Conan profile if: "${{ matrix.conan_profile != '' }}" run: | - conan profile new default --detect + conan profile detect conan install . \ - --install-folder=conan-generated \ - --no-imports \ + --output-folder=conan-generated \ --build=never \ - --profile:build=default \ - --profile:host=CI/conan/${{ matrix.conan_profile }} \ + --profile=dependencies/conan_profiles/${{ matrix.conan_profile }} \ ${{ matrix.conan_options }} - env: - GENERATE_ONLY_BUILT_CONFIG: 1 # Can't be set in Gradle project - name: Configure enableUncompressedNativeLibs if: ${{ startsWith(matrix.platform, 'android') }} run: mkdir -p ~/.gradle && echo "android.bundle.enableUncompressedNativeLibs=true" > ~/.gradle/gradle.properties - # Workaround for gradle not discovering SDK that was installed via conan - - name: Find Android NDK + # Workaround for gradle not discovering SDK that was installed via Сonan + - name: Link Android NDK from Conan cache to Android SDK path if: ${{ startsWith(matrix.platform, 'android') }} - run: sudo ln -s -T /home/runner/.conan/data/android-ndk/r25c/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/bin /usr/local/lib/android/sdk/ndk/25.2.9519653 + run: | + ndkPackage='android-ndk' + hexRegex='[[:xdigit:]]+' + + ndkPackageRevision=$(conan list "$ndkPackage/*:*" --format=compact \ + | egrep --only-matching "$ndkPackage/\\w+#$hexRegex:$hexRegex") + ndkPackagePath=$(conan cache path "$ndkPackageRevision") + + # format: Pkg.Revision = 25.2.9519653 + ndkPath="$ndkPackagePath/bin" + ndkVersion=$(fgrep 'Pkg.Revision' "$ndkPath/source.properties" | cut -d ' ' -f 3) + ln -s -T "$ndkPath" "$ANDROID_HOME/ndk/$ndkVersion" - name: Install Java uses: actions/setup-java@v5 @@ -266,6 +259,7 @@ jobs: java-version: '17' # a hack to build ID for x64 build in order for Google Play to allow upload of both 32 and 64 bit builds + # TODO: x86_64 - name: Bump Android x64 build ID if: ${{ matrix.platform == 'android-64' }} run: perl -i -pe 's/versionCode (\d+)/$x=$1+1; "versionCode $x"/e' android/vcmi-app/build.gradle @@ -283,27 +277,33 @@ jobs: env: PULL_REQUEST: ${{ github.event.pull_request.number }} - - name: Configure + - name: Configure (non-MSVC) + if: ${{ !startsWith(matrix.platform, 'msvc') }} run: | if [[ ("${{ matrix.preset }}" == "android-conan-ninja-release") && ("${{ github.ref }}" != 'refs/heads/master') ]]; then - cmake -DENABLE_CCACHE:BOOL=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DANDROID_GRADLE_PROPERTIES="applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily;applicationVariant=daily" \ - --preset ${{ matrix.preset }} - elif ${{ startsWith(matrix.platform, 'msvc') }}; then - CL="$VCToolsInstallDir/bin/${{ matrix.cl }}" - cmake \ - -D CMAKE_C_COMPILER:FILEPATH="$CL" \ - -D CMAKE_CXX_COMPILER:FILEPATH="$CL" \ - --preset ${{ matrix.preset }} - else - cmake -DENABLE_CCACHE:BOOL=ON --preset ${{ matrix.preset }} + # key1=value1;key2=value2;... + gradleProperties=$(python3 CI/android/gradle_daily_props.py) + androidOptions=("-DANDROID_GRADLE_PROPERTIES=$gradleProperties") + androidOptions+=("-DCMAKE_C_COMPILER_LAUNCHER=ccache" "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache") fi + cmake -DENABLE_CCACHE:BOOL=ON "${androidOptions[@]}" --preset ${{ matrix.preset }} + - name: Configure (MSVC) + if: ${{ startsWith(matrix.platform, 'msvc') }} + run: | + & conan-generated\conanrun.ps1 + + $CL = "$($env:VCToolsInstallDir)/bin/${{ matrix.cl }}" + cmake ` + -D "CMAKE_C_COMPILER:FILEPATH=$CL" ` + -D "CMAKE_CXX_COMPILER:FILEPATH=$CL" ` + --preset ${{ matrix.preset }} + shell: pwsh - name: Build run: | + ${{ startsWith(matrix.platform, 'msvc') && '& conan-generated\conanrun.ps1' }} cmake --build --preset ${{matrix.preset}} + shell: pwsh env: ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} @@ -320,15 +320,10 @@ jobs: id: cpack if: ${{ matrix.pack == 1 }} run: | - cd '${{github.workspace}}/out/build/${{matrix.preset}}' - - # Workaround for CPack bug on macOS 13 - counter=0 - until cpack -C ${{matrix.pack_type}} || ((counter > 20)); do - sleep 3 - ((counter++)) - done - rm -rf _CPack_Packages + ${{ startsWith(matrix.platform, 'msvc') && '& conan-generated\conanrun.ps1' }} + cd "${{github.workspace}}/out/build/${{matrix.preset}}" + cpack -C ${{matrix.pack_type}} + shell: pwsh - name: Find Android package if: ${{ startsWith(matrix.platform, 'android') }} @@ -410,14 +405,14 @@ jobs: run: | source '${{github.workspace}}/CI/get_package_name.sh' echo VCMI_PACKAGE_FILE_NAME="$VCMI_PACKAGE_FILE_NAME" >> $GITHUB_ENV - + - name: Create source code archive (including submodules) run: | git archive HEAD -o "release.tar" --worktree-attributes -v git submodule update --init --recursive git submodule --quiet foreach 'cd "$toplevel"; tar -rvf "release.tar" "$sm_path"' gzip release.tar - + - name: Upload source code archive id: upload_source uses: actions/upload-artifact@v4 @@ -434,7 +429,7 @@ jobs: cat > .summary/source.json <> "$GITHUB_OUTPUT" echo "version_timestamp=${version_timestamp}" >> "$GITHUB_OUTPUT" - - name: Install ucrt Dependencies - run: source '${{github.workspace}}/CI/install_vcpkg_dependencies.sh' '${{matrix.platform}}' 'ucrt' + - name: Download UCRT + run: source '${{github.workspace}}/CI/wininstaller/download_ucrt.sh' '${{matrix.platform}}' - name: Build Number run: | @@ -630,13 +624,11 @@ jobs: path: ${{github.workspace}}/artifact - name: Extract Artifact - shell: bash run: | mkdir artifact/extracted unzip "artifact/${{ env.VCMI_PACKAGE_FILE_NAME }}.zip" -d artifact/extracted - name: Ensure Inno Setup is installed - shell: bash run: | if [ ! -f "/c/Program Files (x86)/Inno Setup 6/ISCC.exe" ] && [ ! -f "/c/ProgramData/Chocolatey/bin/ISCC.exe" ]; then choco install innosetup --no-progress -y @@ -728,7 +720,7 @@ jobs: steps: - name: Checkout (for script path) uses: actions/checkout@v5 - + - name: Download all partial JSON artifacts continue-on-error: true uses: actions/download-artifact@v5 @@ -736,7 +728,7 @@ jobs: pattern: partial-json-* merge-multiple: true path: partials - + - name: Run final summary env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CI/android/gradle_daily_props.py b/CI/android/gradle_daily_props.py new file mode 100644 index 000000000..179483997 --- /dev/null +++ b/CI/android/gradle_daily_props.py @@ -0,0 +1,7 @@ +dic = { + "applicationIdSuffix": ".daily", + "applicationLabel": "VCMI daily", + "applicationVariant": "daily", + "signingConfig": "dailySigning", +} +print(";".join([f"{key}={value}" for key, value in dic.items()])) diff --git a/CI/before_install/android.sh b/CI/before_install/android.sh deleted file mode 100644 index 9fba7de9f..000000000 --- a/CI/before_install/android.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -sudo apt-get update -sudo apt-get install ninja-build diff --git a/CI/before_install/linux_qt5.sh b/CI/before_install/linux_qt5.sh index 28ab0614b..a4bf69ff6 100644 --- a/CI/before_install/linux_qt5.sh +++ b/CI/before_install/linux_qt5.sh @@ -24,4 +24,4 @@ sudo eatmydata apt -yq --no-install-recommends \ sudo rm -f "$APT_CACHE/lock" || true sudo rm -rf "$APT_CACHE/partial" || true -sudo chown -R "$USER:$USER" "$APT_CACHE" \ No newline at end of file +sudo chown -R "$USER:$USER" "$APT_CACHE" diff --git a/CI/before_install/linux_qt6.sh b/CI/before_install/linux_qt6.sh index 96cca364b..305ea866d 100644 --- a/CI/before_install/linux_qt6.sh +++ b/CI/before_install/linux_qt6.sh @@ -24,4 +24,4 @@ sudo eatmydata apt -yq --no-install-recommends \ sudo rm -f "$APT_CACHE/lock" || true sudo rm -rf "$APT_CACHE/partial" || true -sudo chown -R "$USER:$USER" "$APT_CACHE" \ No newline at end of file +sudo chown -R "$USER:$USER" "$APT_CACHE" diff --git a/CI/before_install/macos.sh b/CI/before_install/macos.sh index 98e63a30e..afdec709c 100644 --- a/CI/before_install/macos.sh +++ b/CI/before_install/macos.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -echo DEVELOPER_DIR=/Applications/Xcode_14.2.app >> $GITHUB_ENV +echo DEVELOPER_DIR=/Applications/Xcode_16.2.app >> $GITHUB_ENV diff --git a/CI/before_install/mingw.sh b/CI/before_install/mingw.sh deleted file mode 100644 index e2fcd5e9d..000000000 --- a/CI/before_install/mingw.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -export DEBIAN_FRONTEND=noninteractive - -ARCH="${1:-x86_64}" -case "$ARCH" in - x86) triplet=i686-w64-mingw32 ;; - x86_64) triplet=x86_64-w64-mingw32 ;; - *) echo "Unsupported ARCH '$ARCH' (use: x86 | x86_64)"; exit 2 ;; -esac - -APT_CACHE="${APT_CACHE:-${RUNNER_TEMP:-/tmp}/apt-cache}" -sudo mkdir -p "$APT_CACHE" - -sudo apt -yq -o Acquire::Retries=3 update -sudo apt -yq install eatmydata - -sudo eatmydata apt -yq --no-install-recommends \ - -o Dir::Cache::archives="$APT_CACHE" \ - -o APT::Keep-Downloaded-Packages=true \ - -o Acquire::Retries=3 -o Dpkg::Use-Pty=0 \ - install \ - ninja-build nsis mingw-w64 g++-mingw-w64 - -if [[ -x "/usr/bin/${triplet}-g++-posix" ]]; then - sudo update-alternatives --set "${triplet}-g++" "/usr/bin/${triplet}-g++-posix" -fi -if [[ -x "/usr/bin/${triplet}-gcc-posix" ]]; then - sudo update-alternatives --set "${triplet}-gcc" "/usr/bin/${triplet}-gcc-posix" -fi - -sudo rm -f "$APT_CACHE/lock" || true -sudo rm -rf "$APT_CACHE/partial" || true -sudo chown -R "$USER:$USER" "$APT_CACHE" \ No newline at end of file diff --git a/CI/before_install/msvc.sh b/CI/before_install/msvc.sh deleted file mode 100644 index a0f7687f6..000000000 --- a/CI/before_install/msvc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -MSVC_INSTALL_PATH=$(vswhere -latest -property installationPath) -echo "MSVC_INSTALL_PATH = $MSVC_INSTALL_PATH" -echo "Installed toolset versions:" -ls -vr "$MSVC_INSTALL_PATH/VC/Tools/MSVC" - -TOOLS_DIR=$(ls -vr "$MSVC_INSTALL_PATH/VC/Tools/MSVC/" | head -1) -DUMPBIN_PATH="$MSVC_INSTALL_PATH/VC/Tools/MSVC/$TOOLS_DIR/bin/Hostx64/x64/dumpbin.exe" - -# This command should work as well, but for some reason it is *extremely* slow on the Github CI (~7 minutes) -#DUMPBIN_PATH=$(vswhere -latest -find **/dumpbin.exe | head -n 1) - -echo "TOOLS_DIR = $TOOLS_DIR" -echo "DUMPBIN_PATH = $DUMPBIN_PATH" - -dirname "$DUMPBIN_PATH" > "$GITHUB_PATH" diff --git a/CI/emit_partial.py b/CI/emit_partial.py index f3c291240..de13b7780 100644 --- a/CI/emit_partial.py +++ b/CI/emit_partial.py @@ -83,7 +83,7 @@ def arch_label(platform: str, arch_env: Optional[str]) -> str: return arch_env mapping = { "mac-intel": "Intel", - "mac-arm": "ARM64", + "mac-arm": "Apple Silicon", "ios": "ARM64", "msvc-x64": "x64", "msvc-x86": "x86", @@ -92,6 +92,7 @@ def arch_label(platform: str, arch_env: Optional[str]) -> str: "mingw_x86_64": "x64", "android-32": "ARMv7", "android-64": "ARM64", + "android-64-intel": "x86_64", } return mapping.get(platform, platform) diff --git a/CI/install_conan_dependencies.sh b/CI/install_conan_dependencies.sh index 593f96e30..69c96b1e1 100644 --- a/CI/install_conan_dependencies.sh +++ b/CI/install_conan_dependencies.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -RELEASE_TAG="1.3" -FILENAME="$1" -DOWNLOAD_URL="https://github.com/vcmi/vcmi-dependencies/releases/download/$RELEASE_TAG/$FILENAME.txz" +RELEASE_TAG="2025-08-24" +FILENAME="$1.tgz" +DOWNLOAD_URL="https://github.com/vcmi/vcmi-dependencies/releases/download/$RELEASE_TAG/$FILENAME" -mkdir ~/.conan -cd ~/.conan -curl -L "$DOWNLOAD_URL" | tar -xf - --xz +downloadedFile="$RUNNER_TEMP/$FILENAME" +curl -Lo "$downloadedFile" "$DOWNLOAD_URL" +conan cache restore "$downloadedFile" diff --git a/CI/install_vcpkg_dependencies.sh b/CI/install_vcpkg_dependencies.sh deleted file mode 100644 index 83d6de888..000000000 --- a/CI/install_vcpkg_dependencies.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -ACCOUNT="vcmi" - -# Fetch latest release tag from GitHub API -# RELEASE_TAG=$(curl -s "https://api.github.com/repos/$ACCOUNT/vcmi-deps-windows/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') - -RELEASE_TAG="v1.9" - -# 2. parameter: all | vcpkg | ucrt (default: all) -PART="${2:-all}" - -# --- VCPKG --- -if [[ "$PART" == "all" || "$PART" == "vcpkg" ]]; then - DEP_FILENAME="dependencies-$1" - DEP_URL="https://github.com/$ACCOUNT/vcmi-deps-windows/releases/download/$RELEASE_TAG/$DEP_FILENAME.txz" - curl -L "$DEP_URL" | tar -xf - --xz -fi - -# --- UCRT --- -if [[ "$PART" == "all" || "$PART" == "ucrt" ]]; then - UCRT_FILENAME="ucrtRedist-$1" - UCRT_URL="https://github.com/$ACCOUNT/vcmi-deps-windows/releases/download/$RELEASE_TAG/$UCRT_FILENAME.txz" - mkdir -p ucrt - curl -L "$UCRT_URL" | tar -xf - --xz -C ucrt -fi \ No newline at end of file diff --git a/CI/wininstaller/download_ucrt.sh b/CI/wininstaller/download_ucrt.sh new file mode 100644 index 000000000..30a5c60c6 --- /dev/null +++ b/CI/wininstaller/download_ucrt.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +RELEASE_TAG="v1.9" +UCRT_FILENAME="ucrtRedist-$1" +UCRT_URL="https://github.com/vcmi/vcmi-deps-windows/releases/download/$RELEASE_TAG/$UCRT_FILENAME.txz" + +UCRT_DIR="ucrt" +mkdir -p "$UCRT_DIR" +curl -L "$UCRT_URL" | tar -xf - --xz -C "$UCRT_DIR" diff --git a/CMakePresets.json b/CMakePresets.json index 0695947d7..85140ac4c 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -154,14 +154,16 @@ "name": "windows-msvc-release", "displayName": "Windows x64 RelWithDebInfo", "description": "VCMI RelWithDebInfo build", - "inherits": "default-release", + "inherits": [ + "build-with-conan", + "default-release" + ], "generator": "Visual Studio 17 2022", "architecture": { "value": "x64", "strategy": "set" }, "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", "CMAKE_POLICY_DEFAULT_CMP0091": "NEW" } }, @@ -169,10 +171,12 @@ "name": "windows-msvc-release-x86", "displayName": "Windows x86 RelWithDebInfo", "description": "VCMI RelWithDebInfo build", - "inherits": "default-release", + "inherits": [ + "build-with-conan", + "default-release" + ], "generator": "Visual Studio 17 2022", "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", "CMAKE_POLICY_DEFAULT_CMP0091": "NEW", "CMAKE_GENERATOR_PLATFORM": "WIN32" } @@ -181,14 +185,16 @@ "name": "windows-msvc-release-arm64", "displayName": "Windows ARM64 RelWithDebInfo", "description": "VCMI Windows ARM64 build", - "inherits": "default-release", + "inherits": [ + "build-with-conan", + "default-release" + ], "generator": "Visual Studio 17 2022", "architecture": { "value": "ARM64", "strategy": "set" }, "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", "CMAKE_POLICY_DEFAULT_CMP0091": "NEW" } }, @@ -202,57 +208,38 @@ } }, { - "name": "windows-msvc-ninja-release", - "displayName": "Windows x64 RelWithDebInfo (Ninja)", - "description": "VCMI RelWithDebInfo build using Ninja + sccache", - "inherits": "default-release", - "generator": "Ninja", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", - "CMAKE_POLICY_DEFAULT_CMP0091": "NEW", - "FORCE_BUNDLED_MINIZIP": "ON", - "ENABLE_CCACHE": "ON", - "CMAKE_C_COMPILER_LAUNCHER": "sccache", - "CMAKE_CXX_COMPILER_LAUNCHER": "sccache", - "CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded", - "ENABLE_MULTI_PROCESS_BUILDS": "OFF", - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_C_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7", - "CMAKE_CXX_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7" - } - }, - { - "name": "windows-msvc-ninja-release-x86", - "displayName": "Windows x86 RelWithDebInfo (Ninja)", - "description": "VCMI RelWithDebInfo build using Ninja + sccache (x86)", - "inherits": "windows-msvc-ninja-release", - "cacheVariables": { - "VCPKG_TARGET_TRIPLET": "x86-windows" - } - }, - { - "name": "windows-msvc-ninja-release-arm64", - "displayName": "Windows ARM64 RelWithDebInfo (Ninja)", - "description": "VCMI RelWithDebInfo build using Ninja + sccache (ARM64)", - "inherits": "windows-msvc-ninja-release", - "cacheVariables": { - "VCPKG_TARGET_TRIPLET": "arm64-windows" - } - }, - { - "name": "windows-mingw-conan-linux", - "displayName": "Ninja+Conan release", - "description": "VCMI Windows Ninja using Conan on Linux", + "name": "windows-msvc-ninja-release", + "displayName": "Windows x64 RelWithDebInfo (Ninja)", + "description": "VCMI RelWithDebInfo build using Ninja + sccache", "inherits": [ "build-with-conan", "default-release" ], + "generator": "Ninja", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "FORCE_BUNDLED_FL": "ON", - "ENABLE_TEMPLATE_EDITOR": "OFF" + "CMAKE_POLICY_DEFAULT_CMP0091": "NEW", + "ENABLE_CCACHE": "ON", + "CMAKE_C_COMPILER_LAUNCHER": "sccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache", + "CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded", + "ENABLE_MULTI_PROCESS_BUILDS": "OFF", + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_C_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7", + "CMAKE_CXX_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7" } }, + { + "name": "windows-msvc-ninja-release-x86", + "displayName": "Windows x86 RelWithDebInfo (Ninja)", + "description": "VCMI RelWithDebInfo build using Ninja + sccache (x86)", + "inherits": "windows-msvc-ninja-release" + }, + { + "name": "windows-msvc-ninja-release-arm64", + "displayName": "Windows ARM64 RelWithDebInfo (Ninja)", + "description": "VCMI RelWithDebInfo build using Ninja + sccache (ARM64)", + "inherits": "windows-msvc-ninja-release" + }, { "name": "macos-ninja-release", "displayName": "Ninja release", @@ -517,12 +504,6 @@ "configurePreset": "windows-msvc-ninja-release-arm64", "inherits": "default-release" }, - { - "name": "windows-mingw-conan-linux", - "configurePreset": "windows-mingw-conan-linux", - "inherits": "default-release", - "configuration": "Release" - }, { "name": "ios-release-conan", "configurePreset": "ios-release-conan", @@ -608,11 +589,6 @@ "name": "windows-msvc-release", "configurePreset": "windows-msvc-release", "inherits": "default-release" - }, - { - "name": "windows-mingw-conan-linux", - "configurePreset": "windows-mingw-conan-linux", - "inherits": "default-release" } ] } diff --git a/cmake_modules/VCMIUtils.cmake b/cmake_modules/VCMIUtils.cmake index 443f916f1..bf5e1e590 100644 --- a/cmake_modules/VCMIUtils.cmake +++ b/cmake_modules/VCMIUtils.cmake @@ -133,7 +133,7 @@ function(vcmi_deploy_qt deployQtToolName deployQtOptions) find_program(TOOL_DEPLOYQT NAMES ${deployQtToolName} PATHS "${qtBinDir}") if(TOOL_DEPLOYQT) install(CODE " - execute_process(COMMAND \"${TOOL_DEPLOYQT}\" ${deployQtOptions} -verbose 2) + execute_process(COMMAND \"${TOOL_DEPLOYQT}\" ${deployQtOptions} -verbose=2) ") else() message(WARNING "${deployQtToolName} not found, running cpack would result in broken package")