blob: d91b6644b63c4bb00393fc84987040d142627d21 [file] [log] [blame]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +01001name: GitHub CI
2
Bram Moolenaarb5b77372020-12-18 13:31:31 +01003on:
4 push:
5 branches: ['**']
6 pull_request:
Bram Moolenaar8ea05de2020-12-17 20:27:26 +01007
Yegappan Lakshmanan7f4a6282021-12-25 11:20:30 +00008# Cancels all previous workflow runs for pull requests that have not completed.
9concurrency:
10 # The concurrency group contains the workflow name and the branch name for
11 # pull requests or the commit hash for any other events.
12 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
13 cancel-in-progress: true
14
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010015jobs:
16 linux:
Bram Moolenaar0fa09672021-02-13 17:08:33 +010017 runs-on: ubuntu-18.04
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010018
19 env:
20 CC: ${{ matrix.compiler }}
21 TEST: test
22 SRCDIR: ./src
23 LEAK_CFLAGS: -DEXITFREE
24 LOG_DIR: ${{ github.workspace }}/logs
25 TERM: xterm
26 DISPLAY: ':99'
Bram Moolenaar9aff9702020-12-21 13:37:28 +010027 DEBIAN_FRONTEND: noninteractive
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010028
29 strategy:
30 fail-fast: false
31 matrix:
32 features: [tiny, small, normal, huge]
33 compiler: [clang, gcc]
34 extra: [none]
35 include:
36 - features: tiny
37 compiler: clang
38 extra: nogui
39 - features: tiny
40 compiler: gcc
41 extra: nogui
42 - features: normal
43 shadow: ./src/shadow
44 - features: huge
45 coverage: true
46 - features: huge
47 compiler: gcc
48 coverage: true
49 extra: testgui
James McCoy2e258bd2021-10-05 19:44:04 +010050 uchar: true
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010051 - features: huge
52 compiler: clang
53 extra: asan
54 - features: huge
55 compiler: gcc
56 coverage: true
57 extra: unittests
58 - features: normal
59 compiler: gcc
60 extra: vimtags
61
62 steps:
63 - uses: actions/checkout@v2
64
65 - name: Install packages
ichizokece07632022-01-14 21:28:59 +000066 if: matrix.features == 'huge'
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010067 run: |
Christian Brabandtef7be832021-06-22 18:21:19 +020068 sudo apt update && sudo apt install -y \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010069 autoconf \
70 lcov \
71 gettext \
72 libcanberra-dev \
73 libperl-dev \
74 python-dev \
75 python3-dev \
76 liblua5.3-dev \
77 lua5.3 \
78 ruby-dev \
79 tcl-dev \
80 cscope \
81 libgtk2.0-dev \
82 desktop-file-utils \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020083 libtool-bin \
84 libsodium-dev
Bram Moolenaar9aff9702020-12-21 13:37:28 +010085
ichizokdee78e12021-12-09 21:08:01 +000086 - name: Install clang-13
Bram Moolenaar9aff9702020-12-21 13:37:28 +010087 if: matrix.compiler == 'clang'
88 run: |
89 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
90 . /etc/lsb-release
ichizokdee78e12021-12-09 21:08:01 +000091 sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main"
92 sudo apt-get install -y clang-13 llvm-13
93 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
94 sudo update-alternatives --set clang /usr/bin/clang-13
95 sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100
ichizok0d47ad42022-01-11 13:05:26 +000096 sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010097
98 - name: Set up environment
99 run: |
100 mkdir -p "${LOG_DIR}"
101 mkdir -p "${HOME}/bin"
102 echo "${HOME}/bin" >> $GITHUB_PATH
103 (
104 echo "LINUX_VERSION=$(uname -r)"
105 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
106 echo "SND_DUMMY_DIR=${HOME}/snd-dummy"
107 echo "TMPDIR=${{ runner.temp }}"
108
109 case "${{ matrix.features }}" in
110 tiny|small)
111 echo "TEST=testtiny"
112 if ${{ contains(matrix.extra, 'nogui') }}; then
113 echo "CONFOPT=--disable-gui"
114 fi
115 ;;
116 normal)
117 ;;
118 huge)
119 echo "TEST=scripttests test_libvterm"
120 echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
121 ;;
122 esac
123
124 if ${{ matrix.coverage == true }}; then
James McCoy2e258bd2021-10-05 19:44:04 +0100125 CFLAGS="$CFLAGS --coverage -DUSE_GCOV_FLUSH"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100126 echo "LDFLAGS=--coverage"
127 fi
James McCoy2e258bd2021-10-05 19:44:04 +0100128 if ${{ matrix.uchar == true }}; then
129 CFLAGS="$CFLAGS -funsigned-char"
130 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100131 if ${{ contains(matrix.extra, 'testgui') }}; then
132 echo "TEST=-C src testgui"
133 fi
134 if ${{ contains(matrix.extra, 'unittests') }}; then
135 echo "TEST=unittests"
136 fi
137 if ${{ contains(matrix.extra, 'asan') }}; then
138 echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
139 echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
140 echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
141 echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
142 fi
143 if ${{ contains(matrix.extra, 'vimtags') }}; then
144 echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
145 fi
James McCoy2e258bd2021-10-05 19:44:04 +0100146 echo "CFLAGS=$CFLAGS"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100147 ) >> $GITHUB_ENV
148
149 - name: Set up system
150 run: |
151 if [[ ${CC} = clang ]]; then
152 # Use llvm-cov instead of gcov when compiler is clang.
153 ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
154 fi
155 # Setup lua5.3 manually since its package doesn't provide alternative.
156 # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
157 if [[ ${CONFOPT} =~ luainterp ]]; then
158 sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
159 fi
160 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
161 sudo usermod -a -G audio "${USER}"
162 sudo bash ci/setup-xvfb.sh
163
164 - name: Cache snd-dummy
165 uses: actions/cache@v2
166 with:
167 path: ${{ env.SND_DUMMY_DIR }}
168 key: linux-${{ env.LINUX_VERSION }}-snd-dummy
169
170 - name: Set up snd-dummy
171 run: |
172 if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
173 bash ci/build-snd-dummy.sh
174 fi
175 cd "${SND_DUMMY_DIR}"
176 sudo insmod soundcore.ko
177 sudo insmod snd.ko
178 sudo insmod snd-pcm.ko
179 sudo insmod snd-dummy.ko
180
181 - name: Check autoconf
182 if: contains(matrix.extra, 'unittests')
183 run: |
184 make -C src autoconf
185
186 - name: Set up shadow dir
187 if: matrix.shadow
188 run: |
189 make -C src shadow
190 echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
191 echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
192
193 - name: Configure
194 run: |
195 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
196 # Append various warning flags to CFLAGS.
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100197 sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
198 sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000199 if [[ ${CC} = clang ]]; then
200 # Suppress some warnings produced by clang 12 and later.
201 sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
202 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100203
204 - name: Build
205 if: (!contains(matrix.extra, 'unittests'))
206 run: |
207 make ${SHADOWOPT} -j${NPROC}
208
209 - name: Check version
210 if: (!contains(matrix.extra, 'unittests'))
211 run: |
212 "${SRCDIR}"/vim --version
213 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
214 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
215
216 - name: Test
217 timeout-minutes: 20
218 run: |
219 do_test() { sg audio "sg $(id -gn) '$*'"; }
220 do_test make ${SHADOWOPT} ${TEST}
221
ichizok0d47ad42022-01-11 13:05:26 +0000222 # - name: Coveralls
223 # if: matrix.coverage && success() && github.event_name != 'pull_request'
224 # env:
225 # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
226 # COVERALLS_PARALLEL: true
227 # TRAVIS_JOB_ID: ${{ github.run_id }}
228 # run: |
229 # sudo apt-get install -y python3-setuptools python3-wheel
230 # sudo -H pip3 install pip -U
231 # # needed for https support for coveralls building cffi only works with gcc, not with clang
232 # CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
233 # ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100234
ichizok0d47ad42022-01-11 13:05:26 +0000235 - name: Generate gcov files
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100236 if: matrix.coverage && success()
Bram Moolenaare5492602020-12-22 19:05:33 +0100237 run: |
238 cd "${SRCDIR}"
ichizok0d47ad42022-01-11 13:05:26 +0000239 find . -type f -name '*.gcno' -exec gcov -pb {} + || true
240
241 - name: Codecov
242 if: matrix.coverage && success()
243 uses: codecov/codecov-action@v2
244 with:
245 flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100246
247 - name: ASan logs
248 if: contains(matrix.extra, 'asan') && !cancelled()
249 run: |
250 for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
ichizok0d47ad42022-01-11 13:05:26 +0000251 asan_symbolize -l "$f"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100252 false # in order to fail a job
253 done
254
ichizok0d47ad42022-01-11 13:05:26 +0000255 # coveralls:
256 # runs-on: ubuntu-18.04
Bram Moolenaar18fefdd2021-09-19 17:55:16 +0200257 #
ichizok0d47ad42022-01-11 13:05:26 +0000258 # needs: linux
259 # if: always() && github.event_name != 'pull_request'
Bram Moolenaar18fefdd2021-09-19 17:55:16 +0200260 #
ichizok0d47ad42022-01-11 13:05:26 +0000261 # steps:
262 # - name: Parallel finished
263 # env:
264 # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
265 # run: |
266 # curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${GITHUB_RUN_ID}&payload[status]=done"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100267
268 macos:
269 runs-on: macos-latest
270
271 env:
ichizok48c01962021-12-11 17:34:19 +0000272 CC: clang
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100273 TEST: test
274 SRCDIR: ./src
275 LEAK_CFLAGS: -DEXITFREE
276 TERM: xterm
277
278 strategy:
279 fail-fast: false
280 matrix:
ichizok48c01962021-12-11 17:34:19 +0000281 features: [tiny, normal, huge]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100282
283 steps:
284 - uses: actions/checkout@v2
285
286 - name: Install packages
287 env:
288 HOMEBREW_NO_AUTO_UPDATE: 1
289 run: |
290 brew install lua
291 echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
292
293 - name: Set up environment
294 run: |
295 (
296 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
297 case "${{ matrix.features }}" in
298 tiny)
299 echo "TEST=testtiny"
300 echo "CONFOPT=--disable-gui"
301 ;;
ichizok48c01962021-12-11 17:34:19 +0000302 normal)
303 ;;
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100304 huge)
305 echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
306 ;;
307 esac
308 ) >> $GITHUB_ENV
309
310 - name: Configure
311 run: |
312 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
313 # Append various warning flags to CFLAGS.
314 # BSD sed needs backup extension specified.
315 sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
316 # On macOS, the entity of gcc is clang.
317 sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000318 # Suppress some warnings produced by clang 12 and later.
319 if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
320 sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
321 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100322
323 - name: Build
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100324 env:
Bram Moolenaared1e4c92020-12-28 15:46:47 +0100325 LC_ALL: C
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100326 run: |
327 make -j${NPROC}
328
329 - name: Check version
330 run: |
331 "${SRCDIR}"/vim --version
332 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
333 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
334
335 - name: Test
336 timeout-minutes: 20
337 run: |
338 make ${TEST}
339
340 windows:
341 runs-on: windows-latest
342
343 env:
344 VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
345 # Interfaces
346 # Lua
347 LUA_VER: 54
348 LUA_VER_DOT: '5.4'
349 LUA_RELEASE: 5.4.0
350 LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
351 LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
352 LUA_DIR: D:\Lua
353 # Python 2
354 PYTHON_VER: 27
355 PYTHON_VER_DOT: '2.7'
356 # Python 3
357 PYTHON3_VER: 38
358 PYTHON3_VER_DOT: '3.8'
359 # Other dependencies
360 # winpty
361 WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
362 # Escape sequences
363 COL_RED: "\x1b[31m"
364 COL_GREEN: "\x1b[32m"
365 COL_YELLOW: "\x1b[33m"
366 COL_RESET: "\x1b[m"
367
368 strategy:
369 fail-fast: false
370 matrix:
371 toolchain: [msvc, mingw]
372 arch: [x64, x86]
373 features: [HUGE, NORMAL]
374 include:
375 - arch: x64
376 vcarch: amd64
377 warch: x64
378 bits: 64
379 msystem: MINGW64
380 cygreg: registry
381 pyreg: ""
382 - arch: x86
383 vcarch: x86
384 warch: ia32
385 bits: 32
386 msystem: MINGW32
387 cygreg: registry32
388 pyreg: "-32"
389 exclude:
390 - toolchain: msvc
391 arch: x64
392 features: NORMAL
393 - toolchain: mingw
394 arch: x86
395 features: NORMAL
396
397 steps:
Bram Moolenaar53f7fcc2021-07-28 20:10:16 +0200398 - name: Initialize
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100399 id: init
400 shell: bash
401 run: |
402 git config --global core.autocrlf input
403 python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
404 python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
405 echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
406 echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
407
408 - uses: msys2/setup-msys2@v2
409 if: matrix.toolchain == 'mingw'
410 with:
411 msystem: ${{ matrix.msystem }}
412 release: false
413
414 - uses: actions/checkout@v2
415
416 - name: Create a list of download URLs
417 shell: cmd
418 run: |
419 type NUL > urls.txt
420 echo %LUA_RELEASE%>> urls.txt
421 echo %WINPTY_URL%>> urls.txt
422
423 - name: Cache downloaded files
424 uses: actions/cache@v2
425 with:
426 path: downloads
427 key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt') }}
428
429 - name: Download dependencies
430 shell: cmd
431 run: |
432 path C:\Program Files\7-Zip;%path%
433 if not exist downloads mkdir downloads
434
435 echo %COL_GREEN%Download Lua%COL_RESET%
436 call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
437 7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
438
439 echo %COL_GREEN%Download winpty%COL_RESET%
440 call :downloadfile %WINPTY_URL% downloads\winpty.zip
441 7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
442 copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll src\winpty${{ matrix.bits }}.dll
443 copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
444
445 goto :eof
446
447 :downloadfile
448 :: call :downloadfile <URL> <localfile>
449 if not exist %2 (
450 curl -f -L %1 -o %2
451 )
452 if ERRORLEVEL 1 (
453 rem Retry once.
454 curl -f -L %1 -o %2 || exit 1
455 )
456 goto :eof
457
458 - name: Copy src directory to src2
459 shell: cmd
460 run: |
461 xcopy src src2\ /E > nul
462
463 - name: Build (MSVC)
464 if: matrix.toolchain == 'msvc'
465 shell: cmd
466 run: |
467 call "%VCVARSALL%" ${{ matrix.vcarch }}
468 cd src
469 :: Filter out the progress bar from the build log
470 sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
471 if "${{ matrix.features }}"=="HUGE" (
472 nmake -nologo -f Make_mvc2.mak ^
473 FEATURES=${{ matrix.features }} ^
474 GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
475 DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
476 DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
477 DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
478 ) else (
479 nmake -nologo -f Make_mvc2.mak ^
480 FEATURES=${{ matrix.features }} ^
481 GUI=yes IME=yes ICONV=yes VIMDLL=yes
482 )
483 if not exist vim${{ matrix.bits }}.dll (
484 echo %COL_RED%Build failure.%COL_RESET%
485 exit 1
486 )
487
488 - name: Build (MinGW)
489 if: matrix.toolchain == 'mingw'
490 shell: msys2 {0}
491 run: |
492 cd src
493 if [ "${{ matrix.features }}" = "HUGE" ]; then
494 mingw32-make -f Make_ming.mak -j2 \
495 FEATURES=${{ matrix.features }} \
496 GUI=yes IME=yes ICONV=yes VIMDLL=yes \
497 DYNAMIC_LUA=yes LUA=${LUA_DIR} \
498 DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
499 DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
500 STATIC_STDCPLUS=yes
501 else
502 mingw32-make -f Make_ming.mak -j2 \
503 FEATURES=${{ matrix.features }} \
504 GUI=yes IME=yes ICONV=yes VIMDLL=yes \
505 STATIC_STDCPLUS=yes
506 fi
507
508 #- name: Prepare Artifact
509 # shell: cmd
510 # run: |
511 # mkdir artifacts
512 # copy src\*vim.exe artifacts
513 # copy src\vim*.dll artifacts
514 #
515 #- name: Upload Artifact
516 # uses: actions/upload-artifact@v1
517 # with:
518 # name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
519 # path: ./artifacts
520
521 - name: Test
522 shell: cmd
523 timeout-minutes: 20
524 run: |
525 PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
526 call "%VCVARSALL%" ${{ matrix.vcarch }}
527 cd src
528 echo.
529 echo %COL_GREEN%vim version:%COL_RESET%
530 .\vim --version || exit 1
531
532 echo %COL_GREEN%Start testing vim in background.%COL_RESET%
533 start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
534
535 echo %COL_GREEN%Test gvim:%COL_RESET%
536 cd testdir
537 nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
538 cd ..
539
540 echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
541 cd ..\src2\testdir
542 :: Wait about 10 minutes.
543 for /L %%i in (1,1,60) do (
544 if exist done.txt goto exitloop
545 timeout 10 > NUL 2>&1
546 if ERRORLEVEL 1 ping -n 11 localhost > NUL
547 )
548 set timeout=1
549 :exitloop
550
551 echo %COL_GREEN%Test results of vim:%COL_RESET%
552 if exist messages type messages
553 nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
554 if "%timeout%"=="1" (
555 echo %COL_RED%Timed out.%COL_RESET%
556 exit 1
557 )