Skip to content

Commit

Permalink
Add Windows 11 23H2 as non-blocking in CI
Browse files Browse the repository at this point in the history
Windows 11 23H2 version which will replace Windows 11 22H2 once the new version is deemed as stable. Until then, 23h2 tests will be set as insignificant.

Task-number: QTQAINFRA-6075
Task-number: QTQAINFRA-6113
Change-Id: I15054813896210fadf14da815ad5a7b3e402e800
Reviewed-by: Jukka Jokiniva <[email protected]>
  • Loading branch information
Elias Toivola committed Mar 28, 2024
1 parent 786faf4 commit 5157d1e
Show file tree
Hide file tree
Showing 93 changed files with 784 additions and 0 deletions.
75 changes: 75 additions & 0 deletions coin/platform_configs/cmake_platforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ Configurations:
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'windows-11_23H2-msvc2019'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'MSVC2019'
Features: ['Packaging', 'Sccache', "DebugAndRelease", 'UseConfigure', 'InsignificantTests']
Configure arguments: '-debug-and-release -force-debug-info -headersclean -nomake examples -qt-zlib'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'windows-10_22h2-msvc2022'
Template: 'qtci-windows-10_22H2-x86_64-51'
Expand All @@ -107,6 +119,18 @@ Configurations:
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'windows-11_23H2-msvc2022'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'MSVC2022'
Features: ['Sccache', "DebugAndRelease", 'UseConfigure', 'InsignificantTests']
Configure arguments: '-debug-and-release -force-debug-info -headersclean -nomake examples -qt-zlib'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF -DFEATURE_clangcpp=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'windows-10_22h2-msvc2019-developer-build'
Template: 'qtci-windows-10_22H2-x86_64-51'
Expand Down Expand Up @@ -147,6 +171,18 @@ Configurations:
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'gRPC_ROOT={{.Env.gRPC_ROOT_msvc}}',
]
-
Id: 'windows-11_23H2-msvc2019-developer-build'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'MSVC2019'
Features: ['Sccache', "DebugAndRelease", 'WarningsAreErrors', 'UseConfigure', 'InsignificantTests']
Configure arguments: '-debug-and-release -make examples -developer-build -force-debug-info -qt-zlib -c++std c++20'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\..',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'gRPC_ROOT={{.Env.gRPC_ROOT_msvc}}',
]
-
Id: 'windows-11_22h2-msvc2019-arm64'
Template: 'qtci-windows-11_22H2-x86_64-52'
Expand All @@ -160,6 +196,19 @@ Configurations:
'NON_QTBASE_TARGET_CMAKE_ARGS=-DFEATURE_native_grpc=OFF',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'windows-11_23H2-msvc2019-arm64'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'MSVC2019'
Target arch: 'arm64'
Features: ['Sccache', 'DisableTests', 'TargetBuildOnly', 'Packaging', 'UseConfigure', 'InsignificantTests']
Platform dependency: 'windows-11_23H2-msvc2019-developer-build'
Environment variables: [
'TARGET_CONFIGURE_ARGS=-debug-and-release -force-debug-info -platform win32-arm64-msvc',
'TARGET_CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON',
'NON_QTBASE_TARGET_CMAKE_ARGS=-DFEATURE_native_grpc=OFF',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
Id: 'rhel-8.8'
Template: 'qtci-linux-RHEL-8.8-x86_64-50'
Expand Down Expand Up @@ -253,6 +302,19 @@ Configurations:
'LLVM_INSTALL_DIR=C:\llvm-mingw',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_llvm_mingw}}',
]
-
Id: 'windows-11_23H2-llvm'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'Clang'
Features: ['Packaging','Sccache', 'UseConfigure', 'InsignificantTests']
Configure arguments: '-release -force-debug-info -separate-debug-info -nomake examples'
Environment variables: [
'Path=C:\llvm-mingw\bin;{{.Env.Path}}',
'CMAKE_ARGS=-DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_LLVM_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
'LLVM_INSTALL_DIR=C:\llvm-mingw',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_llvm_mingw}}',
]
-
Id: 'windows-10_22h2-mingw13-developer-build'
Template: 'qtci-windows-10_22H2-x86_64-51'
Expand All @@ -279,6 +341,19 @@ Configurations:
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_mingw}}',
]
-
Id: 'windows-11_23H2-mingw13-developer-build'
Template: 'qtci-windows-11_23H2-x86_64-52'
Compiler: 'Mingw'
Features: ['Sccache', 'WarningsAreErrors', 'UseConfigure', 'InsignificantTests']
Configure arguments: '-developer-build -release -force-debug-info -separate-debug-info -make examples'
Environment variables: [
'Path={{.Env.MINGW_PATH}}\bin;{{.Env.Path}}',
'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_mingw}}',
]
-
Id: 'jammy-arm64-debian-pkg-packaging'
Template: 'qtci-linux-Debian-11.6-aarch64-50'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# The DirectX SDK installer requires .Net framework 3.5 which isn't installed
# by default

