From 0190c2c5e448fe439813061954b4d83900c555f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Desbiens?= Date: Thu, 5 Nov 2026 08:01:02 +0100 Subject: [PATCH] Added a Windows regression workflow for the simulator ports CI ran the regression suites on Linux only, so nothing built the Win32, Win64 or SMP Win64 simulator ports or the Windows test tree. A build break in the test tree and a test that timed out on the Windows simulators both went unnoticed. The new workflow runs the ThreadX suite on the Win32 and Win64 simulators and the SMP suite on the Win64 SMP simulator, on windows-2022, through the PowerShell build and test scripts used locally. It raises the scripts' per-configuration build timeout to 5 minutes for hosted runners and uploads ctest logs and timeout diagnostics when a job fails. It depends on #835 and #836 to pass. Run on a fork branch holding #835, #836 and this workflow, all three jobs passed: Win32 and Win64 104/104 and SMP Win64 118/118 in each of five configurations. The jobs took 4 to 7 minutes, with builds of 2m20s to 3m53s and test runs of 52s to 4m45s. Assisted-by: Claude Code (Opus 5.5) --- .github/workflows/windows_regression.yml | 101 +++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/windows_regression.yml diff --git a/.github/workflows/windows_regression.yml b/.github/workflows/windows_regression.yml new file mode 100644 index 000000000..9ecefd24d --- /dev/null +++ b/.github/workflows/windows_regression.yml @@ -0,0 +1,101 @@ +############################################################################### +# Copyright (c) 2026 Eclipse ThreadX contributors +# +# This program and the accompanying materials are made available under the +# terms of the MIT License which is available at +# https://opensource.org/licenses/MIT. +# +# AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5.5). +# The AI-generated portions may be considered public domain (CC0-1.0) +# and not subject to the project's licence. The human contributor has +# reviewed and verified that the code is correct. +# +# SPDX-License-Identifier: MIT and CC0-1.0 +############################################################################### + +name: windows_regression + +# Runs the ThreadX regression suite on the Win32 and Win64 simulators, and the +# SMP suite on the Win64 SMP simulator, with MSVC, CMake and Ninja. +# +# regression_test.yml runs every suite on Linux, so without this workflow nothing +# in CI builds the Windows simulator ports or the Windows test tree. The jobs call +# the same PowerShell scripts a developer runs locally; the windows-2022 image +# provides Visual Studio 2022 with the MSVC tools, CMake and Ninja, which is all +# those scripts need. There is no coverage step, because MSVC has no gcov. +on: + workflow_dispatch: + push: + branches: [ master, dev ] + pull_request: + branches: [ master, dev ] + +permissions: + contents: read + +concurrency: + group: windows-regression-${{ github.ref }} + cancel-in-progress: true + +jobs: + regression: + name: ${{ matrix.name }} + runs-on: windows-2022 + timeout-minutes: 60 + strategy: + # Each simulator is a separate port, so one failing does not make the + # others' results less useful. + fail-fast: false + matrix: + include: + - name: ThreadX Win32 + suite: tx + arch: win32 + build_dir: build/tests/win32 + - name: ThreadX Win64 + suite: tx + arch: win64 + build_dir: build/tests/win64 + - name: ThreadX SMP Win64 + suite: smp + arch: '' + build_dir: build/tests/win64_smp + env: + SUITE: ${{ matrix.suite }} + ARCH: ${{ matrix.arch }} + steps: + - name: Checkout sources + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + # The scripts' default build timeout is sized for a developer machine. A + # configuration builds in under a minute on a hosted runner, so each gets + # five. + - name: Build + shell: pwsh + timeout-minutes: 20 + run: | + $arguments = @{ BuildTimeoutSeconds = 300 } + if ($env:ARCH) { $arguments['Arch'] = $env:ARCH } + & "./scripts/build_$($env:SUITE).ps1" @arguments + + - name: Test + shell: pwsh + timeout-minutes: 30 + run: | + $arguments = @{} + if ($env:ARCH) { $arguments['Arch'] = $env:ARCH } + & "./scripts/test_$($env:SUITE).ps1" @arguments + + # The test scripts write ctest's logs under each configuration's Testing + # directory, and for a test that times out, its output, a process dump and + # the stack analysis of that dump. + - name: Upload test logs + if: failure() + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: windows_test_logs ${{ matrix.name }} + path: | + ${{ matrix.build_dir }}/*/Testing/Temporary/*.log + ${{ matrix.build_dir }}/*/Testing/Temporary/FailureDiagnostics/** + if-no-files-found: ignore + retention-days: 7