forked from z3ntu/RazerGenie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
57 lines (50 loc) · 2.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
os: Visual Studio 2017
environment:
matrix:
- arch: x86
compiler: msvc2017
- arch: x64
compiler: msvc2017
platform:
- x64
install:
# Download ninja
- cmd: mkdir C:\ninja-build
- ps: (new-object net.webclient).DownloadFile('https://github.com/mesonbuild/cidata/raw/master/ninja.exe', 'C:\ninja-build\ninja.exe')
# Set paths to dependencies (based on architecture)
- cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python37) else (set PYTHON_ROOT=C:\python37-x64)
- cmd: if %arch%==x86 (set QT_ROOT=C:\Qt\5.12\%compiler%) else (set QT_ROOT=C:\Qt\5.12\%compiler%_64)
# Print out dependency paths
- cmd: echo Using Python at %PYTHON_ROOT%
- cmd: echo Using Qt at %QT_ROOT%
# Add necessary paths to PATH variable
- cmd: set PATH=%cd%;C:\ninja-build;%QT_ROOT%\bin;%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%
# Install meson
- cmd: pip install meson
# Set up the build environment
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch% )
build_script:
- cmd: echo Building on %arch% with %compiler%
- cmd: meson --backend=ninja -Dbuildtype=release -Ddefault_library=static builddir
- cmd: ninja -C builddir
after_build:
# Zip build binaries and dependencies
- cmd: mkdir .\RazerGenie
- cmd: copy %APPVEYOR_BUILD_FOLDER%\builddir\src\RazerGenie.exe .\RazerGenie\
- cmd: copy %QT_ROOT%\bin\Qt5Core.dll .\RazerGenie\
- cmd: copy %QT_ROOT%\bin\Qt5DBus.dll .\RazerGenie\
- cmd: copy %QT_ROOT%\bin\Qt5Gui.dll .\RazerGenie\
- cmd: copy %QT_ROOT%\bin\Qt5Network.dll .\RazerGenie\
- cmd: copy %QT_ROOT%\bin\Qt5Widgets.dll .\RazerGenie\
- cmd: mkdir .\RazerGenie\platforms
- cmd: copy %QT_ROOT%\plugins\platforms\qwindows.dll .\RazerGenie\platforms
- cmd: 7z a RazerGenie_%compiler%_%arch%.zip .\RazerGenie\*
artifacts:
- path: RazerGenie*.zip
notifications:
- provider: Slack
incoming_webhook: https://webhooks.t2bot.io/api/v1/matrix/hook/gEsoLVFFgp4PURc6iR8IhdQAFhOslmSzfy35y4DEtGL0a5QKIXPIGKUFaJsWkJ7F
on_build_success: false
on_build_failure: true
on_build_status_changed: true