1818 strategy :
1919 fail-fast : false
2020 matrix :
21- # NOTE: Testing of the Windows targets are currently disabled because
22- # the test script is simply not ready for it.
21+ # NOTE: Full testsuite on Windows is disabled because the test script
22+ # requires Linux kernel source tree. However, headless mode tests
23+ # are now enabled for Windows.
2324 target :
2425 # Python 3.12
2526 - python : ' 3.12'
2829 - python : ' 3.12'
2930 os : macOS
3031 builder : macos-15
31- # - python: '3.12'
32- # os: Windows
33- # builder: windows-2022
32+ - python : ' 3.12'
33+ os : Windows
34+ builder : windows-2022
35+ headless-only : true
3436
3537 steps :
3638 - name : Set up environment
5860 pip install --user setuptools wheel
5961
6062 - name : Check out Linux source code
63+ # Skip for Windows (headless-only mode)
64+ if : ${{ matrix.target.headless-only != true }}
6165 uses : actions/checkout@v5
6266 # On Windows, checkout of 'aux.c' is expected to fail because ... Windows.
6367 continue-on-error : true
@@ -68,12 +72,44 @@ jobs:
6872 - name : Check out Kconfiglib source code
6973 uses : actions/checkout@v5
7074 with :
71- path : Kconfiglib
75+ # Windows (headless-only): checkout to root directory
76+ # Linux/macOS (full test): checkout to Kconfiglib subdirectory
77+ path : ${{ matrix.target.headless-only && '.' || 'Kconfiglib' }}
7278
7379 - name : Apply Linux Kconfig Makefile patch
80+ # Skip for Windows (headless-only mode)
81+ if : ${{ matrix.target.headless-only != true }}
7482 run : |
7583 git apply Kconfiglib/makefile.patch
7684
7785 - name : Run testsuite
86+ # Skip for Windows (headless-only mode)
87+ if : ${{ matrix.target.headless-only != true }}
7888 run : |
7989 Kconfiglib/tests/reltest python
90+
91+ - name : Test headless mode
92+ # Use root dir for Windows, Kconfiglib subdir for Linux/macOS
93+ working-directory : ${{ matrix.target.headless-only && '.' || 'Kconfiglib' }}
94+ run : |
95+ python -c "
96+ from kconfiglib import Kconfig
97+ import menuconfig
98+
99+ print('Testing headless mode...')
100+ kconf = Kconfig('examples/Kmenuconfig')
101+ menuconfig.menuconfig(kconf, headless=True)
102+ print('✅ Headless mode test passed')
103+ "
104+
105+ - name : Install windows-curses (Windows only)
106+ if : matrix.target.os == 'Windows'
107+ run : |
108+ pip install windows-curses
109+
110+ - name : Test menuconfig import (Windows Python 3.12)
111+ if : matrix.target.os == 'Windows'
112+ # Use root dir for Windows (headless-only mode)
113+ working-directory : ${{ matrix.target.headless-only && '.' || 'Kconfiglib' }}
114+ run : |
115+ python -c "import menuconfig; print('✅ menuconfig import successful')"
0 commit comments