Skip to content

Commit da594ae

Browse files
committed
ci: build Neovim with MSVC on Windows, matching upstream
Problem: The test-upstream Windows job builds Neovim with MinGW/GCC via msys2, but Neovim's own CI uses MSVC. libuv triggers a GCC `-Wincompatible-pointer-types` error. Solution: Use MSVC/Ninja to build Neovim (matching upstream `test_windows.yml`), and only use msys2 for running oldtest which requires make.
1 parent 1950eae commit da594ae

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,35 +126,48 @@ jobs:
126126
run: |
127127
git clone --depth=1 https://github.com/neovim/neovim.git neovim-repo
128128
129-
- name: install build deps (Windows)
129+
- name: setup MSVC (Windows)
130130
if: runner.os == 'Windows'
131-
uses: msys2/setup-msys2@v2
132-
with:
133-
msystem: UCRT64
134-
update: true
135-
install: unzip
136-
pacboy: >-
137-
cmake:p make:p gcc:p diffutils:p libiconv:p
138-
release: false
131+
run: neovim-repo/.github/scripts/env.ps1
139132

140133
- name: build nvim (Windows)
141134
if: runner.os == 'Windows'
142-
shell: msys2 {0}
143135
working-directory: neovim-repo
144-
run: mingw32-make VERBOSE=1
136+
run: |
137+
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
138+
cmake --build .deps
139+
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo'
140+
cmake --build build
145141
146142
- name: build nvim (Linux/macOS)
147143
if: runner.os != 'Windows'
148144
working-directory: neovim-repo
149145
run: make
150146

151-
- name: test-upstream (Windows)
147+
- name: install msys2 (Windows)
148+
if: runner.os == 'Windows'
149+
uses: msys2/setup-msys2@v2
150+
with:
151+
update: true
152+
install: unzip
153+
pacboy: >-
154+
make:p diffutils:p
155+
release: false
156+
157+
- name: test-upstream oldtest (Windows)
152158
if: runner.os == 'Windows'
153159
shell: msys2 {0}
154160
working-directory: neovim-repo
155161
run: |
156162
mingw32-make VERBOSE=1 oldtest TEST_FILE=test_python3.vim
157-
mingw32-make VERBOSE=1 functionaltest TEST_FILE=./test/functional/provider/python3_spec.lua
163+
164+
- name: test-upstream functionaltest (Windows)
165+
if: runner.os == 'Windows'
166+
working-directory: neovim-repo
167+
env:
168+
TEST_FILE: ./test/functional/provider/python3_spec.lua
169+
run: |
170+
cmake --build build --target functionaltest
158171
159172
- name: test-upstream (Linux/macOS)
160173
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)