aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2016-07-29 10:12:10 +0100
committerRui Abreu Ferreira <rap-ep@gmx.com>2016-08-01 12:57:58 +0100
commitf53c8258bed7354678e5e355efa2acc471deb11a (patch)
treed2beeecb86f1137ef82be2baf2c5de82f1ab247c
parent55682710a90ab5a70696dcca4567f640c30aab7d (diff)
downloadrneovim-f53c8258bed7354678e5e355efa2acc471deb11a.tar.gz
rneovim-f53c8258bed7354678e5e355efa2acc471deb11a.tar.bz2
rneovim-f53c8258bed7354678e5e355efa2acc471deb11a.zip
MinGW Appveyor builds
- Build for MinGW x86/x86_64. Move build scripts out of the yml file into separate batch files. - The MinGW builds use MSYS to get runtime dependencies, but they do not link against the POSIX adaptation layer. - For now only build the nvim.exe binary, but not the helptags.
-rw-r--r--.ci/msys_build.bat24
-rw-r--r--.ci/msys_build_deps.bat27
-rw-r--r--appveyor.yml38
3 files changed, 72 insertions, 17 deletions
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