From acf92f42990775f4fffe673b920236bcd35bcc0b Mon Sep 17 00:00:00 2001 From: Maciej Szeptuch <765629+Neverous@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:33:04 +0100 Subject: [PATCH] ci: try building x86 on windows (#376) --- .github/workflows/asset.yml | 3 +++ .github/workflows/build.yml | 14 +++++++++----- .github/workflows/debug.yml | 3 +++ .github/workflows/release.yml | 10 ++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/asset.yml b/.github/workflows/asset.yml index 3a1a1ad..bb71d9b 100644 --- a/.github/workflows/asset.yml +++ b/.github/workflows/asset.yml @@ -28,6 +28,9 @@ jobs: - 5.15.2 # Supported in Ubuntu Noble Numbat until 2029-04-25 - 6.2.4 # Supported in Ubuntu Jammy Jellyfish until 2027-04-01 - 6.8.1 # Supported until 2025-04-08 + exclude: + - qt-version: ${{ inputs.compiler == 'MSVC32' && '6.2.4' || 'none' }} + - qt-version: ${{ inputs.compiler == 'MSVC32' && '6.8.1' || 'none' }} steps: - name: Download artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ab85be..61b2257 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,9 @@ jobs: - 5.15.2 # Supported in Ubuntu Noble Numbat until 2029-04-25 - 6.2.4 # Supported in Ubuntu Jammy Jellyfish until 2027-04-01 - 6.8.1 # Supported until 2025-04-08 + exclude: + - qt-version: ${{ inputs.compiler == 'MSVC32' && '6.2.4' || 'none' }} + - qt-version: ${{ inputs.compiler == 'MSVC32' && '6.8.1' || 'none' }} steps: - name: Checkout source code uses: actions/checkout@v4 @@ -55,6 +58,7 @@ jobs: with: cache: true version: ${{ matrix.qt-version }} + arch: ${{ inputs.compiler == 'MSVC32' && (matrix.qt-version == '5.12.12' && 'win32_msvc2017' || 'win32_msvc2019') || '' }} - name: Install libfuse2 run: sudo apt-get install libfuse2 @@ -78,7 +82,7 @@ jobs: if: startsWith(inputs.os, 'ubuntu') - name: Install zlib - run: vcpkg install zlib + run: ${{ inputs.compiler == 'MSVC32' && 'VCPKG_DEFAULT_TRIPLET=x86-windows' || '' }} vcpkg install zlib shell: bash if: startsWith(inputs.os, 'windows') @@ -108,8 +112,8 @@ jobs: - name: Configure build with ${{ inputs.compiler }} run: | - call "${{ endsWith(inputs.os, '2019') && '%programfiles(x86)%\Microsoft Visual Studio\2019' || '%programfiles%\Microsoft Visual Studio\2022' }}\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 || exit /b - cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ inputs.build-config }} ${{ endsWith(inputs.os, '2019') && '-DCMAKE_SYSTEM_VERSION=10.0.18362.0' || ''}} -DCMAKE_VERBOSE_MAKEFILE=ON ${{ inputs.compiler == 'Clang' && '-T ClangCL' || '' }} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. || exit /b + call "${{ endsWith(inputs.os, '2019') && '%programfiles(x86)%\Microsoft Visual Studio\2019' || '%programfiles%\Microsoft Visual Studio\2022' }}\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ inputs.compiler == 'MSVC32' && 'x86' || 'x64' }} || exit /b + cmake ${{ inputs.compiler == 'MSVC32' && '-A Win32' || '' }} -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ inputs.build-config }} ${{ endsWith(inputs.os, '2019') && '-DCMAKE_SYSTEM_VERSION=10.0.18362.0' || '' }} -DCMAKE_VERBOSE_MAKEFILE=ON ${{ inputs.compiler == 'Clang' && '-T ClangCL' || '' }} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. || exit /b shell: cmd env: BUILD_VERSION: ${{ inputs.version }} @@ -151,12 +155,12 @@ jobs: cmakeBuildDirectory: ${{ github.workspace }}/build buildConfiguration: ${{ inputs.build-config }} ruleset: NativeRecommendedRules.ruleset - if: inputs.build-config == 'Debug' && inputs.compiler == 'MSVC' + if: inputs.build-config == 'Debug' && startsWith(inputs.compiler, 'MSVC') continue-on-error: true - name: Upload MSVC Code Analysis results to GitHub uses: github/codeql-action/upload-sarif@v3 with: sarif_file: ${{ steps.msvc-analysis.outputs.sarif }} - if: inputs.build-config == 'Debug' && inputs.compiler == 'MSVC' + if: inputs.build-config == 'Debug' && startsWith(inputs.compiler, 'MSVC') continue-on-error: true diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 6c5090c..1e1c44c 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -64,6 +64,9 @@ jobs: compiler: - Clang - MSVC + include: + - os: windows-2019 + compiler: MSVC32 permissions: actions: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2835700..f4b848c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,9 @@ jobs: compiler: - Clang - MSVC + include: + - os: windows-2019 + compiler: MSVC32 permissions: actions: read @@ -125,6 +128,13 @@ jobs: extension: - .zip - .msi + include: + - os: windows-2019 + compiler: MSVC32 + extension: .zip + - os: windows-2019 + compiler: MSVC32 + extension: .msi permissions: contents: write