libui/.appveyor.yml

73 lines
2.6 KiB
YAML
Raw Normal View History

version: 'build #{build}'
environment:
matrix:
2018-05-15 03:51:05 -05:00
- linking: shared
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
2018-05-15 03:51:05 -05:00
- linking: static
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
2018-05-15 03:51:05 -05:00
- linking: shared
compiler: msvc2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
2018-05-15 03:51:05 -05:00
- linking: static
compiler: msvc2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
2018-05-15 03:51:05 -05:00
- linking: shared
compiler: msvc2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2018-05-15 03:51:05 -05:00
- linking: static
compiler: msvc2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2018-05-15 03:51:05 -05:00
- linking: static
compiler: mingw
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
2018-05-15 03:51:05 -05:00
platform:
- Win32
- x64
before_build:
2018-05-15 03:51:05 -05:00
- if %compiler%==msvc2013 ( set "CMAKE_GENERATOR=Visual Studio 12 2013" )
else if %compiler%==msvc2015 ( set "CMAKE_GENERATOR=Visual Studio 14 2015" )
else if %compiler%==msvc2017 ( set "CMAKE_GENERATOR=Visual Studio 15 2017" )
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-15 07:10:20 -05:00
- if %compiler%==mingw ( set "outdir=build\out" ) else ( set "outdir=build\out\Release" )
2018-05-15 03:51:05 -05:00
- ren "C:\Program Files\Git\usr\bin\sh.exe" _sh.exe
build_script:
2018-05-15 03:51:05 -05:00
- md build && cd build
- cmake -G "%CMAKE_GENERATOR%" %CMAKE_FLAGS% ..
- if %compiler%==mingw ( mingw32-make tester examples )
else ( msbuild libui.sln /t:Build /p:Configuration=Release /p:Platform=%platform% )
2018-05-15 07:10:20 -05:00
- cd %APPVEYOR_BUILD_FOLDER%
after_build:
2018-05-15 03:51:05 -05:00
- if %platform%==x64 ( set "platform=amd64" ) else ( set "platform=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%" )
- set "artifact=%linking%-windows-%compiler%-%platform%-%version%"
- 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
auth_token:
secure: "2l/602m6FkqAB9TTIAkPX3Erfwg9jVTlf/Inmf2dWcbOrJJzK/WrCUIgY3B4ngly"
on:
appveyor_repo_tag: true # deploy on tag push only