diff --git a/.ci/msys_build.bat b/.ci/msys_build.bat new file mode 100644 index 0000000000..bf77b5bd34 --- /dev/null +++ b/.ci/msys_build.bat @@ -0,0 +1,24 @@ +echo on +if "%TARGET%" == "MINGW_32" ( + set ARCH=i686 + set BITS=32 +) else ( + set ARCH=x86_64 + set BITS=64 +) +:: 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% + +mkdir build +cd build +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .. || goto :error +:: FIXME(equalsraf): for now just build nvim and copy DLLs. +:: We can't generate the helptags just yet (#810 fixes this) +mingw32-make nvim_dll_deps VERBOSE=1 || goto :error +bin\nvim --version || goto :error +cd .. + +goto :EOF +:error +exit /b %errorlevel% diff --git a/.ci/msys_build_deps.bat b/.ci/msys_build_deps.bat new file mode 100644 index 0000000000..67e7c69883 --- /dev/null +++ b/.ci/msys_build_deps.bat @@ -0,0 +1,27 @@ +:: 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 +if "%TARGET%" == "MINGW_32" ( + set ARCH=i686 + set BITS=32 +) else ( + set ARCH=x86_64 + set BITS=64 +) +:: 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% + +C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error +C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-python2 mingw-w64-%ARCH%-diffutils" || goto :error + +mkdir .deps +cd .deps +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..\third-party\ || goto :error +mingw32-make VERBOSE=1 || goto :error +cd .. + +goto :EOF +:error +exit /b %errorlevel% diff --git a/appveyor.yml b/appveyor.yml index c5a768cb41..26008bbed3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,27 @@ version: '{build}' skip_tags: true -os: Windows Server 2012 R2 environment: - GYP_MSVS_VERSION: 2015 + # The default cpack in the PATH is not CMake + CPACK: C:\Program Files (x86)\CMake\bin\cpack.exe matrix: - - GENERATOR: Visual Studio 14 Win64 - DEPS_PATH: deps64 - - GENERATOR: Visual Studio 14 - DEPS_PATH: deps32 -matrix: - # Allow builds to fail - allow_failures: - - os: Windows Server 2012 R2 + - TARGET: MINGW_64 + BUILD_DEPS_SCRIPT: .ci\msys_build_deps.bat + BUILD_SCRIPT: .ci\msys_build.bat + - TARGET: MINGW_32 + BUILD_DEPS_SCRIPT: .ci\msys_build_deps.bat + BUILD_SCRIPT: .ci\msys_build.bat install: [] build_script: -# See http://help.appveyor.com/discussions/problems/539-cloning-gyp-fails -- git config --global url."http://".insteadOf https:// -- mkdir %DEPS_PATH% -- cd %DEPS_PATH% -- cmake -G "%GENERATOR%" ..\third-party\ -- cmake --build . -- cd .. +- if defined BUILD_DEPS_SCRIPT call %BUILD_DEPS_SCRIPT% +- call %BUILD_SCRIPT% +# FIXME(equalsraf): don't generate artifacts until the +# build script builds the main target, for now pack bin/ +artifacts: +- path: build/bin +# Build artifacts +#- cd build +#- '"%CPACK%" -G NSIS -C Release' +#- '"%CPACK%" -G ZIP -C Release' +#artifacts: +#- path: build/Neovim.zip +#- path: build/Neovim.exe