2018-05-04 04:07:32 -05:00
|
|
|
version: 'build #{build}'
|
|
|
|
|
|
|
|
environment:
|
|
|
|
matrix:
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: shared
|
|
|
|
compiler: msvc2013
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: static
|
|
|
|
compiler: msvc2013
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: shared
|
|
|
|
compiler: msvc2015
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: static
|
|
|
|
compiler: msvc2015
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: shared
|
|
|
|
compiler: msvc2017
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: static
|
|
|
|
compiler: msvc2017
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
2018-05-15 03:51:05 -05:00
|
|
|
- linking: static
|
|
|
|
compiler: mingw
|
2018-05-04 04:07:32 -05:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
|
|
|
|
2018-05-15 03:51:05 -05:00
|
|
|
platform:
|
|
|
|
- Win32
|
|
|
|
- x64
|
2018-05-04 04:07:32 -05:00
|
|
|
|
|
|
|
before_build:
|
2018-05-18 08:08:14 -05:00
|
|
|
- |
|
|
|
|
if %compiler%==msvc2013 ( set "CMAKE_GENERATOR=Visual Studio 12 2013" && if %platform%==x64 ( call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 && call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 ) else ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 ) )
|
|
|
|
else if %compiler%==msvc2015 ( set "CMAKE_GENERATOR=Visual Studio 14 2015" && if %platform%==x64 ( call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 ) else ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 ) )
|
|
|
|
else if %compiler%==msvc2017 ( set "CMAKE_GENERATOR=Visual Studio 15 2017" && if %platform%==x64 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" ) else ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" ) )
|
2018-05-15 03:51:05 -05:00
|
|
|
else if %compiler%==mingw ( set "CMAKE_GENERATOR=MinGW Makefiles" )
|
|
|
|
- if %compiler%-%platform%==mingw-Win32 ( set "PATH=C:\msys64\mingw32\bin;%PATH%" )
|
|
|
|
else if %compiler%-%platform%==mingw-x64 ( set "PATH=C:\msys64\mingw64\bin;%PATH%" )
|
|
|
|
else if %platform%==x64 ( set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64" )
|
|
|
|
- if %linking%==static ( set CMAKE_FLAGS=-DBUILD_SHARED_LIBS=OFF )
|
2018-05-18 07:56:42 -05:00
|
|
|
- if %compiler%==mingw ( set "outdir=build\out" ) else ( set "outdir=build\out" )
|
|
|
|
- if not %compiler%==mingw ( set "CMAKE_GENERATOR=NMake Makefiles JOM" )
|
|
|
|
- if not %compiler%==mingw ( set "CMAKE_FLAGS=-DCMAKE_BUILD_TYPE=Release %CMAKE_FLAGS%" )
|
2018-05-15 03:51:05 -05:00
|
|
|
- ren "C:\Program Files\Git\usr\bin\sh.exe" _sh.exe
|
2018-05-18 07:56:42 -05:00
|
|
|
- set "simultaneous=1"
|
2018-05-04 04:07:32 -05:00
|
|
|
|
|
|
|
build_script:
|
2018-05-15 03:51:05 -05:00
|
|
|
- md build && cd build
|
2018-05-18 07:59:48 -05:00
|
|
|
- if not %compiler%==mingw ( md jom && cd jom && curl -L -o jom.zip http://download.qt.io/official_releases/jom/jom.zip && 7z x jom.zip && cd .. )
|
2018-05-15 03:51:05 -05:00
|
|
|
- cmake -G "%CMAKE_GENERATOR%" %CMAKE_FLAGS% ..
|
2018-05-17 23:05:19 -05:00
|
|
|
- if %compiler%==mingw ( mingw32-make -j%simultaneous% tester examples )
|
2018-05-18 07:56:42 -05:00
|
|
|
else ( jom\jom -j%simultaneous% )
|
2018-05-15 07:10:20 -05:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2018-05-04 04:07:32 -05:00
|
|
|
|
|
|
|
after_build:
|
2018-05-16 20:55:04 -05:00
|
|
|
- if %platform%==x64 ( set "arch=amd64" ) else ( set "arch=386" )
|
2018-05-15 07:10:20 -05:00
|
|
|
- if %APPVEYOR_REPO_TAG%==true ( set "version=%APPVEYOR_REPO_TAG_NAME%" )
|
|
|
|
else ( set "version=%APPVEYOR_REPO_BRANCH%" )
|
2018-05-16 20:55:04 -05:00
|
|
|
- if %linking%==shared ( set "artifact=shared" ) else ( set "artifact=%compiler%-static" )
|
|
|
|
- set "artifact=%version%-windows-%arch%-%artifact%"
|
2018-05-16 21:04:46 -05:00
|
|
|
- del .\%outdir%\libui.exp # remove unnecessary files
|
2018-05-15 07:10:20 -05:00
|
|
|
- 7z a libui-%artifact%.zip .\%outdir%\libui.* ui.h ui_windows.h
|
|
|
|
- 7z l libui-%artifact%.zip
|
|
|
|
- 7z a examples-%artifact%.zip .\%outdir%\*.exe
|
|
|
|
- 7z l examples-%artifact%.zip
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
- path: libui-*.zip
|
|
|
|
name: libui
|
|
|
|
- path: examples-*.zip
|
|
|
|
name: examples
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: GitHub
|
|
|
|
artifact: libui, examples
|
2018-05-16 20:55:04 -05:00
|
|
|
# TODO https://www.appveyor.com/docs/deployment/github/
|
|
|
|
#auth_token:
|
|
|
|
#secure: "2l/602m6FkqAB9TTIAkPX3Erfwg9jVTlf/Inmf2dWcbOrJJzK/WrCUIgY3B4ngly"
|
2018-05-15 07:10:20 -05:00
|
|
|
on:
|
|
|
|
appveyor_repo_tag: true # deploy on tag push only
|