$netFeature = "NetFx3"
try {
$netFeatureState = (Get-WindowsOptionalFeature -Online -FeatureName "$netFeature").State
if ($netFeatureState -eq "Enabled") {
Write-Host ".Net Framework is already installed"
exit 0
}
} catch {
Write-Host "Could not find .Net Framework Windows feature."
exit 1
}

Write-Host "Installing .Net Framework client"
try {
Enable-WindowsOptionalFeature -Online -FeatureName "$netFeature" -All -NoRestart
} catch {
Write-Host "Could not install .Net framework"
exit 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# List about manual pre-installations to Tier1 image:

VM Options:
Boot options/Firmware: BIOS

Language to install: English (United States)
Time and currency format: English (United States)
Keyboard or input method: United Kingdom
Windows 11 Enterprise
location: finnish


# If note "This PC can't run Windows 11" appears
shift + F10 - regedit - add: HKEY_LOCAL_MACHINE/SYSTEM/Setup/LabConfig
'regedit' to open Registry Editor
Go to: HKEY_LOCAL_MACHINE/SYSTEM/Setup/
Right click 'Setup' folder: New -> Key -> Name: LabConfig
add DWORD value BypassTPMCheck with value 1
Right click 'LabConfig' folder: New -> DWORD (32-bit) -> Name: BypassTPMCheck
Double-click on the BypassTPMCheck, change value to 1
add DWORD value BypassSecureBootCheck value 1
repeat
Close the regedit and the installation window ('X') to start the installation again.

Load driver - browse - virtio-win-0.1.204 - amd64 - w10


Region: Finland
Keyboard layout: United Kingdom
Keyboard layout: English (United State)


* Sign-in options - Domain join instead
- Add user & pw
* Location - no
* Find my device - no
* Diagnostic data - Required only
* Inking and typing - no
* Tailored expreriences - no
* Advertising ID - no

Reboot
After reboot and startup, go to 'This PC' -> virtio-win-0.1.204 and run virtio-win-qt-x64

# Register the image to OpenNebula now
# After registering the image and opening a persistent VM out of it in ON, continue to these steps

* Using Windows Remote Desktop Connection (RDP) is recommended
- Connect to the tier-1 VM with VNC in OpenNebula
- Open CMD, run: ipconfig
- Input the IP to RDP. Click "Show options" -> add username. Connect.
- You can now copy&paste paths and .ps1 scripts later
* Resolution set to 1280x800
- If 1280x800 is not listed in the settings, select a 1280 width (e.g. 1280x960) and:
- regedit -> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
- Select a key/folder and its subkeys (00/00) that has the resolution you just selected
- Change every height value (e.g. 960) to 800
- Restart Windows
* Coin-setup:
* Download the agent executable from the IP that is used in Qt5 dev COIN_DOWNLOAD_URL (check from a build log):
http://[COIN IP]/coin/binary/windows_amd64/agent.exe
* Run the executable. It should do the following configurations to Windows but you should check them.
- Installing Bootstrap agent
- Disabling fast boot
- No related settings in control panel.
- Make sure it's disabled: gpedit -> Computer Configuration\Administrative Templates\System\Shutdown\
- Require use of fast startup -> set to "Disabled".
- Disabling firewall
- Disabling UAC
- Enabling autologin
- regedit -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device
- DevicePasswordLessBuildVersion: 2 -> 0
- netplwiz -> uncheck: "Users must enter a user name and password...", apply
- Disabling windows updates
- gpedit -> Computer Configuration\Administrative Templates\Windows Components\Windows Update\Manage end user experience
- "Configure Automatic Updates" -> "Disabled"
- Bootstrap agent CMD window should now pop-up at every Windows start up.
* Turn off Windows defender:
- Microsoft Defender Antivirus turned off: Open 'gpedit.msc': 'Computer Configuration' - 'Administrative Templates' - 'Windows Components' - 'Microsoft Defender Antivirus'
- Edit 'Turn off Microsoft Defender Antivirus' > 'Enabled' > 'Apply'
- Reboot on Safe mode:
- Open msconfig - Boot tab - enable “Safe boot“ - apply - restart
- In Safe mode:
- Take Ownership of Defender:
- Open properties - Right click "C:\Program Files\Windows Defender\Platform" and select 'Properties'
- Open Security tab - Advanced - Owner: Change - Advanced - Find now - Select Administrators - Ok - Ok
- Remove all Permissions: Permissions tab
- Select 'Disable inheritance'
- Remove all entries
- Select 'Replace all child object permi…' - Apply
- Disable Windows defender also from RegEdit:
- Open regedit - Navigate to 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services'
- Change the following folders the key Start to 4
- Sense (Windows defender advanced threat protection)
- WdBoot (Windows defender boot)
- WdFilter (Microsoft antimalware file system filter driver)
- WdNisDrv (Windows Defender Network Inspection Driver)
- WdNisSvc (Windows Defender Network Inspection Service)
- WinDefend (Windows Defender Antivirus Service)
- mpssvc (Windows Defender Firewall)
- NOTE! Without these step windows defender can't be disabled!
- Reboot back to normal mode
* Background defrag disabled: 'Defragment And Optimize Drives' - 'change settings' - unchecked "run on a schedule"
- Run in terminal: 'schtasks /Delete /TN "Microsoft\Windows\Defrag\ScheduledDefrag"'
* Time:
- Settings - Time & language - Date & time - Time zone: 'Coordinated Universal Time'
- Settings - System - Date & time - "Set the time automatically: Off"
* Regional format:
- Settings - Time & language - Language and region - regional format - English (United States)
* Power saver:
- Settings - System - Power - Screen and sleep: set 'When plugged in, turn off my screen after' to 'never'
* Windows search disabled:
- 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Tools\Services'
- 'Windows search' - properties - stop & Startup type: disabled
* Sysmain disabled:
- 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Tools\Services' - 'SysMain' - stop & disable
* Windows update:
- Settings - Windows Update - run available updates (Windows update2024-02 Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5034765))
- After reboot disable windows updates:
- 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Tools\Services' - 'Windows updates' - stop & disable
* Turn windows features on or off -> Check the "SMB 1.0/CIFS File Sharing Support"
* Allow running scripts by all users
- Open PowerShell, type: Set-ExecutionPolicy -ExecutionPolicy Bypass
* (Restart Windows)
* Google Chrome installed for RTA
* Virus & threat protection settings:
* Check that there's no active antivirus providers
* Disable useless startup apps with Task manager
- OneDrive
- SecurityHealthSystray
- Microsoft Edge
- Open Edge and turn off all boosts and background tasks. Task manager should not show Edge processes when Edge is off.
* Disable clean manager
- Settings: System -> Storage -> Storage management -> Storage Sense: Off
* Run the disable/enable .ps1 scripts
- Copy&paste the scripts (+helpers.ps1) to the VM, run them.
* Install msvc2019 and msvc2022 (follow the msvc2019.txt and msvc2022.txt files)
- Open Task Scheduler: Task Scheduler Library > Microsoft > VisualStudio > Updates > right-click: BackgroundDownload > disable
* Activate Windows
* When everything seems ready: shut down Windows, Select 'Power off' in OpenNebula.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
. "$PSScriptRoot\helpers.ps1
# Disable the NTP from syncing
Run-Executable "w32tm.exe" "/config /syncfromflags:NO"
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
. "$PSScriptRoot\helpers.ps1"

