Files
wxWidgets/.github/workflows/ci_msw.yml
Vadim Zeitlin 55fd008650
Some checks failed
No Response / no-response (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 compatible 3.0 (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK ASAN not compatible (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK UBSAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
CMake builds / MSW/MSVC wxMSW (push) Has been cancelled
CMake builds / MSW/Clang wxMSW (push) Has been cancelled
CMake builds / macOS latest wxOSX Ninja (push) Has been cancelled
CMake builds / macOS 14 wxOSX Xcode (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 5.15 (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 6.8 (push) Has been cancelled
Mac builds / wxMac ARM ASAN not compatible (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW builds / wxMSW vs2022 Release arm64 (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits not compatible (push) Has been cancelled
MSW cross-builds / wxMSW/Univ (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Code Checks / Check All Headers In allheaders.h (push) Has been cancelled
Restore CI jobs with wxUSE_STD_STRING_CONV_IN_WXSTRING=1
After the changes 35c35c235e (Remove wxUSE_STL which is not really used
any longer, 2023-04-15) there were no more CI builds using wxString
without implicit conversion to "char*", so errors like the one fixed in
the parent commit were not detected any more.

Add builds using wxUSE_STD_STRING_CONV_IN_WXSTRING=1 which disables
conversions to "char*" in wxString to ensure this doesn't happen again.
2025-07-28 16:19:47 +02:00

154 lines
5.0 KiB
YAML

# CI workflow building wxMSW under Windows.
name: MSW builds
on:
push:
branches:
- master
paths-ignore:
- '.circleci/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/workflows/ci.yml'
- '.github/workflows/ci_cmake.yml'
- '.github/workflows/ci_mac.yml'
- '.github/workflows/ci_msw_cross.yml'
- '.github/workflows/docs_update.yml'
- 'build/tools/appveyor*.bat'
- 'distrib/**'
- 'docs/**'
- 'interface/**'
- 'include/wx/gtk/**'
- 'include/wx/osx/**'
- 'locale/**'
- 'src/gtk/**'
- 'src/osx/**'
- '*.md'
- '*.yml'
pull_request:
branches:
- master
paths-ignore:
- '.circleci/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/workflows/ci.yml'
- '.github/workflows/ci_cmake.yml'
- '.github/workflows/ci_mac.yml'
- '.github/workflows/ci_msw_cross.yml'
- '.github/workflows/docs_update.yml'
- 'build/tools/appveyor*.bat'
- 'distrib/**'
- 'docs/**'
- 'interface/**'
- 'include/wx/gtk/**'
- 'include/wx/osx/**'
- 'locale/**'
- 'src/gtk/**'
- 'src/osx/**'
- '*.md'
- '*.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
msw-msvs:
runs-on: windows-2022
name: wxMSW vs2022 ${{ matrix.configuration }} ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- configuration: 'DLL Debug'
platform: 'x64'
use_utf8: true
- configuration: 'Release'
platform: 'arm64'
- configuration: 'Debug'
platform: 'Win32'
use_cxx20: true
- configuration: 'DLL Release'
use_std_string: true
platform: 'x64'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure build options
working-directory: include/wx/msw
run: |
$use_std_string = "${{ matrix.use_std_string }}" ? 1 : 0
$use_utf8 = "${{ matrix.use_utf8 }}" ? 1 : 0
if ( $use_std_string -or $use_utf8 ) {
$txt = Get-Content setup.h
Write-Output $txt |
%{$_ -replace "define wxUSE_STD_STRING_CONV_IN_WXSTRING 0", "define wxUSE_STD_STRING_CONV_IN_WXSTRING $use_std_string"} |
%{$_ -replace "define wxUSE_UNICODE_UTF8 0", "define wxUSE_UNICODE_UTF8 $use_utf8"} |
Set-Content setup.h
}
$use_cxx20 = "${{ matrix.use_cxx20 }}" ? 1 : 0
if ( $use_cxx20 ) {
cd ..\..\..\build\msw
cp cxx20.props wx_local.props
}
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-prerelease: true
- name: Build
run: |
msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} build\msw\wx_vc17.sln
if ( '${{ matrix.configuration }}'.IndexOf('DLL') -ne -1 ) {
$dlldir = Join-Path (Get-Location) 'lib\vc_${{ matrix.platform }}_dll'
Write-Output "Adding $dlldir to the PATH"
$dlldir | Out-File -Append $env:GITHUB_PATH
}
- name: Build samples
if: matrix.platform != 'arm64'
run: |
msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} samples\samples_vc17.sln
- name: Build tests
run: |
msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_vc17.sln
- name: Run tests
if: ${{ !contains(matrix.platform, 'arm64') }}
working-directory: tests
run: |
go install github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@v2
$gopath = $(go env GOPATH)
$env:PATH += ";$gopath\bin"
Start-Job -Name wx_httpbin { go-httpbin -host 127.0.0.1 -port 8081 2>&1 > httpbin.log }
Start-Sleep -Seconds 5
curl.exe --silent --show-error http://127.0.0.1:8081/ip > $null
if ($lastExitCode -eq "0") {
$env:WX_TEST_WEBREQUEST_URL="http://127.0.0.1:8081"
}
else {
Write-Error "Disabling wxWebRequest tests as launching httpbin failed, log follows:"
Get-Content httpbin.log
$env:WX_TEST_WEBREQUEST_URL="0"
}
.\vc*msw*\test.exe
- name: Build GUI tests
run: |
msbuild /noLogo /m /warnaserror '/p:Configuration=${{ matrix.configuration }}' /p:Platform=${{ matrix.platform }} tests\test_gui_vc17.sln
- name: Run GUI tests
if: ${{ !contains(matrix.platform, 'arm64') }}
working-directory: tests
run: |
.\vc*msw*\test_gui.exe