forked from CE-Programming/CEmu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
144 lines (117 loc) · 5.79 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# AppVeyor CI config
image:
- Visual Studio 2019
environment:
BINTRAY_API_KEY:
secure: AGZJlJvqTJR3lySeBoANrPYyWfgLJciSqTZm3/ZEPbUx4dQ9m1fiWGY3RYBGaYOq
BINTRAY_API_USERNAME:
secure: QyZ6LhunNhgW3l/1aiGROg==
GOOGLE_URL_SHORTENER_API_KEY:
secure: yPv9WtzW+27giJAicFEXGV0KENiee+3+BG2CIOLarbu5wsm7q/h0Ixqsq70CITPi
QT5_BIN_DIR_DYNAMIC_32: C:\Qt\5.15.0\msvc2019\bin
QT5_BIN_DIR_DYNAMIC_64: C:\Qt\5.15.0\msvc2019_64\bin
QT5_BIN_DIR_STATIC_32: C:\Qt\Qt5.15.0-static\bin
QT5_BIN_DIR_STATIC_64: C:\Qt\Qt5.15.0x64-static\bin
APPVEYOR_SAVE_CACHE_ON_ERROR: true
install:
- echo AppVeyor Build Image = %APPVEYOR_BUILD_WORKER_IMAGE%
- echo Directories...
- echo - QT5_BIN_DIR_DYNAMIC_32 = %QT5_BIN_DIR_DYNAMIC_32%
- echo - QT5_BIN_DIR_DYNAMIC_64 = %QT5_BIN_DIR_DYNAMIC_64%
- echo - QT5_BIN_DIR_STATIC_32 = %QT5_BIN_DIR_STATIC_32%
- echo - QT5_BIN_DIR_STATIC_64 = %QT5_BIN_DIR_STATIC_64%
- git submodule update --init --recursive
- C:\Python35\Scripts\pip install requests jinja2 irc
- C:\Python35\python -u gui\qt\deploy-scripts\appveyor_helper.py install
# Leverage vcpkg to install libarchive deps, because we're lazy
# Make sure we set the special VCPKG_PLATFORM_TOOLSET var to v141
# because we build with MSVS 2019 (appveyor project config)
- cmd: set VCPKG_PLATFORM_TOOLSET=v141
# Update vcpkg to make things work
- cd "C:\Tools\vcpkg"
- git fetch
- git checkout 2020.06
- .\bootstrap-vcpkg.bat
- cd %APPVEYOR_BUILD_FOLDER%
# Install libarchive for all targets
- vcpkg install libarchive:x86-windows --recurse
- vcpkg install libarchive:x64-windows --recurse
- vcpkg install libarchive:x86-windows-static --recurse
- vcpkg install libarchive:x64-windows-static --recurse
# Install libpng-apng for all targets
- vcpkg install libpng[core,apng]:x86-windows --recurse
- vcpkg install libpng[core,apng]:x64-windows --recurse
- vcpkg install libpng[core,apng]:x86-windows-static --recurse
- vcpkg install libpng[core,apng]:x64-windows-static --recurse
build_script:
# Figure out version to set - if tag is defined, use that.
# If not, set it to a space (which would evaluate to empty in our QMake command).
- cmd: if defined APPVEYOR_REPO_TAG_NAME (set CEMU_VERSION=%APPVEYOR_REPO_TAG_NAME% & echo Using tagged version %CEMU_VERSION%) ELSE (set "CEMU_VERSION= " & echo No version defined, using empty version '%CEMU_VERSION%' and allowing QMake to set default for dev.)
- md build_32
- md build_64
- md build_static_32
- md build_static_64
- cd %APPVEYOR_BUILD_FOLDER%
- setlocal
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=amd64 -vcvars_ver=14.1 -no_logo
# Since we want to use vcpkg, ensure that it's integrated into the
# build environment.
- c:\tools\vcpkg\vcpkg integrate install
- cd build_32
- '%QT5_BIN_DIR_DYNAMIC_32%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Debug
- '%QT5_BIN_DIR_DYNAMIC_32%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Release
- cd ..
- cd build_static_32
- '%QT5_BIN_DIR_STATIC_32%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Debug /p:VcpkgTriplet=x86-windows-static
- '%QT5_BIN_DIR_STATIC_32%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Release /p:VcpkgTriplet=x86-windows-static
- cd ..
- endlocal
- setlocal
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -vcvars_ver=14.1 -no_logo
# Since we want to use vcpkg, ensure that it's integrated into the
# build environment.
- c:\tools\vcpkg\vcpkg integrate install
- cd build_64
- '%QT5_BIN_DIR_DYNAMIC_64%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Debug /p:Platform="x64"
- '%QT5_BIN_DIR_DYNAMIC_64%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Release /p:Platform="x64"
- cd ..
- cd build_static_64
- '%QT5_BIN_DIR_STATIC_64%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Debug /p:Platform="x64" /p:VcpkgTriplet=x64-windows-static
- '%QT5_BIN_DIR_STATIC_64%\qmake -spec win32-msvc -tp vc CEMU_VERSION=%CEMU_VERSION% LIBPNG_APNG_FROM_VCPKG=1 "..\gui\qt\CEmu.pro"'
- msbuild CEmu.vcxproj /p:Configuration=Release /p:Platform="x64" /p:VcpkgTriplet=x64-windows-static
- cd ..
- endlocal
after_build:
- cd %APPVEYOR_BUILD_FOLDER%
- C:\Python35\python -u gui\qt\deploy-scripts\appveyor_helper.py deploy
cache:
- build_state -> appveyor.yml, appveyor.yml.cache
- c:\tools\vcpkg\installed\ -> appveyor.yml.cache
artifacts:
- path: deploy\*-win32-release-static*.zip
name: static_32_release
type: zip
- path: deploy\*-win64-release-static*.zip
name: static_64_release
type: zip
deploy:
# Required to only send updated stuff to our manually created tag
# aka don't try to create a new one
tag: $(appveyor_repo_tag_name)
release: $(appveyor_repo_tag_name)
provider: GitHub
auth_token:
secure: nT2ApY5FbhZtGKrIWzgH9UYsFi/otN56t3fdwusTjo7Gc3pk+L8VMoLf9lbAL+Ol
artifact: static_32_release,static_64_release
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only