Skip to content

Commit de6ca88

Browse files
authored
Remove old Windows 7 support code (#1348)
1 parent 9b453cf commit de6ca88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+17
-4898
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 295 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
compiler: [MSVC, clang-cl]
9898
arch: [x86, x64, arm64]
9999
config: [Debug, Release]
100-
test_exe: [test, test_cpp20, test_cpp20_no_sourcelocation, test_win7, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none]
100+
test_exe: [test, test_cpp20, test_cpp20_no_sourcelocation, test_fast, test_slow, test_old, test_module_lock_custom, test_module_lock_none]
101101
exclude:
102102
- arch: arm64
103103
config: Debug
@@ -250,120 +250,6 @@ jobs:
250250
_build/${{ matrix.arch }}/${{ matrix.config }}/*.lib
251251
_build/${{ matrix.arch }}/${{ matrix.config }}/*.pdb
252252
253-
test-llvm-mingw-cppwinrt:
254-
name: 'llvm-mingw: Build and test'
255-
strategy:
256-
fail-fast: false
257-
matrix:
258-
arch: [i686, x86_64]
259-
config: [Debug, Release]
260-
runs-on: windows-latest
261-
env:
262-
CMAKE_COLOR_DIAGNOSTICS: 1
263-
CLICOLOR_FORCE: 1
264-
steps:
265-
- uses: actions/checkout@v3
266-
267-
- id: setup-llvm
268-
name: Set up llvm-mingw
269-
uses: ./.github/actions/setup-llvm-mingw
270-
with:
271-
host-arch: ${{ matrix.arch }}
272-
273-
- name: Build cppwinrt
274-
run: |
275-
mkdir build
276-
cd build
277-
if ("${{ matrix.config }}" -eq "Debug") {
278-
$sanitizers = "TRUE"
279-
} else {
280-
$sanitizers = "FALSE"
281-
}
282-
cmake ../ -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.config }} `
283-
-DDOWNLOAD_WINDOWSNUMERICS=TRUE `
284-
-DUSE_ANSI_COLOR=TRUE `
285-
-DCMAKE_CXX_FLAGS="-fansi-escape-codes" `
286-
-DENABLE_TEST_SANITIZERS=$sanitizers
287-
cmake --build . -j2 --target cppwinrt
288-
289-
- name: Upload cppwinrt.exe
290-
uses: actions/upload-artifact@v3
291-
with:
292-
name: llvm-mingw-build-${{ matrix.arch }}-bin
293-
path: build/cppwinrt.exe
294-
295-
- name: Build tests
296-
run: |
297-
cd build
298-
cmake --build . -j2 --target test-vanilla test_cpp20 test_cpp20_no_sourcelocation test_win7 test_old
299-
300-
- name: Upload test binaries
301-
uses: actions/upload-artifact@v3
302-
with:
303-
name: llvm-mingw-tests-${{ matrix.arch }}-bin
304-
path: build/test/*.exe
305-
306-
- name: Run tests
307-
run: |
308-
cd build
309-
$env:UBSAN_OPTIONS = "print_stacktrace=1"
310-
ctest --verbose
311-
312-
test-msys2-gcc-cppwinrt:
313-
name: 'gcc/msys2: Build and test (${{ matrix.sys }}, ${{ matrix.config }})'
314-
strategy:
315-
fail-fast: false
316-
matrix:
317-
include:
318-
# 32-bit builds are running out of memory
319-
# - { sys: mingw32, arch: i686, config: Release }
320-
- { sys: mingw64, arch: x86_64, config: Debug }
321-
- { sys: mingw64, arch: x86_64, config: Release }
322-
- { sys: ucrt64, arch: x86_64, config: Release }
323-
runs-on: windows-latest
324-
env:
325-
CMAKE_COLOR_DIAGNOSTICS: 1
326-
CLICOLOR_FORCE: 1
327-
defaults:
328-
run:
329-
shell: msys2 {0}
330-
steps:
331-
- uses: msys2/setup-msys2@v2
332-
with:
333-
msystem: ${{matrix.sys}}
334-
update: true
335-
pacboy: >-
336-
crt:p
337-
gcc:p
338-
binutils:p
339-
cmake:p
340-
ninja:p
341-
342-
- uses: actions/checkout@v3
343-
344-
- name: Build cppwinrt
345-
run: |
346-
mkdir build
347-
cd build
348-
if [[ "${{ matrix.arch }}" = "i686" ]]; then
349-
skip_large_pch_arg="-DSKIP_LARGE_PCH=TRUE"
350-
fi
351-
cmake ../ -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
352-
-DDOWNLOAD_WINDOWSNUMERICS=TRUE \
353-
-DUSE_ANSI_COLOR=TRUE \
354-
$skip_large_pch_arg
355-
cmake --build . --target cppwinrt
356-
357-
- name: Build tests
358-
run: |
359-
cd build
360-
cmake --build . -j2 --target test-vanilla test_cpp20 test_cpp20_no_sourcelocation test_win7 test_old
361-
362-
- name: Run tests
363-
run: |
364-
cd build
365-
ctest --verbose
366-
367253
build-linux-cross-cppwinrt:
368254
name: 'cross: Cross-build from Linux'
369255
strategy:
@@ -398,186 +284,6 @@ jobs:
398284
name: cross-build-${{ matrix.arch }}-bin
399285
path: install/bin/cppwinrt.exe
400286

401-
test-linux-cross-cppwinrt:
402-
name: 'cross: Test run on Windows'
403-
needs: build-linux-cross-cppwinrt
404-
strategy:
405-
fail-fast: false
406-
matrix:
407-
arch: [i686, x86_64]
408-
runs-on: windows-latest
409-
steps:
410-
- uses: actions/checkout@v3
411-
412-
- name: Fetch cppwinrt executable
413-
uses: actions/download-artifact@v3
414-
with:
415-
name: cross-build-${{ matrix.arch }}-bin
416-
path: ./.test
417-
418-
- name: Run cppwinrt to build projection
419-
run: |
420-
.\.test\cppwinrt.exe -in local -out .\.test\out -verbose
421-
422-
- id: setup-llvm
423-
name: Set up llvm-mingw
424-
uses: ./.github/actions/setup-llvm-mingw
425-
with:
426-
host-arch: ${{ matrix.arch }}
427-
428-
- name: Build cppwinrt tests
429-
run: |
430-
mkdir build
431-
cd build
432-
cmake ../test -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug `
433-
-DCPPWINRT_PROJECTION_INCLUDE_DIR="../.test/out" `
434-
-DDOWNLOAD_WINDOWSNUMERICS=TRUE `
435-
-DUSE_ANSI_COLOR=TRUE
436-
cmake --build . -j2
437-
438-
- name: Run tests
439-
run: |
440-
cd build
441-
ctest --verbose
442-
443-
build-linux-native-cppwinrt:
444-
name: 'linux: GCC native build + mingw-w64 cross-build tests'
445-
strategy:
446-
fail-fast: false
447-
matrix:
448-
# TODO: Enable gcc build once Arch Linux gets more recent mingw-w64 headers (ver. 11 perhaps?)
449-
# cross_toolchain: [gcc, llvm-mingw]
450-
cross_toolchain: [llvm-mingw]
451-
cross_arch: [i686, x86_64]
452-
# include:
453-
# - cross_toolchain: gcc
454-
# container:
455-
# image: archlinux:base-devel
456-
runs-on: ubuntu-22.04
457-
container: ${{ matrix.container }}
458-
defaults:
459-
run:
460-
shell: bash
461-
env:
462-
CMAKE_COLOR_DIAGNOSTICS: 1
463-
CLICOLOR_FORCE: 1
464-
steps:
465-
- uses: actions/checkout@v3
466-
467-
- name: Install build tools
468-
if: matrix.cross_toolchain == 'gcc'
469-
run: |
470-
pacman --noconfirm -Suuy
471-
pacman --needed --noconfirm -S cmake ninja git
472-
473-
- name: Build cppwinrt
474-
run: |
475-
cmake -S . -B build/native/ \
476-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
477-
-DCMAKE_INSTALL_PREFIX=$PWD/install/
478-
cmake --build build/native/ --target install -j2
479-
480-
- name: Test run (cppwinrt -?)
481-
run: |
482-
install/bin/cppwinrt -?
483-
484-
- name: Test run (build projection using Windows.winmd)
485-
run: |
486-
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/bindgen/default/Windows.winmd
487-
install/bin/cppwinrt -in Windows.winmd -out /tmp/cppwinrt -verbose
488-
489-
- id: setup-llvm
490-
name: Set up llvm-mingw
491-
if: matrix.cross_toolchain == 'llvm-mingw'
492-
uses: ./.github/actions/setup-llvm-mingw
493-
494-
- name: Install GCC cross compiler
495-
if: matrix.cross_toolchain == 'gcc'
496-
run: |
497-
pacman --needed --noconfirm -S mingw-w64-gcc
498-
499-
- name: Cross-build tests using projection
500-
run: |
501-
cmake -S test -B build/cross-tests --toolchain "$PWD/cross-mingw-toolchain.cmake" \
502-
-DCMAKE_SYSTEM_PROCESSOR=${{ matrix.cross_arch }} \
503-
-DCMAKE_BUILD_TYPE=Debug \
504-
-DCMAKE_CXX_FLAGS="-static" \
505-
-DCPPWINRT_PROJECTION_INCLUDE_DIR=/tmp/cppwinrt \
506-
-DDOWNLOAD_WINDOWSNUMERICS=TRUE \
507-
-DUSE_ANSI_COLOR=TRUE
508-
cmake --build build/cross-tests -j2
509-
510-
- name: Upload built tests
511-
uses: actions/upload-artifact@v3
512-
with:
513-
name: linux-native-cppwinrt-cross-build-tests-${{ matrix.cross_toolchain }}-${{ matrix.cross_arch }}-bin
514-
path: build/cross-tests/*.exe
515-
516-
test-linux-native-cppwinrt-cross-tests:
517-
name: 'linux: Run llvm-mingw cross-build tests'
518-
needs: build-linux-native-cppwinrt
519-
strategy:
520-
fail-fast: false
521-
matrix:
522-
# TODO: Enable gcc build test when it is buildable
523-
# cross_toolchain: [gcc, llvm-mingw]
524-
cross_toolchain: [llvm-mingw]
525-
cross_arch: [i686, x86_64]
526-
runs-on: windows-latest
527-
steps:
528-
- uses: actions/checkout@v3
529-
530-
- name: Fetch test executables
531-
uses: actions/download-artifact@v3
532-
with:
533-
name: linux-native-cppwinrt-cross-build-tests-${{ matrix.cross_toolchain }}-${{ matrix.cross_arch }}-bin
534-
path: ./
535-
536-
- name: Run tests
537-
run: |
538-
$test_exes = ls *.exe -Name
539-
$has_failed_tests = 0
540-
foreach ($test_exe in $test_exes) {
541-
echo "::group::Run '$test_exe'"
542-
& .\$test_exe --use-colour yes
543-
echo "::endgroup::"
544-
if ($LastExitCode -ne 0) {
545-
echo "::error::Test '$test_exe' failed!"
546-
$has_failed_tests = 1
547-
}
548-
}
549-
if ($has_failed_tests -ne 0) {
550-
exit 1
551-
}
552-
553-
build-macos-native-cppwinrt:
554-
name: 'macOS: GCC native build'
555-
runs-on: macos-latest
556-
defaults:
557-
run:
558-
shell: bash
559-
env:
560-
CMAKE_COLOR_DIAGNOSTICS: 1
561-
CLICOLOR_FORCE: 1
562-
steps:
563-
- uses: actions/checkout@v3
564-
565-
- name: Build cppwinrt
566-
run: |
567-
cmake -S . -B build/native/ \
568-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
569-
-DCMAKE_INSTALL_PREFIX=$PWD/install/
570-
cmake --build build/native/ --target install -j2
571-
572-
- name: Test run (cppwinrt -?)
573-
run: |
574-
install/bin/cppwinrt -?
575-
576-
- name: Test run (build projection using Windows.winmd)
577-
run: |
578-
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/bindgen/default/Windows.winmd
579-
install/bin/cppwinrt -in Windows.winmd -out build/out -verbose
580-
581287
build-msvc-natvis:
582288
name: 'Build natvis'
583289
strategy:

.pipelines/jobs/OneBranchTest.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ jobs:
2222
TestExe: 'test_cpp20_no_sourcelocation'
2323
TestProject: 'test_cpp20_no_sourcelocation'
2424
BuildPlatform: 'x86'
25-
test_win7.x86:
26-
TestExe: 'test_win7'
27-
TestProject: 'test_win7'
28-
BuildPlatform: 'x86'
2925
test_fast.x86:
3026
TestExe: 'test_fast'
3127
TestProject: 'test_fast'

build_test_all.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,
3232
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test
3333
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_cpp20
3434
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_cpp20_no_sourcelocation
35-
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_win7
3635
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_fast
3736
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_slow
3837
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:test\test_module_lock_custom

cppwinrt.sln

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_module_lock_custom", "
104104
EndProject
105105
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{3C7EA5F8-6E8C-4376-B499-2CAF596384B0}"
106106
EndProject
107-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_win7", "test\test_win7\test_win7.vcxproj", "{2EF696B9-7F4A-410F-AE5C-5301565C0F08}"
108-
ProjectSection(ProjectDependencies) = postProject
109-
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
110-
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
111-
{F1C915B3-2C64-4992-AFB7-7F035B1A7607} = {F1C915B3-2C64-4992-AFB7-7F035B1A7607}
112-
EndProjectSection
113-
EndProject
114107
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_cpp20", "test\test_cpp20\test_cpp20.vcxproj", "{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA}"
115108
ProjectSection(ProjectDependencies) = postProject
116109
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
@@ -452,22 +445,6 @@ Global
452445
{08C40663-B6A3-481E-8755-AE32BAD99501}.Release|x64.Build.0 = Release|x64
453446
{08C40663-B6A3-481E-8755-AE32BAD99501}.Release|x86.ActiveCfg = Release|Win32
454447
{08C40663-B6A3-481E-8755-AE32BAD99501}.Release|x86.Build.0 = Release|Win32
455-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|ARM.ActiveCfg = Debug|ARM
456-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|ARM.Build.0 = Debug|ARM
457-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|ARM64.ActiveCfg = Debug|ARM64
458-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|ARM64.Build.0 = Debug|ARM64
459-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|x64.ActiveCfg = Debug|x64
460-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|x64.Build.0 = Debug|x64
461-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|x86.ActiveCfg = Debug|Win32
462-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Debug|x86.Build.0 = Debug|Win32
463-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|ARM.ActiveCfg = Release|ARM
464-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|ARM.Build.0 = Release|ARM
465-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|ARM64.ActiveCfg = Release|ARM64
466-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|ARM64.Build.0 = Release|ARM64
467-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|x64.ActiveCfg = Release|x64
468-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|x64.Build.0 = Release|x64
469-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|x86.ActiveCfg = Release|Win32
470-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08}.Release|x86.Build.0 = Release|Win32
471448
{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA}.Debug|ARM.ActiveCfg = Debug|ARM
472449
{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA}.Debug|ARM.Build.0 = Debug|ARM
473450
{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -521,7 +498,6 @@ Global
521498
{303CC0FE-7D66-4F9F-B7A1-0AF7F9359074} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
522499
{D48A96C2-8512-4CC3-B6E4-7CFF07ED8ED3} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
523500
{08C40663-B6A3-481E-8755-AE32BAD99501} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
524-
{2EF696B9-7F4A-410F-AE5C-5301565C0F08} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
525501
{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
526502
{D4C8F881-84D5-4A7B-8BDE-AB4E34A05374} = {3C7EA5F8-6E8C-4376-B499-2CAF596384B0}
527503
EndGlobalSection

run_tests.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if "%target_configuration%"=="" set target_configuration=Debug
1111
call :run_test test
1212
call :run_test test_cpp20
1313
call :run_test test_cpp20_no_sourcelocation
14-
call :run_test test_win7
1514
call :run_test test_fast
1615
call :run_test test_slow
1716
call :run_test test_old

0 commit comments

Comments
 (0)