2016-07-29 02:12:10 -07:00
|
|
|
:: These are native MinGW builds, but they use the toolchain inside
|
|
|
|
:: MSYS2, this allows using all the dependencies and tools available
|
|
|
|
:: in MSYS2, but we cannot build inside the MSYS2 shell.
|
|
|
|
echo on
|
2016-08-25 22:38:46 -07:00
|
|
|
if "%CONFIGURATION%" == "MINGW_32" (
|
2017-01-15 06:45:14 -07:00
|
|
|
set ARCH=i686
|
|
|
|
set BITS=32
|
2016-07-29 02:12:10 -07:00
|
|
|
) else (
|
2017-01-15 06:45:14 -07:00
|
|
|
set ARCH=x86_64
|
|
|
|
set BITS=64
|
2016-07-29 02:12:10 -07:00
|
|
|
)
|
2017-08-15 02:06:51 -07:00
|
|
|
if "%CONFIGURATION%" == "MINGW_64-gcov" (
|
|
|
|
set USE_GCOV="-DUSE_GCOV=ON"
|
|
|
|
)
|
|
|
|
|
2016-07-29 02:12:10 -07:00
|
|
|
:: We cannot have sh.exe in the PATH (MinGW)
|
|
|
|
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
|
|
|
set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH%
|
2016-08-25 22:38:46 -07:00
|
|
|
:: The default cpack in the PATH is not CMake
|
|
|
|
set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%
|
2016-07-29 02:12:10 -07:00
|
|
|
|
2016-08-25 22:38:46 -07:00
|
|
|
:: Build third-party dependencies
|
2016-07-29 02:12:10 -07:00
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error
|
2017-03-17 17:06:47 -07:00
|
|
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error
|
2016-09-02 05:03:55 -07:00
|
|
|
|
2017-01-15 06:45:14 -07:00
|
|
|
:: Setup python (use AppVeyor system python)
|
|
|
|
C:\Python27\python.exe -m pip install neovim || goto :error
|
|
|
|
C:\Python35\python.exe -m pip install neovim || goto :error
|
|
|
|
:: Disambiguate python3
|
|
|
|
move c:\Python35\python.exe c:\Python35\python3.exe
|
|
|
|
set PATH=C:\Python35;C:\Python27;%PATH%
|
|
|
|
:: Sanity check
|
|
|
|
python -c "import neovim; print(str(neovim))" || goto :error
|
|
|
|
python3 -c "import neovim; print(str(neovim))" || goto :error
|
2016-07-29 02:12:10 -07:00
|
|
|
|
|
|
|
mkdir .deps
|
|
|
|
cd .deps
|
2017-05-03 06:50:11 -07:00
|
|
|
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error
|
2016-07-29 02:12:10 -07:00
|
|
|
mingw32-make VERBOSE=1 || goto :error
|
|
|
|
cd ..
|
|
|
|
|
2016-08-25 22:38:46 -07:00
|
|
|
:: Build Neovim
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2017-08-15 02:06:51 -07:00
|
|
|
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error
|
2016-08-25 22:38:46 -07:00
|
|
|
mingw32-make VERBOSE=1 || goto :error
|
|
|
|
bin\nvim --version || goto :error
|
2016-08-14 16:01:04 -07:00
|
|
|
|
|
|
|
:: Functional tests
|
|
|
|
mingw32-make functionaltest VERBOSE=1 || goto :error
|
2016-08-25 22:38:46 -07:00
|
|
|
|
2017-08-15 02:06:51 -07:00
|
|
|
if defined USE_GCOV (
|
2017-08-14 05:30:59 -07:00
|
|
|
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'"
|
|
|
|
)
|
|
|
|
|
2016-08-25 22:38:46 -07:00
|
|
|
:: Build artifacts
|
2017-05-03 06:50:11 -07:00
|
|
|
cpack -G ZIP -C RelWithDebInfo
|
|
|
|
if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo
|
2016-08-25 22:38:46 -07:00
|
|
|
|
2016-07-29 02:12:10 -07:00
|
|
|
goto :EOF
|
|
|
|
:error
|
|
|
|
exit /b %errorlevel%
|