comparison ci/appveyor.bat @ 31748:0c7d833308c7 v9.0.1206

patch 9.0.1206: testing with Python on AppVeyor does not work properly Commit: https://github.com/vim/vim/commit/5a57a5e209bff2bc11bfde69184bbfb0362c0b99 Author: Christopher Plewright <chris@createng.com> Date: Mon Jan 16 13:01:28 2023 +0000 patch 9.0.1206: testing with Python on AppVeyor does not work properly Problem: Testing with Python on AppVeyor does not work properly. Solution: Fix typo. Move most lines to the .bat file. (Christopher Plewright, closes #11828)
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Jan 2023 14:15:03 +0100
parents 4fac5d2c5a3c
children
comparison
equal deleted inserted replaced
31747:f1f2cc4c50bc 31748:0c7d833308c7
1 @echo off 1 @echo off
2 :: Batch file for building/testing Vim on AppVeyor 2 :: Batch file for building/testing Vim on AppVeyor
3 set target=%1
3 4
4 setlocal ENABLEDELAYEDEXPANSION 5 setlocal ENABLEDELAYEDEXPANSION
5 cd %APPVEYOR_BUILD_FOLDER% 6 cd %APPVEYOR_BUILD_FOLDER%
6 7
7 :: Python3 8 :: Python3
8 set PYTHON3_VER=311 9 set PYTHON3_VER=311
9 set PYTHON3_RELEASE=3.11.1 10 set PYTHON3_RELEASE=3.11.1
10 set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe 11 set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
11 set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64 12 set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
12 13
14 set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
15
16 if exist "%VSWHERE%" (
17 for /f "usebackq delims=" %%i in (
18 `"%VSWHERE%" -products * -latest -property installationPath`
19 ) do (
20 set "VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
21 )
22 )
23
24 if not exist "%VCVARSALL%" (
25 set "VCVARSALL=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
26 )
27 call "%VCVARSALL%" x64
28
29 goto %target%
30 echo Unknown build target.
31 exit 1
32
33 :: ----------------------------------------------------------------------------
34 :install
35 @echo on
13 if not exist downloads mkdir downloads 36 if not exist downloads mkdir downloads
14 37
15 :: Python 3 38 :: Python 3
16 if not exist %PYTHON3_DIR% ( 39 if not exist %PYTHON3_DIR% (
17 call :downloadfile %PYTHON3_URL% downloads\python3.exe 40 call :downloadfile %PYTHON3_URL% downloads\python3.exe
18 cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0 41 cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^
42 Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^
43 AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
44 InstallLauncherAllUsers=0
19 ) 45 )
46 @echo off
47 goto :eof
48
49 :: ----------------------------------------------------------------------------
50 :build
20 51
21 cd src 52 cd src
22 53
23 echo "Building MSVC 64bit console Version" 54 echo "Building MSVC 64bit console Version"
24 nmake -f Make_mvc.mak CPU=AMD64 ^ 55 nmake -f Make_mvc.mak CPU=AMD64 ^
51 82
52 echo "version output MSVC console" 83 echo "version output MSVC console"
53 .\vim --version || exit 1 84 .\vim --version || exit 1
54 echo "version output MSVC GUI" 85 echo "version output MSVC GUI"
55 type ver_msvc.txt || exit 1 86 type ver_msvc.txt || exit 1
56 cd ..
57 87
58 goto :eof 88 goto :eof
59 :: ----------------------------------------------------------------------
60 89
90 :: ----------------------------------------------------------------------------
91 :test
92 @echo on
93 cd src/testdir
94 :: Testing with MSVC gvim
95 path %PYTHON3_DIR%;%PATH%
96 nmake -f Make_mvc.mak VIMPROG=..\gvim
97 nmake -f Make_mvc.mak clean
98 :: Testing with MSVC console version
99 nmake -f Make_mvc.mak VIMPROG=..\vim
100
101 @echo off
102 goto :eof
103
104 :: ----------------------------------------------------------------------------
61 :downloadfile 105 :downloadfile
62 :: call :downloadfile <URL> <localfile> 106 :: call :downloadfile <URL> <localfile>
63 if not exist %2 ( 107 if not exist %2 (
64 curl -f -L %1 -o %2 108 curl -f -L %1 -o %2
65 ) 109 )