blob: 2c0857ca5351e531bc475c05ee2dcdfa2d830b79 [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
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010066 run: |
ichizok10504762022-01-15 13:37:14 +000067 PKGS=( \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010068 gettext \
Bram Moolenaar8ea05de2020-12-17 20:27:26 +010069 libgtk2.0-dev \
70 desktop-file-utils \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020071 libtool-bin \
ichizok10504762022-01-15 13:37:14 +000072 )
73 if ${{ matrix.features == 'huge' }}; then
74 PKGS+=( \
75 autoconf \
76 lcov \
77 libcanberra-dev \
78 libperl-dev \
79 python-dev \
80 python3-dev \
81 liblua5.3-dev \
82 lua5.3 \
83 ruby-dev \
84 tcl-dev \
85 cscope \
86 libsodium-dev \
87 )
88 fi
89 sudo apt update && sudo apt install -y "${PKGS[@]}"
Bram Moolenaar9aff9702020-12-21 13:37:28 +010090
ichizokdee78e12021-12-09 21:08:01 +000091 - name: Install clang-13
Bram Moolenaar9aff9702020-12-21 13:37:28 +010092 if: matrix.compiler == 'clang'
93 run: |
94 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
95 . /etc/lsb-release
ichizokdee78e12021-12-09 21:08:01 +000096 sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main"
97 sudo apt-get install -y clang-13 llvm-13
98 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
99 sudo update-alternatives --set clang /usr/bin/clang-13
100 sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100
ichizok0d47ad42022-01-11 13:05:26 +0000101 sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100102
103 - name: Set up environment
104 run: |
105 mkdir -p "${LOG_DIR}"
106 mkdir -p "${HOME}/bin"
107 echo "${HOME}/bin" >> $GITHUB_PATH
108 (
109 echo "LINUX_VERSION=$(uname -r)"
110 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
111 echo "SND_DUMMY_DIR=${HOME}/snd-dummy"
112 echo "TMPDIR=${{ runner.temp }}"
113
114 case "${{ matrix.features }}" in
115 tiny|small)
116 echo "TEST=testtiny"
117 if ${{ contains(matrix.extra, 'nogui') }}; then
118 echo "CONFOPT=--disable-gui"
119 fi
120 ;;
121 normal)
122 ;;
123 huge)
124 echo "TEST=scripttests test_libvterm"
125 echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
126 ;;
127 esac
128
129 if ${{ matrix.coverage == true }}; then
James McCoy2e258bd2021-10-05 19:44:04 +0100130 CFLAGS="$CFLAGS --coverage -DUSE_GCOV_FLUSH"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100131 echo "LDFLAGS=--coverage"
132 fi
James McCoy2e258bd2021-10-05 19:44:04 +0100133 if ${{ matrix.uchar == true }}; then
134 CFLAGS="$CFLAGS -funsigned-char"
135 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100136 if ${{ contains(matrix.extra, 'testgui') }}; then
137 echo "TEST=-C src testgui"
138 fi
139 if ${{ contains(matrix.extra, 'unittests') }}; then
140 echo "TEST=unittests"
141 fi
142 if ${{ contains(matrix.extra, 'asan') }}; then
143 echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
144 echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
145 echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
146 echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
147 fi
148 if ${{ contains(matrix.extra, 'vimtags') }}; then
149 echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
150 fi
James McCoy2e258bd2021-10-05 19:44:04 +0100151 echo "CFLAGS=$CFLAGS"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100152 ) >> $GITHUB_ENV
153
154 - name: Set up system
155 run: |
156 if [[ ${CC} = clang ]]; then
157 # Use llvm-cov instead of gcov when compiler is clang.
158 ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
159 fi
160 # Setup lua5.3 manually since its package doesn't provide alternative.
161 # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
162 if [[ ${CONFOPT} =~ luainterp ]]; then
163 sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
164 fi
165 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
166 sudo usermod -a -G audio "${USER}"
167 sudo bash ci/setup-xvfb.sh
168
169 - name: Cache snd-dummy
170 uses: actions/cache@v2
171 with:
172 path: ${{ env.SND_DUMMY_DIR }}
173 key: linux-${{ env.LINUX_VERSION }}-snd-dummy
174
175 - name: Set up snd-dummy
176 run: |
177 if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
178 bash ci/build-snd-dummy.sh
179 fi
180 cd "${SND_DUMMY_DIR}"
181 sudo insmod soundcore.ko
182 sudo insmod snd.ko
183 sudo insmod snd-pcm.ko
184 sudo insmod snd-dummy.ko
185
186 - name: Check autoconf
187 if: contains(matrix.extra, 'unittests')
188 run: |
189 make -C src autoconf
190
191 - name: Set up shadow dir
192 if: matrix.shadow
193 run: |
194 make -C src shadow
195 echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
196 echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
197
198 - name: Configure
199 run: |
200 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
201 # Append various warning flags to CFLAGS.
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100202 sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
203 sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000204 if [[ ${CC} = clang ]]; then
205 # Suppress some warnings produced by clang 12 and later.
206 sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
207 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100208
209 - name: Build
210 if: (!contains(matrix.extra, 'unittests'))
211 run: |
212 make ${SHADOWOPT} -j${NPROC}
213
214 - name: Check version
215 if: (!contains(matrix.extra, 'unittests'))
216 run: |
217 "${SRCDIR}"/vim --version
218 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
219 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
220
221 - name: Test
222 timeout-minutes: 20
223 run: |
224 do_test() { sg audio "sg $(id -gn) '$*'"; }
225 do_test make ${SHADOWOPT} ${TEST}
226
ichizok0d47ad42022-01-11 13:05:26 +0000227 # - name: Coveralls
228 # if: matrix.coverage && success() && github.event_name != 'pull_request'
229 # env:
230 # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
231 # COVERALLS_PARALLEL: true
232 # TRAVIS_JOB_ID: ${{ github.run_id }}
233 # run: |
234 # sudo apt-get install -y python3-setuptools python3-wheel
235 # sudo -H pip3 install pip -U
236 # # needed for https support for coveralls building cffi only works with gcc, not with clang
237 # CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
238 # ~/.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 +0100239
ichizok0d47ad42022-01-11 13:05:26 +0000240 - name: Generate gcov files
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100241 if: matrix.coverage && success()
Bram Moolenaare5492602020-12-22 19:05:33 +0100242 run: |
243 cd "${SRCDIR}"
ichizok0d47ad42022-01-11 13:05:26 +0000244 find . -type f -name '*.gcno' -exec gcov -pb {} + || true
245
246 - name: Codecov
247 if: matrix.coverage && success()
248 uses: codecov/codecov-action@v2
249 with:
250 flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100251
252 - name: ASan logs
253 if: contains(matrix.extra, 'asan') && !cancelled()
254 run: |
255 for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
ichizok0d47ad42022-01-11 13:05:26 +0000256 asan_symbolize -l "$f"
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100257 false # in order to fail a job
258 done
259
ichizok0d47ad42022-01-11 13:05:26 +0000260 # coveralls:
261 # runs-on: ubuntu-18.04
Bram Moolenaar18fefdd2021-09-19 17:55:16 +0200262 #
ichizok0d47ad42022-01-11 13:05:26 +0000263 # needs: linux
264 # if: always() && github.event_name != 'pull_request'
Bram Moolenaar18fefdd2021-09-19 17:55:16 +0200265 #
ichizok0d47ad42022-01-11 13:05:26 +0000266 # steps:
267 # - name: Parallel finished
268 # env:
269 # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
270 # run: |
271 # 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 +0100272
273 macos:
274 runs-on: macos-latest
275
276 env:
ichizok48c01962021-12-11 17:34:19 +0000277 CC: clang
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100278 TEST: test
279 SRCDIR: ./src
280 LEAK_CFLAGS: -DEXITFREE
281 TERM: xterm
282
283 strategy:
284 fail-fast: false
285 matrix:
ichizok48c01962021-12-11 17:34:19 +0000286 features: [tiny, normal, huge]
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100287
288 steps:
289 - uses: actions/checkout@v2
290
291 - name: Install packages
ichizok10504762022-01-15 13:37:14 +0000292 if: matrix.features == 'huge'
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100293 env:
294 HOMEBREW_NO_AUTO_UPDATE: 1
295 run: |
296 brew install lua
297 echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
298
299 - name: Set up environment
300 run: |
301 (
302 echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
303 case "${{ matrix.features }}" in
304 tiny)
305 echo "TEST=testtiny"
306 echo "CONFOPT=--disable-gui"
307 ;;
ichizok48c01962021-12-11 17:34:19 +0000308 normal)
309 ;;
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100310 huge)
311 echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
312 ;;
313 esac
314 ) >> $GITHUB_ENV
315
316 - name: Configure
317 run: |
318 ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
319 # Append various warning flags to CFLAGS.
320 # BSD sed needs backup extension specified.
321 sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
322 # On macOS, the entity of gcc is clang.
323 sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
ichizokdee78e12021-12-09 21:08:01 +0000324 # Suppress some warnings produced by clang 12 and later.
325 if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
326 sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
327 fi
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100328
329 - name: Build
Bram Moolenaar9aff9702020-12-21 13:37:28 +0100330 env:
Bram Moolenaared1e4c92020-12-28 15:46:47 +0100331 LC_ALL: C
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100332 run: |
333 make -j${NPROC}
334
335 - name: Check version
336 run: |
337 "${SRCDIR}"/vim --version
338 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
339 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
340
341 - name: Test
342 timeout-minutes: 20
343 run: |
344 make ${TEST}
345
346 windows:
347 runs-on: windows-latest
348
349 env:
350 VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
351 # Interfaces
352 # Lua
353 LUA_VER: 54
354 LUA_VER_DOT: '5.4'
355 LUA_RELEASE: 5.4.0
356 LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
357 LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
358 LUA_DIR: D:\Lua
359 # Python 2
360 PYTHON_VER: 27
361 PYTHON_VER_DOT: '2.7'
362 # Python 3
363 PYTHON3_VER: 38
364 PYTHON3_VER_DOT: '3.8'
365 # Other dependencies
366 # winpty
367 WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
368 # Escape sequences
369 COL_RED: "\x1b[31m"
370 COL_GREEN: "\x1b[32m"
371 COL_YELLOW: "\x1b[33m"
372 COL_RESET: "\x1b[m"
373
374 strategy:
375 fail-fast: false
376 matrix:
377 toolchain: [msvc, mingw]
378 arch: [x64, x86]
379 features: [HUGE, NORMAL]
380 include:
381 - arch: x64
382 vcarch: amd64
383 warch: x64
384 bits: 64
385 msystem: MINGW64
386 cygreg: registry
387 pyreg: ""
388 - arch: x86
389 vcarch: x86
390 warch: ia32
391 bits: 32
392 msystem: MINGW32
393 cygreg: registry32
394 pyreg: "-32"
395 exclude:
396 - toolchain: msvc
397 arch: x64
398 features: NORMAL
399 - toolchain: mingw
400 arch: x86
401 features: NORMAL
402
403 steps:
Bram Moolenaar53f7fcc2021-07-28 20:10:16 +0200404 - name: Initialize
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100405 id: init
406 shell: bash
407 run: |
408 git config --global core.autocrlf input
409 python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
410 python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
411 echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
412 echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
413
414 - uses: msys2/setup-msys2@v2
415 if: matrix.toolchain == 'mingw'
416 with:
417 msystem: ${{ matrix.msystem }}
418 release: false
419
420 - uses: actions/checkout@v2
421
422 - name: Create a list of download URLs
423 shell: cmd
424 run: |
425 type NUL > urls.txt
426 echo %LUA_RELEASE%>> urls.txt
427 echo %WINPTY_URL%>> urls.txt
428
429 - name: Cache downloaded files
430 uses: actions/cache@v2
431 with:
432 path: downloads
433 key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt') }}
434
435 - name: Download dependencies
436 shell: cmd
437 run: |
438 path C:\Program Files\7-Zip;%path%
439 if not exist downloads mkdir downloads
440
441 echo %COL_GREEN%Download Lua%COL_RESET%
442 call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
443 7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
444
445 echo %COL_GREEN%Download winpty%COL_RESET%
446 call :downloadfile %WINPTY_URL% downloads\winpty.zip
447 7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
448 copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll src\winpty${{ matrix.bits }}.dll
449 copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
450
451 goto :eof
452
453 :downloadfile
454 :: call :downloadfile <URL> <localfile>
455 if not exist %2 (
456 curl -f -L %1 -o %2
457 )
458 if ERRORLEVEL 1 (
459 rem Retry once.
460 curl -f -L %1 -o %2 || exit 1
461 )
462 goto :eof
463
464 - name: Copy src directory to src2
465 shell: cmd
466 run: |
467 xcopy src src2\ /E > nul
468
469 - name: Build (MSVC)
470 if: matrix.toolchain == 'msvc'
471 shell: cmd
472 run: |
473 call "%VCVARSALL%" ${{ matrix.vcarch }}
474 cd src
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100475 if "${{ matrix.features }}"=="HUGE" (
K.Takata47d16662022-01-26 16:20:21 +0000476 nmake -nologo -f Make_mvc.mak ^
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100477 FEATURES=${{ matrix.features }} ^
478 GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
479 DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
480 DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
481 DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
482 ) else (
K.Takata47d16662022-01-26 16:20:21 +0000483 nmake -nologo -f Make_mvc.mak ^
Bram Moolenaar8ea05de2020-12-17 20:27:26 +0100484 FEATURES=${{ matrix.features }} ^
485 GUI=yes IME=yes ICONV=yes VIMDLL=yes
486 )
487 if not exist vim${{ matrix.bits }}.dll (
488 echo %COL_RED%Build failure.%COL_RESET%
489 exit 1
490 )
491
492 - name: Build (MinGW)
493 if: matrix.toolchain == 'mingw'
494 shell: msys2 {0}
495 run: |
496 cd src
497 if [ "${{ matrix.features }}" = "HUGE" ]; then
498 mingw32-make -f Make_ming.mak -j2 \
499 FEATURES=${{ matrix.features }} \
500 GUI=yes IME=yes ICONV=yes VIMDLL=yes \
501 DYNAMIC_LUA=yes LUA=${LUA_DIR} \
502 DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
503 DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
504 STATIC_STDCPLUS=yes
505 else
506 mingw32-make -f Make_ming.mak -j2 \
507 FEATURES=${{ matrix.features }} \
508 GUI=yes IME=yes ICONV=yes VIMDLL=yes \
509 STATIC_STDCPLUS=yes
510 fi
511
512 #- name: Prepare Artifact
513 # shell: cmd
514 # run: |
515 # mkdir artifacts
516 # copy src\*vim.exe artifacts
517 # copy src\vim*.dll artifacts
518 #
519 #- name: Upload Artifact
520 # uses: actions/upload-artifact@v1
521 # with:
522 # name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
523 # path: ./artifacts
524
525 - name: Test
526 shell: cmd
527 timeout-minutes: 20
528 run: |
529 PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
530 call "%VCVARSALL%" ${{ matrix.vcarch }}
531 cd src
532 echo.
533 echo %COL_GREEN%vim version:%COL_RESET%
534 .\vim --version || exit 1
535
536 echo %COL_GREEN%Start testing vim in background.%COL_RESET%
537 start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
538
539 echo %COL_GREEN%Test gvim:%COL_RESET%
540 cd testdir
541 nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
542 cd ..
543
544 echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
545 cd ..\src2\testdir
546 :: Wait about 10 minutes.
547 for /L %%i in (1,1,60) do (
548 if exist done.txt goto exitloop
549 timeout 10 > NUL 2>&1
550 if ERRORLEVEL 1 ping -n 11 localhost > NUL
551 )
552 set timeout=1
553 :exitloop
554
555 echo %COL_GREEN%Test results of vim:%COL_RESET%
556 if exist messages type messages
557 nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
558 if "%timeout%"=="1" (
559 echo %COL_RED%Timed out.%COL_RESET%
560 exit 1
561 )