From ffdf00876e227ead09945b9a6726dd3896d2889a Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Tue, 4 Nov 2025 02:23:53 -0500 Subject: [PATCH] build(cmake): use mutli-config generators for debug/release presets This prevents us from hardcoding variants for each release type. Yay! Signed-off-by: Seth Flynn --- .github/actions/package/linux/action.yml | 12 +- .github/workflows/build.yml | 43 ++-- .github/workflows/codeql.yml | 4 +- cmake/commonPresets.json | 51 +--- cmake/linuxPreset.json | 178 ++------------ cmake/macosPreset.json | 285 ++++------------------- cmake/windowsMSVCPreset.json | 283 ++-------------------- cmake/windowsMinGWPreset.json | 173 ++------------ 8 files changed, 149 insertions(+), 880 deletions(-) diff --git a/.github/actions/package/linux/action.yml b/.github/actions/package/linux/action.yml index 4aebcf39d..74e1c2a14 100644 --- a/.github/actions/package/linux/action.yml +++ b/.github/actions/package/linux/action.yml @@ -13,10 +13,6 @@ inputs: description: Name of the uploaded artifact required: true default: Linux - cmake-preset: - description: Base CMake preset previously used for the build - required: true - default: linux qt-version: description: Version of Qt to use required: true @@ -62,7 +58,7 @@ runs: GPG_PRIVATE_KEY: ${{ inputs.gpg-private-key }} run: | - cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr + cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr mv ${{ env.INSTALL_APPIMAGE_DIR }}/usr/share/metainfo/org.prismlauncher.PrismLauncher.metainfo.xml ${{ env.INSTALL_APPIMAGE_DIR }}/usr/share/metainfo/org.prismlauncher.PrismLauncher.appdata.xml export "NO_APPSTREAM=1" # we have to skip appstream checking because appstream on ubuntu 20.04 is outdated @@ -107,12 +103,10 @@ runs: env: BUILD_DIR: build - CMAKE_PRESET: ${{ inputs.cmake-preset }} - INSTALL_PORTABLE_DIR: install-portable run: | - cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} - cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable + cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} + cmake --install ${{ env.BUILD_DIR }} --config ${{ inputs.build-type }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable for l in $(find ${{ env.INSTALL_PORTABLE_DIR }} -type f); do l=${l#$(pwd)/}; l=${l#${{ env.INSTALL_PORTABLE_DIR }}/}; l=${l#./}; echo $l; done > ${{ env.INSTALL_PORTABLE_DIR }}/manifest.txt cd ${{ env.INSTALL_PORTABLE_DIR }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a216e0a5e..4bba9bc4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: include: - os: ubuntu-22.04 artifact-name: Linux - base-cmake-preset: linux + cmake-preset: linux # NOTE(@getchoo): Yes, we're intentionally using 24.04 here!!! # @@ -87,34 +87,34 @@ jobs: # *for the same version* are compiled against 24.04 on ARM, and *not* 22.04 like x64 - os: ubuntu-24.04-arm artifact-name: Linux-aarch64 - base-cmake-preset: linux + cmake-preset: linux - os: windows-2022 artifact-name: Windows-MinGW-w64 - base-cmake-preset: windows_mingw + cmake-preset: windows_mingw msystem: CLANG64 vcvars-arch: amd64_x86 - os: windows-11-arm artifact-name: Windows-MinGW-arm64 - base-cmake-preset: windows_mingw + cmake-preset: windows_mingw msystem: CLANGARM64 vcvars-arch: arm64 - os: windows-2022 artifact-name: Windows-MSVC - base-cmake-preset: windows_msvc + cmake-preset: windows_msvc # TODO(@getchoo): This is the default in setup-dependencies/windows. Why isn't it working?!?! vcvars-arch: amd64 - os: windows-11-arm artifact-name: Windows-MSVC-arm64 - base-cmake-preset: windows_msvc + cmake-preset: windows_msvc vcvars-arch: arm64 - os: macos-14 artifact-name: macOS - base-cmake-preset: ${{ (inputs.build-type || 'Debug') == 'Debug' && 'macos_universal' || 'macos' }} + cmake-preset: macos_universal macosx-deployment-target: 12.0 runs-on: ${{ matrix.os }} @@ -124,6 +124,11 @@ jobs: shell: ${{ matrix.msystem != '' && 'msys2 {0}' || 'bash' }} env: + ARTIFACT_NAME: ${{ matrix.artifact-name }}-Qt6 + BUILD_PLATFORM: official + BUILD_TYPE: ${{ inputs.build-type || 'Debug' }} + CMAKE_PRESET: ${{ matrix.cmake-preset }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx-deployment-target }} steps: @@ -140,7 +145,7 @@ jobs: id: setup-dependencies uses: ./.github/actions/setup-dependencies with: - build-type: ${{ inputs.build-type || 'Debug' }} + build-type: ${{ env.BUILD_TYPE }} artifact-name: ${{ matrix.artifact-name }} msystem: ${{ matrix.msystem }} vcvars-arch: ${{ matrix.vcvars-arch }} @@ -150,22 +155,17 @@ jobs: # BUILD ## - - name: Get CMake preset - id: cmake-preset - env: - BASE_CMAKE_PRESET: ${{ matrix.base-cmake-preset }} - PRESET_TYPE: ${{ (inputs.build-type || 'Debug') == 'Debug' && 'debug' || 'ci' }} + - name: Configure project run: | - echo preset="$BASE_CMAKE_PRESET"_"$PRESET_TYPE" >> "$GITHUB_OUTPUT" + cmake --preset "$CMAKE_PRESET" - - name: Run CMake workflow - env: - CMAKE_PRESET: ${{ steps.cmake-preset.outputs.preset }} - - ARTIFACT_NAME: ${{ matrix.artifact-name }}-Qt6 - BUILD_PLATFORM: official + - name: Run build run: | - cmake --workflow --preset "$CMAKE_PRESET" + cmake --build --preset "$CMAKE_PRESET" --config "$BUILD_TYPE" + + - name: Run tests + run: | + ctest --preset "$CMAKE_PRESET" --build-config "$BUILD_TYPE" ## # PACKAGE @@ -184,7 +184,6 @@ jobs: version: ${{ steps.short-version.outputs.version }} build-type: ${{ steps.setup-dependencies.outputs.build-type }} artifact-name: ${{ matrix.artifact-name }} - cmake-preset: ${{ steps.cmake-preset.outputs.preset }} qt-version: ${{ steps.setup-dependencies.outputs.qt-version }} gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 47fa17f3d..3fdcc68ba 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -78,8 +78,8 @@ jobs: - name: Configure and Build run: | - cmake --preset linux_debug - cmake --build --preset linux_debug + cmake --preset linux + cmake --build --preset linux --config Debug - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 diff --git a/cmake/commonPresets.json b/cmake/commonPresets.json index 9be0fb447..1db67ccab 100644 --- a/cmake/commonPresets.json +++ b/cmake/commonPresets.json @@ -7,41 +7,13 @@ "hidden": true, "binaryDir": "build", "installDir": "install", + "generator": "Ninja Multi-Config", "cacheVariables": { "Launcher_BUILD_ARTIFACT": "$penv{ARTIFACT_NAME}", - "Launcher_BUILD_PLATFORM": "$penv{BUILD_PLATFORM}" - } - }, - { - "name": "base_debug", - "hidden": true, - "inherits": [ - "base" - ], - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" - } - }, - { - "name": "base_release", - "hidden": true, - "inherits": [ - "base" - ], - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", + "Launcher_BUILD_PLATFORM": "$penv{BUILD_PLATFORM}", + "Launcher_ENABLE_JAVA_DOWNLOADER": "ON", "ENABLE_LTO": "ON" } - }, - { - "name": "base_ci", - "hidden": true, - "inherits": [ - "base_release" - ], - "cacheVariables": { - "Launcher_FORCE_BUNDLED_LIBS": "ON" - } } ], "testPresets": [ @@ -59,23 +31,6 @@ "name": "^example64|example$" } } - }, - { - "name": "base_debug", - "hidden": true, - "inherits": [ - "base" - ], - "output": { - "debug": true - } - }, - { - "name": "base_release", - "hidden": true, - "inherits": [ - "base" - ] } ] } diff --git a/cmake/linuxPreset.json b/cmake/linuxPreset.json index 984defa5d..fb5ccf23b 100644 --- a/cmake/linuxPreset.json +++ b/cmake/linuxPreset.json @@ -6,171 +6,43 @@ ], "configurePresets": [ { - "name": "linux_base", - "hidden": true, + "name": "linux", + "displayName": "Linux", + "inherits": [ + "base" + ], + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + } + } + ], + "buildPresets": [ + { + "name": "linux", + "displayName": "Linux", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" }, - "generator": "Ninja", - "cacheVariables": { - "Launcher_ENABLE_JAVA_DOWNLOADER": "ON" - } - }, - { - "name": "linux_debug", - "inherits": [ - "base_debug", - "linux_base" - ], - "displayName": "Linux (Debug)" - }, - { - "name": "linux_release", - "inherits": [ - "base_release", - "linux_base" - ], - "displayName": "Linux (Release)" - }, - { - "name": "linux_ci", - "inherits": [ - "base_ci", - "linux_base" - ], - "displayName": "Linux (CI)", - "installDir": "/usr" - } - ], - "buildPresets": [ - { - "name": "linux_base", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - } - }, - { - "name": "linux_debug", - "inherits": [ - "linux_base" - ], - "displayName": "Linux (Debug)", - "configurePreset": "linux_debug" - }, - { - "name": "linux_release", - "inherits": [ - "linux_base" - ], - "displayName": "Linux (Release)", - "configurePreset": "linux_release" - }, - { - "name": "linux_ci", - "inherits": [ - "linux_base" - ], - "displayName": "Linux (CI)", - "configurePreset": "linux_ci" + "configurePreset": "linux" } ], "testPresets": [ - { - "name": "linux_base", - "hidden": true, + { + "name": "linux", + "displayName": "Linux", + "inherits": [ + "base" + ], "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" - } - }, - { - "name": "linux_debug", - "inherits": [ - "base_debug", - "linux_base" - ], - "displayName": "Linux (Debug)", - "configurePreset": "linux_debug" - }, - { - "name": "linux_release", - "inherits": [ - "base_release", - "linux_base" - ], - "displayName": "Linux (Release)", - "configurePreset": "linux_release" - }, - { - "name": "linux_ci", - "inherits": [ - "base_release", - "linux_base" - ], - "displayName": "Linux (CI)", - "configurePreset": "linux_ci" - } - ], - "workflowPresets": [ - { - "name": "linux_debug", - "displayName": "Linux (Debug)", - "steps": [ - { - "type": "configure", - "name": "linux_debug" - }, - { - "type": "build", - "name": "linux_debug" - }, - { - "type": "test", - "name": "linux_debug" - } - ] - }, - { - "name": "linux", - "displayName": "Linux (Release)", - "steps": [ - { - "type": "configure", - "name": "linux_release" - }, - { - "type": "build", - "name": "linux_release" - }, - { - "type": "test", - "name": "linux_release" - } - ] - }, - { - "name": "linux_ci", - "displayName": "Linux (CI)", - "steps": [ - { - "type": "configure", - "name": "linux_ci" - }, - { - "type": "build", - "name": "linux_ci" - }, - { - "type": "test", - "name": "linux_ci" - } - ] + }, + "configurePreset": "linux" } ] } diff --git a/cmake/macosPreset.json b/cmake/macosPreset.json index 9098f9a9a..1795db6e6 100644 --- a/cmake/macosPreset.json +++ b/cmake/macosPreset.json @@ -6,264 +6,75 @@ ], "configurePresets": [ { - "name": "macos_base", - "hidden": true, + "name": "macos", + "displayName": "macOS", + "inherits": [ + "base" + ], "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" - }, - "generator": "Ninja" + } }, { - "name": "macos_universal_base", - "hidden": true, + "name": "macos_universal", + "displayName": "macOS (Universal Binary)", "inherits": [ - "macos_base" + "macos" ], "cacheVariables": { "CMAKE_OSX_ARCHITECTURES": "x86_64;arm64", "VCPKG_TARGET_TRIPLET": "universal-osx" } - }, - { - "name": "macos_debug", - "inherits": [ - "base_debug", - "macos_base" - ], - "displayName": "macOS (Debug)" - }, - { - "name": "macos_release", - "inherits": [ - "base_release", - "macos_base" - ], - "displayName": "macOS (Release)" - }, - { - "name": "macos_universal_debug", - "inherits": [ - "base_debug", - "macos_universal_base" - ], - "displayName": "macOS (Universal Binary, Debug)" - }, - { - "name": "macos_universal_release", - "inherits": [ - "base_release", - "macos_universal_base" - ], - "displayName": "macOS (Universal Binary, Release)" - }, - { - "name": "macos_ci", - "inherits": [ - "base_ci", - "macos_universal_base" - ], - "displayName": "macOS (CI)" } ], "buildPresets": [ - { - "name": "macos_base", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - } - }, - { - "name": "macos_debug", - "inherits": [ - "macos_base" - ], - "displayName": "macOS (Debug)", - "configurePreset": "macos_debug" - }, - { - "name": "macos_release", - "inherits": [ - "macos_base" - ], - "displayName": "macOS (Release)", - "configurePreset": "macos_release" - }, - { - "name": "macos_universal_debug", - "inherits": [ - "macos_base" - ], - "displayName": "macOS (Universal Binary, Debug)", - "configurePreset": "macos_universal_debug" - }, - { - "name": "macos_universal_release", - "inherits": [ - "macos_base" - ], - "displayName": "macOS (Universal Binary, Release)", - "configurePreset": "macos_universal_release" - }, - { - "name": "macos_ci", - "inherits": [ - "macos_base" - ], - "displayName": "macOS (CI)", - "configurePreset": "macos_ci" - } - ], - "testPresets": [ - { - "name": "macos_base", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - } - }, - { - "name": "macos_debug", - "inherits": [ - "base_debug", - "macos_base" - ], - "displayName": "MacOS (Debug)", - "configurePreset": "macos_debug" - }, - { - "name": "macos_release", - "inherits": [ - "base_release", - "macos_base" - ], - "displayName": "macOS (Release)", - "configurePreset": "macos_release" - }, - { - "name": "macos_universal_debug", - "inherits": [ - "base_debug", - "macos_base" - ], - "displayName": "MacOS (Universal Binary, Debug)", - "configurePreset": "macos_universal_debug" - }, - { - "name": "macos_universal_release", - "inherits": [ - "base_release", - "macos_base" - ], - "displayName": "macOS (Universal Binary, Release)", - "configurePreset": "macos_universal_release" - }, - { - "name": "macos_ci", - "inherits": [ - "base_release", - "macos_base" - ], - "displayName": "macOS (CI)", - "configurePreset": "macos_ci" - } - ], - "workflowPresets": [ - { - "name": "macos_debug", - "displayName": "macOS (Debug)", - "steps": [ - { - "type": "configure", - "name": "macos_debug" - }, - { - "type": "build", - "name": "macos_debug" - }, - { - "type": "test", - "name": "macos_debug" - } - ] - }, { "name": "macos", - "displayName": "macOS (Release)", - "steps": [ - { - "type": "configure", - "name": "macos_release" - }, - { - "type": "build", - "name": "macos_release" - }, - { - "type": "test", - "name": "macos_release" - } - ] - }, - { - "name": "macos_universal_debug", - "displayName": "macOS (Universal Binary, Debug)", - "steps": [ - { - "type": "configure", - "name": "macos_universal_debug" - }, - { - "type": "build", - "name": "macos_universal_debug" - }, - { - "type": "test", - "name": "macos_universal_debug" - } - ] + "displayName": "macOS", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "configurePreset": "macos" }, { "name": "macos_universal", - "displayName": "macOS (Universal Binary, Release)", - "steps": [ - { - "type": "configure", - "name": "macos_universal_release" - }, - { - "type": "build", - "name": "macos_universal_release" - }, - { - "type": "test", - "name": "macos_universal_release" - } - ] + "displayName": "macOS (Universal Binary)", + "inherits": [ + "macos" + ], + "configurePreset": "macos_universal" + } + ], + "testPresets": [ + { + "name": "macos", + "displayName": "macOS", + "inherits": [ + "base" + ], + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "configurePreset": "macos" }, - { - "name": "macos_ci", - "displayName": "macOS (CI)", - "steps": [ - { - "type": "configure", - "name": "macos_ci" - }, - { - "type": "build", - "name": "macos_ci" - }, - { - "type": "test", - "name": "macos_ci" - } - ] + { + "name": "macos_universal", + "displayName": "macOS (Universal Binary)", + "inherits": [ + "base" + ], + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "configurePreset": "macos_universal" } ] } diff --git a/cmake/windowsMSVCPreset.json b/cmake/windowsMSVCPreset.json index 2cb996b81..844248dc8 100644 --- a/cmake/windowsMSVCPreset.json +++ b/cmake/windowsMSVCPreset.json @@ -6,276 +6,43 @@ ], "configurePresets": [ { - "name": "windows_msvc_base", - "hidden": true, + "name": "windows_msvc", + "displayName": "Windows (MSVC)", + "inherits": [ + "base" + ], + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + } + ], + "buildPresets": [ + { + "name": "windows_msvc", + "displayName": "Windows (MSVC)", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" }, - "generator": "Ninja" - }, - { - "name": "windows_msvc_arm64_cross_base", - "hidden": true, - "inherits": [ - "windows_msvc_base" - ], - "cacheVariables": { - "CMAKE_SYSTEM_NAME": "${hostSystemName}" - } - }, - { - "name": "windows_msvc_debug", - "inherits": [ - "base_debug", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Debug)" - }, - { - "name": "windows_msvc_release", - "inherits": [ - "base_release", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Release)" - }, - { - "name": "windows_msvc_arm64_cross_debug", - "inherits": [ - "base_debug", - "windows_msvc_arm64_cross_base" - ], - "displayName": "Windows MSVC (ARM64 cross, Debug)" - }, - { - "name": "windows_msvc_arm64_cross_release", - "inherits": [ - "base_release", - "windows_msvc_arm64_cross_base" - ], - "displayName": "Windows MSVC (ARM64 cross, Release)" - }, - { - "name": "windows_msvc_ci", - "inherits": [ - "base_ci", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (CI)" - }, - { - "name": "windows_msvc_arm64_cross_ci", - "inherits": [ - "base_ci", - "windows_msvc_arm64_cross_base" - ], - "displayName": "Windows MSVC (ARM64 cross, CI)" - } - ], - "buildPresets": [ - { - "name": "windows_msvc_base", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "windows_msvc_debug", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Debug)", - "configurePreset": "windows_msvc_debug", - "configuration": "Debug" - }, - { - "name": "windows_msvc_release", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Release)", - "configurePreset": "windows_msvc_release", - "configuration": "Release" - }, - { - "name": "windows_msvc_arm64_cross_debug", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (ARM64 cross, Debug)", - "configurePreset": "windows_msvc_arm64_cross_debug", - "configuration": "Debug" - }, - { - "name": "windows_msvc_arm64_cross_release", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (ARM64 cross, Release)", - "configurePreset": "windows_msvc_arm64_cross_release", - "configuration": "Release" - }, - { - "name": "windows_msvc_ci", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (CI)", - "configurePreset": "windows_msvc_ci", - "configuration": "Release" - }, - { - "name": "windows_msvc_arm64_cross_ci", - "inherits": [ - "windows_msvc_base" - ], - "displayName": "Windows MSVC (ARM64 cross, CI)", - "configurePreset": "windows_msvc_arm64_cross_ci", - "configuration": "Release" + "configurePreset": "windows_msvc" } ], "testPresets": [ - { - "name": "windows_msvc_base", - "hidden": true, + { + "name": "windows_msvc", + "displayName": "Windows (MSVC)", + "inherits": [ + "base" + ], "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" - } - }, - { - "name": "windows_msvc_debug", - "inherits": [ - "base_debug", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Debug)", - "configurePreset": "windows_msvc_debug", - "configuration": "Debug" - }, - { - "name": "windows_msvc_release", - "inherits": [ - "base_release", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (Release)", - "configurePreset": "windows_msvc_release", - "configuration": "Release" - }, - { - "name": "windows_msvc_ci", - "inherits": [ - "base_release", - "windows_msvc_base" - ], - "displayName": "Windows MSVC (CI)", - "configurePreset": "windows_msvc_ci", - "configuration": "Release" - } - ], - "workflowPresets": [ - { - "name": "windows_msvc_debug", - "displayName": "Windows MSVC (Debug)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_debug" - }, - { - "type": "build", - "name": "windows_msvc_debug" - }, - { - "type": "test", - "name": "windows_msvc_debug" - } - ] - }, - { - "name": "windows_msvc", - "displayName": "Windows MSVC (Release)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_release" - }, - { - "type": "build", - "name": "windows_msvc_release" - }, - { - "type": "test", - "name": "windows_msvc_release" - } - ] - }, - { - "name": "windows_msvc_arm64_cross_debug", - "displayName": "Windows MSVC (ARM64 cross, Debug)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_arm64_cross_debug" - }, - { - "type": "build", - "name": "windows_msvc_arm64_cross_debug" - } - ] - }, - { - "name": "windows_msvc_arm64_cross", - "displayName": "Windows MSVC (ARM64 cross, Release)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_arm64_cross_release" - }, - { - "type": "build", - "name": "windows_msvc_arm64_cross_release" - } - ] - }, - { - "name": "windows_msvc_ci", - "displayName": "Windows MSVC (CI)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_ci" - }, - { - "type": "build", - "name": "windows_msvc_ci" - }, - { - "type": "test", - "name": "windows_msvc_ci" - } - ] - }, - { - "name": "windows_msvc_arm64_cross_ci", - "displayName": "Windows MSVC (ARM64 cross, CI)", - "steps": [ - { - "type": "configure", - "name": "windows_msvc_arm64_cross_ci" - }, - { - "type": "build", - "name": "windows_msvc_arm64_cross_ci" - } - ] + }, + "configurePreset": "windows_msvc" } ] } diff --git a/cmake/windowsMinGWPreset.json b/cmake/windowsMinGWPreset.json index 7c4adbcf2..ef1b46559 100644 --- a/cmake/windowsMinGWPreset.json +++ b/cmake/windowsMinGWPreset.json @@ -6,172 +6,43 @@ ], "configurePresets": [ { - "name": "windows_mingw_base", - "hidden": true, + "name": "windows_mingw", + "displayName": "Windows (MinGW)", + "inherits": [ + "base" + ], "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" - }, - "generator": "Ninja" - }, - { - "name": "windows_mingw_debug", - "inherits": [ - "base_debug", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Debug)" - }, - { - "name": "windows_mingw_release", - "inherits": [ - "base_release", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Release)" - }, - { - "name": "windows_mingw_ci", - "inherits": [ - "base_ci", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (CI)" + } } ], "buildPresets": [ { - "name": "windows_mingw_base", - "hidden": true, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "windows_mingw_debug", - "inherits": [ - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Debug)", - "configurePreset": "windows_mingw_debug" - }, - { - "name": "windows_mingw_release", - "inherits": [ - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Release)", - "configurePreset": "windows_mingw_release" - }, - { - "name": "windows_mingw_ci", - "inherits": [ - "windows_mingw_base" - ], - "displayName": "Windows MinGW (CI)", - "configurePreset": "windows_mingw_ci" - } - ], - "testPresets": [ - { - "name": "windows_mingw_base", - "hidden": true, + "name": "windows_mingw", + "displayName": "Windows (MinGW)", "condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" }, - "filter": { - "exclude": { - "name": "^example64|example$" - } - } - }, - { - "name": "windows_mingw_debug", - "inherits": [ - "base_debug", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Debug)", - "configurePreset": "windows_mingw_debug" - }, - { - "name": "windows_mingw_release", - "inherits": [ - "base_release", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (Release)", - "configurePreset": "windows_mingw_release" - }, - { - "name": "windows_mingw_ci", - "inherits": [ - "base_release", - "windows_mingw_base" - ], - "displayName": "Windows MinGW (CI)", - "configurePreset": "windows_mingw_ci" + "configurePreset": "windows_mingw" } ], - "workflowPresets": [ - { - "name": "windows_mingw_debug", - "displayName": "Windows MinGW (Debug)", - "steps": [ - { - "type": "configure", - "name": "windows_mingw_debug" - }, - { - "type": "build", - "name": "windows_mingw_debug" - }, - { - "type": "test", - "name": "windows_mingw_debug" - } - ] - }, - { - "name": "windows_mingw", - "displayName": "Windows MinGW (Release)", - "steps": [ - { - "type": "configure", - "name": "windows_mingw_release" - }, - { - "type": "build", - "name": "windows_mingw_release" - }, - { - "type": "test", - "name": "windows_mingw_release" - } - ] - }, - { - "name": "windows_mingw_ci", - "displayName": "Windows MinGW (CI)", - "steps": [ - { - "type": "configure", - "name": "windows_mingw_ci" - }, - { - "type": "build", - "name": "windows_mingw_ci" - }, - { - "type": "test", - "name": "windows_mingw_ci" - } - ] + "testPresets": [ + { + "name": "windows_mingw", + "displayName": "Windows (MinGW)", + "inherits": [ + "base" + ], + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "configurePreset": "windows_mingw" } ] }