18
18
strategy :
19
19
fail-fast : false
20
20
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.
23
24
target :
24
25
# Python 3.12
25
26
- python : ' 3.12'
28
29
- python : ' 3.12'
29
30
os : macOS
30
31
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
34
36
35
37
steps :
36
38
- name : Set up environment
58
60
pip install --user setuptools wheel
59
61
60
62
- name : Check out Linux source code
63
+ # Skip for Windows (headless-only mode)
64
+ if : ${{ matrix.target.headless-only != true }}
61
65
uses : actions/checkout@v5
62
66
# On Windows, checkout of 'aux.c' is expected to fail because ... Windows.
63
67
continue-on-error : true
@@ -68,12 +72,43 @@ jobs:
68
72
- name : Check out Kconfiglib source code
69
73
uses : actions/checkout@v5
70
74
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' }}
72
78
73
79
- name : Apply Linux Kconfig Makefile patch
80
+ # Skip for Windows (headless-only mode)
81
+ if : ${{ matrix.target.headless-only != true }}
74
82
run : |
75
83
git apply Kconfiglib/makefile.patch
76
84
77
85
- name : Run testsuite
86
+ # Skip for Windows (headless-only mode)
87
+ if : ${{ matrix.target.headless-only != true }}
78
88
run : |
79
89
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 << 'EOF'
96
+ from kconfiglib import Kconfig
97
+ import menuconfig
98
+ print('Testing headless mode...')
99
+ kconf = Kconfig('examples/Kmenuconfig')
100
+ menuconfig.menuconfig(kconf, headless=True)
101
+ print('Headless mode test passed')
102
+ EOF
103
+
104
+ - name : Install windows-curses (Windows only)
105
+ if : matrix.target.os == 'Windows'
106
+ run : |
107
+ pip install windows-curses
108
+
109
+ - name : Test menuconfig import (Windows Python 3.12)
110
+ if : matrix.target.os == 'Windows'
111
+ # Use root dir for Windows (headless-only mode)
112
+ working-directory : ${{ matrix.target.headless-only && '.' || 'Kconfiglib' }}
113
+ run : |
114
+ python -c "import menuconfig; print('menuconfig import successful')"
0 commit comments