Patch 9.0.0436
Problem: CI: running tests in parallel causes flakiness.
Solution: Reorganize the MS-Windows runs. (Ken Takata, closes #11101)
Files: .github/workflows/ci.yml, src/errors.h, src/gui_w32.c,
src/os_win32.c
*** ../vim-9.0.0435/.github/workflows/ci.yml 2022-09-09 10:51:14.411772415
+0100
--- .github/workflows/ci.yml 2022-09-10 12:56:54.251976543 +0100
***************
*** 382,416 ****
strategy:
fail-fast: false
matrix:
- toolchain: [msvc, mingw]
- arch: [x64, x86]
- features: [HUGE, NORMAL]
include:
! - arch: x64
! vcarch: amd64
! warch: x64
! bits: 64
! msystem: MINGW64
! cygreg: registry
! pyreg: ""
! - arch: x86
! vcarch: x86
! warch: ia32
! bits: 32
! msystem: MINGW32
! cygreg: registry32
! pyreg: "-32"
! - toolchain: mingw
! arch: x64
! features: HUGE
! coverage: yes
! exclude:
! - toolchain: msvc
! arch: x64
! features: NORMAL
! - toolchain: mingw
! arch: x86
! features: NORMAL
steps:
- name: Initialize
--- 382,396 ----
strategy:
fail-fast: false
matrix:
include:
! - { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: no,
arch: x64 }
! - { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: yes,
arch: x86, coverage: yes }
! - { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: yes,
arch: x86 }
! - { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: no,
arch: x64, coverage: yes }
! - { features: NORMAL, toolchain: msvc, VIMDLL: yes, GUI: no,
arch: x86 }
! - { features: NORMAL, toolchain: mingw, VIMDLL: no, GUI: yes,
arch: x64 }
! - { features: TINY, toolchain: msvc, VIMDLL: yes, GUI: yes,
arch: x64 }
! - { features: TINY, toolchain: mingw, VIMDLL: no, GUI: no,
arch: x86 }
steps:
- name: Initialize
***************
*** 418,430 ****
shell: bash
run: |
git config --global core.autocrlf input
! echo "VCVARSALL=$(vswhere -products \* -latest -property
installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
! if [ "${{ matrix.arch }}" = "x86" ]; then
! choco install python2 --forcex86
else
! choco install python2
fi
! python3_dir=$(cat "/proc/${{ matrix.cygreg
}}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{
matrix.pyreg }}/InstallPath/@")
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
--- 398,429 ----
shell: bash
run: |
git config --global core.autocrlf input
!
! if [ "${{ matrix.arch }}" = "x64" ]; then
! cygreg=registry
! pyreg=
! echo "VCARCH=amd64" >> $GITHUB_ENV
! echo "WARCH=x64" >> $GITHUB_ENV
! echo "BITS=64" >> $GITHUB_ENV
! echo "MSYSTEM=MINGW64" >> $GITHUB_ENV
else
! cygreg=registry32
! pyreg=-32
! echo "VCARCH=x86" >> $GITHUB_ENV
! echo "WARCH=ia32" >> $GITHUB_ENV
! echo "BITS=32" >> $GITHUB_ENV
! echo "MSYSTEM=MINGW32" >> $GITHUB_ENV
fi
!
! echo "VCVARSALL=$(vswhere -products \* -latest -property
installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
! if [ "${{ matrix.features }}" != "TINY" ]; then
! if [ "${{ matrix.arch }}" = "x86" ]; then
! choco install python2 --forcex86
! else
! choco install python2
! fi
! fi
! python3_dir=$(cat
"/proc/$cygreg/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}$pyreg/InstallPath/@")
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
***************
*** 434,440 ****
install: tar
pacboy: >-
make:p gcc:p
! msystem: ${{ matrix.msystem }}
release: false
- name: Checkout repository from github
--- 433,439 ----
install: tar
pacboy: >-
make:p gcc:p
! msystem: ${{ env.MSYSTEM }}
release: false
- name: Checkout repository from github
***************
*** 451,457 ****
uses: actions/cache@v3
with:
path: downloads
! key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt')
}}
- name: Download dependencies
shell: cmd
--- 450,456 ----
uses: actions/cache@v3
with:
path: downloads
! key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt')
}}
- name: Download dependencies
shell: cmd
***************
*** 460,473 ****
if not exist downloads mkdir downloads
echo %COL_GREEN%Download Lua%COL_RESET%
! call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
echo %COL_GREEN%Download winpty%COL_RESET%
call :downloadfile %WINPTY_URL% downloads\winpty.zip
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
! copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll
src\winpty${{ matrix.bits }}.dll
! copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
goto :eof
--- 459,472 ----
if not exist downloads mkdir downloads
echo %COL_GREEN%Download Lua%COL_RESET%
! call :downloadfile %LUA${{ env.BITS }}_URL% downloads\lua.zip
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
echo %COL_GREEN%Download winpty%COL_RESET%
call :downloadfile %WINPTY_URL% downloads\winpty.zip
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
! copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
! copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
goto :eof
***************
*** 482,512 ****
)
goto :eof
- - name: Copy src directory to src2
- shell: cmd
- run: xcopy src src2\ /E > nul
-
- name: Build (MSVC)
if: matrix.toolchain == 'msvc'
shell: cmd
run: |
! call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src
if "${{ matrix.features }}"=="HUGE" (
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
! GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
) else (
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
! GUI=yes IME=yes ICONV=yes VIMDLL=yes
! )
! if not exist vim${{ matrix.bits }}.dll (
! echo %COL_RED%Build failure.%COL_RESET%
! exit 1
)
- name: Build (MinGW)
--- 481,508 ----
)
goto :eof
- name: Build (MSVC)
if: matrix.toolchain == 'msvc'
shell: cmd
run: |
! call "%VCVARSALL%" %VCARCH%
cd src
+ if "${{ matrix.VIMDLL }}"=="yes" (
+ set GUI=yes
+ ) else (
+ set GUI=${{ matrix.GUI }}
+ )
if "${{ matrix.features }}"=="HUGE" (
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
! GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} ^
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
) else (
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
! GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }}
)
- name: Build (MinGW)
***************
*** 514,523 ****
shell: msys2 {0}
run: |
cd src
if [ "${{ matrix.features }}" = "HUGE" ]; then
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
! GUI=yes IME=yes ICONV=yes VIMDLL=yes \
DYNAMIC_LUA=yes LUA=${LUA_DIR_SLASH} \
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
--- 510,524 ----
shell: msys2 {0}
run: |
cd src
+ if [ "${{ matrix.VIMDLL }}" = "yes" ]; then
+ GUI=yes
+ else
+ GUI=${{ matrix.GUI }}
+ fi
if [ "${{ matrix.features }}" = "HUGE" ]; then
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
! GUI=$GUI IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} \
DYNAMIC_LUA=yes LUA=${LUA_DIR_SLASH} \
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
***************
*** 525,541 ****
else
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
! GUI=yes IME=yes ICONV=yes VIMDLL=yes \
STATIC_STDCPLUS=yes
fi
- name: Check version
shell: cmd
run: |
! PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem
}}\bin;%PATH%;%PYTHON3_DIR%
! src\vim --version || exit 1
! src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim
-c quit
! src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim
-c quit
#- name: Prepare Artifact
# shell: cmd
--- 526,552 ----
else
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
! GUI=$GUI IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} \
STATIC_STDCPLUS=yes
fi
- name: Check version
shell: cmd
run: |
! PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%
! if "${{ matrix.GUI }}"=="yes" (
! start /wait src\gvim -u NONE -i NONE -c "redir > version.txt |
ver | q" || exit 1
! type version.txt
! echo.
! start /wait src\gvim -u NONE -i NONE -c "redir! > version.txt |
so ci\if_ver-1.vim | q"
! start /wait src\gvim -u NONE -i NONE -c "redir >> version.txt |
so ci\if_ver-2.vim | q"
! type version.txt
! del version.txt
! ) else (
! src\vim --version || exit 1
! src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim
-c quit
! src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim
-c quit
! )
#- name: Prepare Artifact
# shell: cmd
***************
*** 550,600 ****
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- - name: Copy gcov data files to src2
- if: matrix.coverage
- shell: msys2 {0}
- run: find src -name '*.gcno' | tar -c -T - | tar -x -C src2
--strip-components 1
-
- name: Test and show the result of testing gVim
shell: cmd
! timeout-minutes: 20
run: |
! PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem
}}\bin;%PATH%;%PYTHON3_DIR%
! call "%VCVARSALL%" ${{ matrix.vcarch }}
!
! echo %COL_GREEN%Start testing Vim in background.%COL_RESET%
! start cmd /c "cd src2\testdir & nmake -nologo -f Make_mvc.mak
VIMPROG=..\..\src\vim > nul & echo done>done.txt"
echo %COL_GREEN%Test gVim:%COL_RESET%
cd src\testdir
! nmake -nologo -f Make_mvc.mak VIMPROG=..\gvim || exit 1
! - name: Show the result of testing Vim
shell: cmd
! timeout-minutes: 20
run: |
! PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem
}}\bin;%PATH%;%PYTHON3_DIR%
! call "%VCVARSALL%" ${{ matrix.vcarch }}
! echo %COL_GREEN%Wait for Vim tests to finish.%COL_RESET%
! cd src2\testdir
! :: Wait about 10 minutes.
! for /L %%i in (1,1,60) do (
! if exist done.txt goto exitloop
! timeout 10 > NUL 2>&1
! if ERRORLEVEL 1 ping -n 11 localhost > NUL
! )
! set timeout=1
! :exitloop
!
! echo %COL_GREEN%The result of testing Vim:%COL_RESET%
! cd src2\testdir
! if exist messages type messages
! nmake -nologo -f Make_mvc.mak report VIMPROG=..\..\src\vim || exit 1
!
! if "%timeout%"=="1" (
! echo %COL_RED%Timed out.%COL_RESET%
! exit 1
)
- name: Generate gcov files
--- 561,599 ----
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- name: Test and show the result of testing gVim
+ if: matrix.GUI == 'yes' || matrix.VIMDLL == 'yes'
shell: cmd
! timeout-minutes: 15
run: |
! PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%
! call "%VCVARSALL%" %VCARCH%
echo %COL_GREEN%Test gVim:%COL_RESET%
cd src\testdir
! if "${{ matrix.GUI }}"=="yes" (
! nmake -nologo -f Make_mvc.mak VIMPROG=..\gvim || exit 1
! ) else (
! @rem Run only tiny tests.
! nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\gvim || exit 1
! )
! - name: Test and show the result of testing Vim
! if: matrix.GUI == 'no' || matrix.VIMDLL == 'yes'
shell: cmd
! timeout-minutes: 15
run: |
! PATH %LUA_DIR%;C:\msys64\%MSYSTEM%\bin;%PATH%;%PYTHON3_DIR%
! call "%VCVARSALL%" %VCARCH%
! echo %COL_GREEN%Test Vim:%COL_RESET%
! cd src\testdir
! nmake -nologo -f Make_mvc.mak clean
! if "${{ matrix.GUI }}"=="no" (
! nmake -nologo -f Make_mvc.mak VIMPROG=..\vim || exit 1
! ) else (
! @rem Run only tiny tests.
! nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\vim || exit 1
)
- name: Generate gcov files
***************
*** 603,621 ****
run: |
cd src
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- cd ../src2
- find . -type f -name '*.gcno' -exec gcov -pb {} + || true
! - name: Codecov (gVim)
if: matrix.coverage
uses: codecov/[email protected]
with:
directory: src
- flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{
matrix.features }}-gui
-
- - name: Codecov (Vim)
- if: matrix.coverage
- uses: codecov/[email protected]
- with:
- directory: src2
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{
matrix.features }}
--- 602,611 ----
run: |
cd src
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
! - name: Codecov
if: matrix.coverage
uses: codecov/[email protected]
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{
matrix.features }}
*** ../vim-9.0.0435/src/errors.h 2022-09-09 21:35:17.835126936 +0100
--- src/errors.h 2022-09-10 12:56:54.251976543 +0100
***************
*** 2011,2021 ****
INIT(= N_("E795: Cannot delete variable"));
EXTERN char e_cannot_delete_variable_str[]
INIT(= N_("E795: Cannot delete variable %s"));
// E796
- # ifdef MSWIN
EXTERN char e_writing_to_device_disabled_with_opendevice_option[]
INIT(= N_("writing to device disabled with 'opendevice' option"));
- # endif
#endif
#ifdef FEAT_SPELL
EXTERN char e_spellfilemising_autocommand_deleted_buffer[]
--- 2011,2021 ----
INIT(= N_("E795: Cannot delete variable"));
EXTERN char e_cannot_delete_variable_str[]
INIT(= N_("E795: Cannot delete variable %s"));
+ #endif
+ #ifdef MSWIN
// E796
EXTERN char e_writing_to_device_disabled_with_opendevice_option[]
INIT(= N_("writing to device disabled with 'opendevice' option"));
#endif
#ifdef FEAT_SPELL
EXTERN char e_spellfilemising_autocommand_deleted_buffer[]
*** ../vim-9.0.0435/src/gui_w32.c 2022-09-07 19:03:37.204182098 +0100
--- src/gui_w32.c 2022-09-10 12:56:54.251976543 +0100
***************
*** 198,206 ****
# ifndef __MINGW32__
# include <shellapi.h>
# endif
! # if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL_GUI) ||
defined(FEAT_GUI_TABLINE)
! # include <commctrl.h>
! # endif
# include <windowsx.h>
#endif // PROTO
--- 198,204 ----
# ifndef __MINGW32__
# include <shellapi.h>
# endif
! # include <commctrl.h>
# include <windowsx.h>
#endif // PROTO
*** ../vim-9.0.0435/src/os_win32.c 2022-09-05 21:45:08.317861536 +0100
--- src/os_win32.c 2022-09-10 12:56:54.251976543 +0100
***************
*** 2834,2840 ****
return;
// Extract the first icon contained in the Vim executable.
! if (mch_icon_load((HANDLE *)&g_hVimIcon) == FAIL || g_hVimIcon == NULL)
g_hVimIcon = ExtractIcon(NULL, (LPCSTR)exe_name, 0);
if (g_hVimIcon != NULL)
g_fCanChangeIcon = TRUE;
--- 2834,2844 ----
return;
// Extract the first icon contained in the Vim executable.
! if (
! # ifdef FEAT_LIBCALL
! mch_icon_load((HANDLE *)&g_hVimIcon) == FAIL ||
! # endif
! g_hVimIcon == NULL)
g_hVimIcon = ExtractIcon(NULL, (LPCSTR)exe_name, 0);
if (g_hVimIcon != NULL)
g_fCanChangeIcon = TRUE;
*** ../vim-9.0.0435/src/version.c 2022-09-10 12:35:56.983208759 +0100
--- src/version.c 2022-09-10 12:58:41.267715856 +0100
***************
*** 705,706 ****
--- 705,708 ----
{ /* Add new patch number below this line */
+ /**/
+ 436,
/**/
--
The users that I support would double-click on a landmine to find out
what happens. -- A system administrator
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220910120451.AE1FD1C0D18%40moolenaar.net.