aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Abreu Ferreira <equalsraf@users.noreply.github.com>2016-08-26 06:38:46 +0100
committerJustin M. Keyes <justinkz@gmail.com>2016-08-26 01:38:46 -0400
commiteb2d547bd5a34c4c3355c671c417440b72b64ebf (patch)
tree115a2ece384b3639c547830f0a02dd06251273dc
parent48dbb75ff698058e1c9e395385a6ca0b9a4e92d8 (diff)
downloadrneovim-eb2d547bd5a34c4c3355c671c417440b72b64ebf.tar.gz
rneovim-eb2d547bd5a34c4c3355c671c417440b72b64ebf.tar.bz2
rneovim-eb2d547bd5a34c4c3355c671c417440b72b64ebf.zip
build: Refactor appveyor/Windows scripts (#5244)
- Join all msys build scripts into one - Clean up appveyor.yml and generate installer for tagged builds A side effect of the cosmetic changes is that appveyor artifact permalinks are easier to use, e.g. for the latest zip in the master branch https://ci.appveyor.com/api/projects/neovim/neovim/artifacts/build/Neovim.zip?branch=master&job=Configuration%3A%20MINGW_64
-rw-r--r--.ci/build.bat (renamed from .ci/msys_build_deps.bat)18
-rw-r--r--.ci/msys_build.bat22
-rw-r--r--appveyor.yml22
3 files changed, 22 insertions, 40 deletions
diff --git a/.ci/msys_build_deps.bat b/.ci/build.bat
index 67e7c69883..2f545fbe82 100644
--- a/.ci/msys_build_deps.bat
+++ b/.ci/build.bat
@@ -2,7 +2,7 @@
:: 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" (
+if "%CONFIGURATION%" == "MINGW_32" (
set ARCH=i686
set BITS=32
) else (
@@ -12,7 +12,10 @@ if "%TARGET%" == "MINGW_32" (
:: 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%
+:: The default cpack in the PATH is not CMake
+set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%
+:: Build third-party dependencies
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
@@ -22,6 +25,19 @@ cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..\third-party\ || goto :e
mingw32-make VERBOSE=1 || goto :error
cd ..
+:: Build Neovim
+mkdir build
+cd build
+cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .. || goto :error
+mingw32-make VERBOSE=1 || goto :error
+bin\nvim --version || goto :error
+cd ..
+
+:: Build artifacts
+cd build
+cpack -G ZIP -C Release
+if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C Release
+
goto :EOF
:error
exit /b %errorlevel%
diff --git a/.ci/msys_build.bat b/.ci/msys_build.bat
deleted file mode 100644
index 490c8b6830..0000000000
--- a/.ci/msys_build.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-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
-mingw32-make VERBOSE=1 || goto :error
-bin\nvim --version || goto :error
-cd ..
-
-goto :EOF
-:error
-exit /b %errorlevel%
diff --git a/appveyor.yml b/appveyor.yml
index 53a0ca5eb3..600b246be2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,22 +1,10 @@
version: '{build}'
-skip_tags: true
-environment:
- # The default cpack in the PATH is not CMake
- CPACK: C:\Program Files (x86)\CMake\bin\cpack.exe
- matrix:
- - 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
+configuration:
+- MINGW_64
+- MINGW_32
install: []
build_script:
-- if defined BUILD_DEPS_SCRIPT call %BUILD_DEPS_SCRIPT%
-- call %BUILD_SCRIPT%
-# Build artifacts
-- cd build
-- '"%CPACK%" -G NSIS -C Release'
-- '"%CPACK%" -G ZIP -C Release'
+- call .ci\build.bat
artifacts:
- path: build/Neovim.zip
+- path: build/Neovim.exe