Skip to content

Commit e4b6d6a

Browse files
authored
ci: test-upstream Windows build fails #616
Problem: Windows `test-upstream` build fails: ``` …/libuv/src/uv-common.c:960:26: warning: passing argument 1 of 'uv__free' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 960 | uv__free(cpu_infos[i].model); | ~~~~~~~~~~~~^~~~~~ …/libuv/src/uv-common.c:81:21: note: expected 'void *' but argument is of type 'const char *' 81 | void uv__free(void* ptr) { | ~~~~~~^~~ ``` The `test-upstream` Windows job builds Neovim with MinGW/GCC via msys2, but Neovim's own CI uses MSVC. 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 e4b6d6a

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 14 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}
160+
working-directory: neovim-repo/test/old/testdir
161+
run: |
162+
mingw32-make VERBOSE=1 SCRIPTS= test_python3
163+
164+
- name: test-upstream functionaltest (Windows)
165+
if: runner.os == 'Windows'
154166
working-directory: neovim-repo
167+
env:
168+
TEST_FILE: ./test/functional/provider/python3_spec.lua
155169
run: |
156-
mingw32-make VERBOSE=1 oldtest TEST_FILE=test_python3.vim
157-
mingw32-make VERBOSE=1 functionaltest TEST_FILE=./test/functional/provider/python3_spec.lua
170+
cmake --build build --target functionaltest
158171
159172
- name: test-upstream (Linux/macOS)
160173
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)