# This script will remove unneeded Tasks from Task Scheduler

# Application Experience 'Microsoft Compatibility Appraiser' - "Collects program telemetry information if opted-in to the Microsoft Customer Experience Improvement Program."
DisableSchedulerTask "Application Experience\Microsoft Compatibility Appraiser"

# Application Experience 'ProgramDataUpdater' - "Collects program telemetry information if opted-in to the Microsoft Customer Experience Improvement Program"
DisableSchedulerTask "Application Experience\ProgramDataUpdater"

# Autochk 'Proxy' - "This task collects and uploads autochk SQM data if opted-in to the Microsoft Customer Experience Improvement Program."
DisableSchedulerTask "Autochk\Proxy"

# Chkdsk 'ProactiveScan' - "NTFS Volume Health Scan"
DisableSchedulerTask "Chkdsk\ProactiveScan"

# Chkdsk 'SyspartRepair'
DeleteSchedulerTask "Chkdsk\SyspartRepair"

# Customer Experience Improvement Program 'Consolidator' - "If the user has consented to participate in the Windows Customer Experience Improvement Program, this job collects and sends usage data to Microsoft."
DisableSchedulerTask "Customer Experience Improvement Program\Consolidator"

# Customer Experience Improvement Program 'sbCeip' - "The USB CEIP (Customer Experience Improvement Program) task collects Universal Serial Bus related statistics and information about your machine and sends it to the Windows Device Connectivity engineering group at Microsoft. The information received is used to help improve the reliability, stability, and overall functionality of USB in Windows. If the user has not consented to participate in Windows CEIP, this task does not do anything."
DisableSchedulerTask "Customer Experience Improvement Program\UsbCeip"

