Merge branch 'ci-utf8'

Fix UTF-8 build under MSW and improve its coverage in the CI jobs.

See #23313.

Closes #23328.
This commit is contained in:
Vadim Zeitlin 2023-03-30 19:44:37 +02:00
commit dee816bb5b
28 changed files with 887 additions and 544 deletions

View file

@ -108,10 +108,11 @@ jobs:
skip_samples: true
use_asan: true
use_xvfb: true
- name: Ubuntu 22.04 wxGTK C++20
- name: Ubuntu 22.04 wxGTK UTF-8 C++20
runner: ubuntu-22.04
configure_flags: --with-cxx=20
skip_samples: true
configure_flags: --with-cxx=20 --enable-utf8 --enable-utf8only
use_asan: true
use_xvfb: true
- name: Ubuntu 18.04 wxX11
runner: ubuntu-latest
container: ubuntu:18.04

View file

@ -67,6 +67,7 @@ jobs:
- configuration: 'DLL Debug'
platform: 'x64'
vsversion: 2022
use_utf8: true
- configuration: 'Debug'
platform: 'Win32'
vsversion: 2019
@ -81,14 +82,18 @@ jobs:
with:
submodules: 'recursive'
- name: Configure to use STL
if: matrix.use_stl
- name: Configure build options
working-directory: include/wx/msw
run: |
$txt = Get-Content setup.h
Write-Output $txt |
%{$_ -replace "define wxUSE_STL 0", "define wxUSE_STL 1"} |
Set-Content setup.h
$use_stl = "${{ matrix.use_stl }}" ? 1 : 0
$use_utf8 = "${{ matrix.use_utf8 }}" ? 1 : 0
if ( $use_stl -or $use_utf8 ) {
$txt = Get-Content setup.h
Write-Output $txt |
%{$_ -replace "define wxUSE_STL 0", "define wxUSE_STL $use_stl"} |
%{$_ -replace "define wxUSE_UNICODE_UTF8 0", "define wxUSE_UNICODE_UTF8 $use_utf8"} |
Set-Content setup.h
}
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1.3