Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Clean up Appveyor YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr authored and stigrj committed Sep 11, 2018
1 parent 9028810 commit 3e74bfe
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 26 deletions.
53 changes: 29 additions & 24 deletions .appveyor.yml
@@ -1,48 +1,53 @@
# See http://msdn.microsoft.com/en-us/library/ms164311.aspx for
# command-line options to MSBuild.

# Speeding up a Visual Studio build.
# http://blogs.msdn.com/b/vcblog/archive/2011/01/05/damn-my-vc-project-is-building-slower-in-vs2010-what-do-i-do-now-a-step-by-step-guide.aspx
version: 'build-{build}-{branch}'

platform: x86
platform: x64

build:
parallel: true

cache:
- c:\msys64\var\cache\pacman\pkg -> .ci\install.bat

image:
- Visual Studio 2017

environment:
# Create expected SHELL variable for pipenv.
SHELL: "windows"
SHELL: 'windows'
CTEST_OUTPUT_ON_FAILURE: '1'
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
MSYSTEM: MINGW64
GENERATOR: "MSYS Makefiles"
- CMAKE_GENERATOR: 'MSYS Makefiles'
BUILDFLAGS: 'VERBOSE=1'
TESTTARGET: 'test'
CXXFLAGS: ''
- CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64'
BUILDFLAGS: '/verbosity:normal'
TESTTARGET: 'RUN_TESTS'
CXXFLAGS: ''

matrix:
fast_finish: true

init:
- set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%

cache:
- c:\msys64\var\cache\pacman\pkg
- c:\tools\vcpkg\installed\
- set PATH=C:\msys64\MINGW64\bin;C:\msys64\usr\bin;%PATH%
- set PATH=C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%
# Remove Python 2.7 from path
- set PATH=%PATH:C:\Python27;=%
- set PATH=%PATH:C:\Python27\Scripts;=%

install:
- pacman -S --needed --noconfirm pacman-mirrors
- pacman -Syuu --needed --noconfirm --ask=127
- pacman -S --noconfirm mingw64/mingw-w64-x86_64-boost
- python -m pip install pipenv
- pipenv install
- '%APPVEYOR_BUILD_FOLDER%\.ci\install.bat'
- pipenv install --three

before_build:
- pipenv run python --version
- cmake --version
- pipenv --version

build_script:
- pipenv run python setup --cxx=g++ --generator="%GENERATOR%" --prefix="C:\Software\getkw"
- cd build
- cmake --build . --target install
- ctest --parallel 2 --output-on-failure --verbose
- pipenv run python setup --generator="%CMAKE_GENERATOR%" --prefix="C:\Software\getkw"
- pipenv run cmake --build build --config Debug -- "%BUILDFLAGS%"
- pipenv run cmake --build build --target install --config Debug
- pipenv run cmake --build build --target "%TESTTARGET%" --config Debug

deploy: off
29 changes: 29 additions & 0 deletions .ci/install.bat
@@ -0,0 +1,29 @@
rem Finally found a use for De Morgan's laws of boolean algebra!
rem We can't use logical OR in IF statements, so we check for the negation of
rem the AND (implicit when chaining IF-s) of the negation of each separate statement
set nonVSGenerator=true
if not "%CMAKE_GENERATOR%"=="Ninja" if not "%CMAKE_GENERATOR%"=="MSYS Makefiles" set nonVSGenerator=false

if "%nonVSGenerator%"=="true" (
echo "Using non-VS generator %CMAKE_GENERATOR%"
echo "Let's get MSYS64 working"

rem upgrade the msys2 platform
bash -c "pacman -S --needed --noconfirm pacman-mirrors"

rem --ask=127 is taken from https://github.com/appveyor/ci/issues/2074#issuecomment-364842018
bash -c "pacman -Syuu --needed --noconfirm --ask=127"

rem search for packages with
rem bash "pacman -Ss boost"

rem more packages
bash -c "pacman -S --noconfirm mingw64/mingw-w64-x86_64-boost"
) else (
echo "Using VS generator %CMAKE_GENERATOR%"
echo "Let's get VcPkg working"

cd c:\tools\vcpkg
vcpkg integrate install
cd %APPVEYOR_BUILD_FOLDER%
)
1 change: 0 additions & 1 deletion CMakeLists.txt
Expand Up @@ -59,7 +59,6 @@ include(autocmake_custom_color_messages)
include(autocmake_default_build_paths)
include(autocmake_definitions)
include(autocmake_python_interpreter)
include(autocmake_python_libs)
include(autocmake_safeguards)
include(autocmake_code_coverage)
include(getkw)
Expand Down
1 change: 0 additions & 1 deletion cmake/autocmake.yml
Expand Up @@ -16,7 +16,6 @@ modules:
- '%(url_root)modules/default_build_paths.cmake'
- '%(url_root)modules/definitions.cmake'
- '%(url_root)modules/python_interpreter.cmake'
- '%(url_root)modules/python_libs.cmake'
- '%(url_root)modules/safeguards.cmake'
- '%(url_root)modules/code_coverage.cmake'
- custom:
Expand Down

0 comments on commit 3e74bfe

Please sign in to comment.