# Device Information 'Device'
DisableSchedulerTask "Device Information\Device"

# Diagnosis 'Scheduled' - "The Windows Scheduled Maintenance Task performs periodic maintenance of the computer system by fixing problems automatically or reporting them through Security and Maintenance."
DisableSchedulerTask "Diagnosis\Scheduled"

# DiskDiagnostic 'Microsoft-Windows-DiskDiagnosticDataCollector' - "The Windows Disk Diagnostic reports general disk and system information to Microsoft for users participating in the Customer Experience Program."
DisableSchedulerTask "DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"

# ExploitGuard 'ExploitGuard MDM policy Refresh' - "Task for applying changes to the machine's Exploit Protection settings."
DisableSchedulerTask "ExploitGuard\ExploitGuard MDM policy Refresh"

# Feedback/Siuf 'DmClient'
DisableSchedulerTask "Feedback\Siuf\DmClient"

# Feedback/Siuf 'DmClient'OnScenarioDownload'
DisableSchedulerTask "Feedback\Siuf\DmClientOnScenarioDownload"

# File Classification Infrastructure 'Property Definition Sync'
DisableSchedulerTask "File Classification Infrastructure\Property Definition Sync"

# InstallService 'ScanForUpdates'
DisableSchedulerTask "InstallService\ScanForUpdates"

# InstallService 'ScanForUpdatesAsUser'
DisableSchedulerTask "InstallService\ScanForUpdatesAsUser"

# LanguageComponentsInstaller 'Installation' - "Install language components that match the user's language list."
DisableSchedulerTask "LanguageComponentsInstaller\Installation"

# LanguageComponentsInstaller 'ReconcileLanguageResources' - "Install language components that match the user's language list."
DisableSchedulerTask "LanguageComponentsInstaller\ReconcileLanguageResources"

# PI 'Secure-Boot-Update' - "This task updates the Secure Boot variables."
DisableSchedulerTask "PI\Secure-Boot-Update"

# PI 'Sqm-Tasks' - "This task gathers information about the Trusted Platform Module (TPM), Secure Boot, and Measured Boot."
DisableSchedulerTask "PI\Sqm-Tasks"

# Power Efficiency Diagnotics 'AnalyzeSystem' - "This task analyzes the system looking for conditions that may cause high energy use."
DisableSchedulerTask "PushToInstall\Registration"

# Servicing 'StartComponentCleanup'
DisableSchedulerTask "Servicing\StartComponentCleanup"

# SoftwareProtectionPlatform 'SvcRestartTaskNetwork' - "This task restarts the Software Protection Platform service when a new network is detected"
DisableSchedulerTask "SoftwareProtectionPlatform\SvcRestartTaskNetwork"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Disable UpdateOrchestrator

$name = "UpdateOrchestrator"
$path = "C:\Windows\System32\Tasks\Microsoft\Windows\$name"

takeown /F $path /A /R
icacls $path /grant Administrators:F /T
del "$path\Schedule Scan"
del "$path\Schedule Scan Static Task"
del "$path\USO_UxBroker"

# Disable Update orchestrator service
reg.exe ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsoSvc" /V Start /T REG_dWORD /D 4 /F
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2020 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

# Turning off win defender.
#
# If disabled manually, windows will automatically enable it after
# some period of time. Disabling it speeds up the builds.
# NOTE! Windows Defender Antivirus needs to be turned off!
# Open 'gpedit.msc': 'Computer Configuration' - 'Administrative Templates' - 'Windows Components' - 'Windows Defender Antivirus'
# Edit 'Turn off Windows Defender Antivirus' > 'Enabled' > 'Apply'

. "$PSScriptRoot\helpers.ps1"

Run-Executable "reg.exe" "ADD `"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender`" /V DisableAntiSpyware /T REG_dWORD /D 1 /F"
Run-Executable "reg.exe" "ADD `"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender`" /V DisableRoutinelyTakingAction /T REG_dWORD /D 1 /F"

# Disable 'QueueReporting' - "Windows Error Reporting task to process queued reports."
DisableSchedulerTask "Windows Error Reporting\QueueReporting"

# Disable WindowsUpdate from Task Scheduler
DisableSchedulerTask "WindowsUpdate\Scheduled Start"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disable Windows File Protection
# Windows File Protection feature in Microsoft Windows prevents programs from replacing critical Windows system files.

reg.exe ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /V SFCDisable /T REG_dWORD /D 0xffffff9d /F
Loading

0 comments on commit 5157d1e

Please sign in to comment.