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