2017-12-20 17:58:32 +08:00
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2017-12-27 01:49:54 +08:00
version : 2.19 .0 -{build}
2017-12-20 17:58:32 +08:00
2017-12-26 12:27:22 +08:00
max_jobs : 4
2017-12-20 17:58:32 +08:00
pull_requests :
do_not_increment_build_number : true
2017-12-24 09:34:34 +08:00
environment :
2017-12-24 10:18:52 +08:00
matrix :
2017-12-27 04:31:20 +08:00
- LUA_VERSION : 5.3 .4
LLVM_VERSION : 4.0 .0
2017-12-26 00:44:04 +08:00
- LUA_VERSION : 5.3 .4
MINGW_VERSION : 6.3 .0
- LUA_VERSION : 5.3 .4
MINGW_VERSION : 5.3 .0
2017-12-26 12:27:22 +08:00
- LUA_VERSION : 5.3 .4
- LUA_VERSION : 5.2 .4
- LUA_VERSION : 5.1 .5
2017-12-20 17:58:32 +08:00
2017-12-27 04:31:20 +08:00
image :
- Visual Studio 2017
- Visual Studio 2015
platform :
- x86
- x64
2017-12-26 00:44:04 +08:00
matrix :
allow_failures :
2017-12-26 12:27:22 +08:00
# oldest compiler is allowed to fail here due to esoteric bugs
2017-12-26 00:44:04 +08:00
- MINGW_VERSION : 5.3 .0
2017-12-26 12:27:22 +08:00
# 32-bit builds are temperamental with exceptions
- platform : x86
2017-12-26 00:44:04 +08:00
exclude :
2017-12-26 14:11:09 +08:00
# Necessary: MinGW doesn't exist on VS 2017 images
- image : Visual Studio 2017
MINGW_VERSION : 6.3 .0
- image : Visual Studio 2017
MINGW_VERSION : 5.3 .0
# Get rid of x86 builds
2017-12-26 09:18:29 +08:00
- platform : x86
LUA_VERSION : 5.2 .4
- platform : x86
LUA_VERSION : 5.1 .5
2017-12-26 09:24:26 +08:00
- platform : x86
2017-12-26 00:44:04 +08:00
MINGW_VERSION : 5.3 .0
2017-12-26 14:11:09 +08:00
# Get rid of redundant Visual Studio 2015 builds
2017-12-26 12:27:22 +08:00
- image : Visual Studio 2015
LUA_VERSION : 5.1 .5
- image : Visual Studio 2015
LUA_VERSION : 5.2 .4
2017-12-26 00:44:04 +08:00
2017-12-20 17:58:32 +08:00
init :
2017-12-26 09:18:29 +08:00
# make sure we have Ninja
2017-12-26 09:24:26 +08:00
- set top_level=%cd%
- cd ..
2017-12-26 09:18:29 +08:00
- md tools
- cd tools
- set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -o%cd%\ninja
- set PATH=%cd%\ninja;%PATH%
2017-12-26 09:24:26 +08:00
- cd "%top_level%"
2017-12-26 09:18:29 +08:00
# configure the generator appropriately
2017-12-20 17:58:32 +08:00
- set arch=
2017-12-24 09:34:34 +08:00
- if "%PLATFORM%"=="x64" (set arch= Win64)
2017-12-20 17:58:32 +08:00
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
2017-12-26 21:04:54 +08:00
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (set CMAKE_GENERATOR=Visual Studio 15 2017%arch%&&set parallelism=/maxcpucount&&set logger=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (set CMAKE_GENERATOR=Visual Studio 14 2015%arch%&&set parallelism=/maxcpucount&&set logger=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (set CMAKE_GENERATOR=Visual Studio 12 2013%arch%&&set parallelism=/maxcpucount&&set logger=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
2017-12-27 04:31:20 +08:00
- if "%MINGW_VERSION%"=="5.3.0" (set CMAKE_GENERATOR=Ninja%%set build_type=-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_C_COMPILER=gcc.exe)
- if "%MINGW_VERSION%"=="6.3.0" (set CMAKE_GENERATOR=Ninja&&set build_type=-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_C_COMPILER=gcc.exe)
- if "%LLVM_VERSION%"=="4.0.0" (set CMAKE_GENERATOR=Ninja&&set build_type=-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang-cl.exe -DCMAKE_C_COMPILER=clang-cl.exe)
2017-12-26 09:18:29 +08:00
# print out useful information
- ninja --version
- cmake --version
2017-12-27 04:31:20 +08:00
- if DEFINED LLVM_VERSION (clang-cl -v)
- if DEFINED MINGW_VERSION (g++ --version)
2017-12-26 09:18:29 +08:00
- echo cmake generator -- "%CMAKE_GENERATOR%"
2017-12-20 17:58:32 +08:00
2017-12-26 00:44:04 +08:00
# We need to use CMAKE_BUILD_TYPE=Release since there are no "configuration"
# toolsets for Ninja or Makefiles as far as cmake is concerned, so
# the --config / -C switches on builds do nothing...!
2017-12-20 17:58:32 +08:00
before_build :
2017-12-26 00:44:04 +08:00
- set python_path=C:\Python36
- set mingw_path=
2017-12-27 04:31:20 +08:00
- set llvm_path=
2017-12-26 00:44:04 +08:00
- if "%MINGW_VERSION%"=="5.3.0" (set mingw_path=C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0)
- if "%MINGW_VERSION%"=="6.3.0" ( if "%PLATFORM%"=="x64" (set mingw_path=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1) else ( set mingw_path=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1))
2017-12-27 04:31:20 +08:00
- if "%LLVM_VERSION%"=="4.0.0" (set llvm_path=C:\Program Files\LLVM\bin)
2017-12-26 00:44:04 +08:00
- if "%PLATFORM%"=="x64" (set python_path=C:\Python36-x64)
- set PATH=%python_path%;%PATH%
2017-12-27 01:49:54 +08:00
- set PATH=%mingw_path%;%PATH%
2017-12-27 04:31:20 +08:00
- set PATH=%llvm_path%;%PATH%
- echo PATH=%PATH%
2017-12-24 09:34:34 +08:00
- md build-sol2
- cd build-sol2
2017-12-26 00:44:04 +08:00
- cmake .. -G "%CMAKE_GENERATOR%" %build_type% -DLUA_VERSION="%LUA_VERSION%" -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DTESTS_SINGLE=ON
2017-12-20 17:58:32 +08:00
2017-12-26 00:44:04 +08:00
# We do not build the debug versions because the compiler
# generates too much debug info for MinGW to handle
# TODO: fix the damn compilation space and time already
2017-12-24 10:36:31 +08:00
build_script :
2017-12-26 21:04:54 +08:00
- if NOT "%build_type%"=="-DCMAKE_BUILD_TYPE=Release" (cmake --build . --config Debug -- %parallelism% %logger%)
- cmake --build . --config Release -- %parallelism% %logger%
2017-12-24 09:34:34 +08:00
test_script :
2017-12-26 00:44:04 +08:00
- if NOT "%build_type%"=="-DCMAKE_BUILD_TYPE=Release" (ctest -C Debug --output-on-failure)
2017-12-24 16:24:07 +08:00
- ctest -C Release --output-on-failure
2017-12-24 10:18:52 +08:00
notifications :
- provider : Webhook
2017-12-25 01:32:23 +08:00
url : https://webhooks.gitter.im/e/1af10e654a918bef7f1e
2017-12-24 10:18:52 +08:00
method : POST
2017-12-25 01:32:23 +08:00
on_build_success : false
on_build_failure : false
on_build_status_changed : true