diff --git a/.appveyor.yml b/.appveyor.yml index f2f3dea..ef8e915 100644 --- a/.appveyor.yml +++ b/.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 diff --git a/.ci/install.bat b/.ci/install.bat new file mode 100644 index 0000000..fa34e17 --- /dev/null +++ b/.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% +) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fe68d1..c740513 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/autocmake.yml b/cmake/autocmake.yml index 9e40d1d..bfdd21b 100644 --- a/cmake/autocmake.yml +++ b/cmake/autocmake.yml @@ -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: