forked from andlabs/libui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
92 lines (85 loc) · 3.22 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: 'build #{build}'
environment:
matrix:
- arch: 386
libtype: shared
libfiles: libui.dll libui.lib
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- arch: 386
libtype: static
libfiles: libui.lib
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- arch: amd64
libtype: shared
libfiles: libui.dll libui.lib
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- arch: amd64
libtype: static
libfiles: libui.lib
compiler: msvc2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- arch: 386
libtype: static
libfiles: libui.lib
compiler: mingw
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- arch: amd64
libtype: static
libfiles: libui.lib
compiler: mingw
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform:
- x64
# Note: AppVeyor tries to be "helpful" and splits cmd.exe scripts into their constitutent lines to check their error codes. There is no way to switch this off; for true multi-line scripts we have to use PowerShell. But we need to use vcvarsall.bat, so that's out of the question.
install:
# Set Python Version
- set "PYTHON_ROOT=C:\python37-x64"
- if %arch%==386 ( set "PYTHON_ROOT=C:\python37" )
- set "PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%"
# Install Latest Meson
- pip install meson
# Install Ninja
- powershell -Command "Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip -OutFile C:\ninja-win.zip"
- mkdir C:\ninja
- powershell -Command "Expand-Archive -LiteralPath C:\ninja-win.zip -DestinationPath C:\ninja"
- set "PATH=C:\ninja;%PATH%"
# Parameters for the build_script phase, to reduce their noise.
- set "mingwPath=C:\msys64\mingw64\bin"
- set vcvarsallArch=x86
- if %arch%==386 ( set "mingwPath=C:\msys64\mingw32\bin" )
- if %arch%==386 ( set vcvarsallArch=amd64 )
build_script:
- if %compiler%==mingw ( set "PATH=%mingwPath%;%PATH%" )
- if not %compiler%==mingw ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %vcvarsallArch% )
- meson setup build --buildtype=release --default-library=%libtype%
- ninja -C build
after_build:
- set "version=%APPVEYOR_REPO_BRANCH%"
- if %APPVEYOR_REPO_TAG%==true ( set "version=%APPVEYOR_REPO_TAG_NAME%" )
- set "artifact=%version%-windows-%arch%-%compiler%-%libtype%"
- cd build\meson-out
# TODO msvc only?
- if %libtype%==static ( ren libui.a libui.lib )
- copy ..\..\ui.h .
- copy ..\..\ui_windows.h .
# remove unnecessary files
# TODO should we do this on Azure too?
- del libui.exp
- 7z a "%APPVEYOR_BUILD_FOLDER%\libui-%artifact%.zip" %libfiles% ui.h ui_windows.h
- 7z a "%APPVEYOR_BUILD_FOLDER%\examples-%artifact%.zip" controlgallery.exe cpp-multithread.exe datetime.exe drawtext.exe histogram.exe tester.exe timer.exe
- del ui.h ui_windows.h
artifacts:
- path: libui-*.zip
name: libui
- path: examples-*.zip
name: examples
deploy:
provider: GitHub
artifact: libui, examples
auth_token:
secure: li92W7mFAC8HbAVeZN6Ugmo5H1GzKSjr6DXlMniLcCRspKmi2Nz1nlslSa+9sLfo
on:
appveyor_repo_tag: true # deploy on tag push only