forked from KangLin/RabbitIm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
182 lines (157 loc) · 7.58 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#TODO:版本变更时,修改成相应的版本
version: '0.1.1.{build}'
image: Visual Studio 2015
environment:
matrix:
##### vs2017 #####
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 15
QT_ROOT: C:/Qt/5.10.0/msvc2017_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/rmmobaayrvpi56xy/artifacts/RABBIT_windows_msvc15_x64_qt5.10.0_Release_v0.0.3-53-g5d56221.zip
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 15
QT_ROOT: C:/Qt/5.9/msvc2017_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/qrb1bfmyfclq3bfj/artifacts/RABBIT_windows_msvc15_x64_qt5.9.3_Release_v0.0.3-53-g5d56221.zip
CMAKE: cmake
##### vs2015 #####
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.10.0/msvc2015_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/8laynp87s0pok16c/artifacts/RABBIT_windows_msvc14_x64_qt5.10.0_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.10.0/msvc2015
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/tf3vlaoilqr9ortj/artifacts/RABBIT_windows_msvc14_x86_qt5.10.0_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.9/msvc2015_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/158abyb9mxju7exk/artifacts/RABBIT_windows_msvc14_x64_qt5.9.3_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.9/msvc2015
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/73ogdx26s6tnf60m/artifacts/RABBIT_windows_msvc14_x86_qt5.9.3_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.8/msvc2015_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/vw4slb2c56948i3b/artifacts/RABBIT_windows_msvc14_x64_qt5.8.0_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.8/msvc2015
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/j8n0cswtlpqcgwpj/artifacts/RABBIT_windows_msvc14_x86_qt5.8.0_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.6/msvc2015_64
RABBIT_CONFIG: Release
RABBIT_ARCH: x64
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/ljab9s77ic288sde/artifacts/RABBIT_windows_msvc14_x64_qt5.6.2_Release_v0.0.3-53-g5d56221.zip
- BUILD_TARGERT: windows_msvc
RABBIT_TOOLCHAIN_VERSION: 14
QT_ROOT: C:/Qt/5.6/msvc2015
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/54rguebr9suvx12r/artifacts/RABBIT_windows_msvc14_x86_qt5.6.2_Release_v0.0.3-53-g5d56221.zip
##### mingw #####
- BUILD_TARGERT: windows_mingw
RABBIT_TOOLCHAIN_VERSION: 530
QT_ROOT: C:/Qt/5.10.0/mingw53_32
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/y32hbwbjdei3fa9w/artifacts/RABBIT_windows_mingw530_x86_qt5.10.0_Release_v0.0.3-50-g1ba427c.zip
- BUILD_TARGERT: windows_mingw
RABBIT_TOOLCHAIN_VERSION: 530
QT_ROOT: C:/Qt/5.9/mingw53_32
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/kfu4fum7a690jvtw/artifacts/RABBIT_windows_mingw530_x86_qt5.9.3_Release_v0.0.3-50-g1ba427c.zip
- BUILD_TARGERT: windows_mingw
RABBIT_TOOLCHAIN_VERSION: 530
QT_ROOT: C:/Qt/5.8/mingw53_32
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/7chrumn1esg8caek/artifacts/RABBIT_windows_mingw530_x86_qt5.8.0_Release_v0.0.3-50-g1ba427c.zip
- BUILD_TARGERT: windows_mingw
RABBIT_TOOLCHAIN_VERSION: 492
QT_ROOT: C:/Qt/5.6/mingw53_32
RABBIT_CONFIG: Release
RABBIT_ARCH: x86
DOWNLOAD_URL: https://ci.appveyor.com/api/buildjobs/whnxjhowqyo1r9yp/artifacts/RABBIT_windows_mingw492_x86_qt5.6.2_Release_v0.0.3-16-gdf93da8.zip
matrix:
fast_finish: false
init:
- set varch=%RABBIT_ARCH%
- set PROJECT_NAME=%APPVEYOR_PROJECT_NAME%
- echo "PROJECT_NAME:%PROJECT_NAME%"
- if "%QT_VERSION%" == "" set QT_VERSION=NO
- if "%RABBIT_ARCH%" == "x64" set varch=amd64
- if "%BUILD_TARGERT%" == "windows_msvc" if %RABBIT_TOOLCHAIN_VERSION% LSS 15 (call "C:\Program Files (x86)\Microsoft Visual Studio %RABBIT_TOOLCHAIN_VERSION%.0\VC\vcvarsall.bat" %varch%) else (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %varch%)
- if "%BUILD_TARGERT%" == "windows_mingw" set MSYSTEM=MINGW32 #设置编译系统为MINGW32
- if NOT "%QT_ROOT%" == "NO" for /f "delims=" %%i in ('%QT_ROOT%/bin/qmake -query QT_VERSION') do (set QT_VERSION=%%i)
- echo QT_VERSION=%QT_VERSION%
- echo QT_ROOT=%QT_ROOT%
- del C:\msys64\usr\bin\link.exe
install:
- for /f "delims=" %%i in ('git describe --tags') do (set BUILD_VERSION=%%i)
- if "%BUILD_VERSION%" == "" for /f "delims=" %%i in ('git rev-parse HEAD') do (set BUILD_VERSION=%%i)
- echo BUILD_VERSION=%BUILD_VERSION%
- C:\msys64\usr\bin\pacman.exe -S --noconfirm unzip expect
- C:\msys64\autorebase.bat
- if "%RABBIT_ARCH%" == "x64" if "%BUILD_TARGERT%" == "windows_mingw" set BUILD_EXIT=TRUE
- if "%RABBIT_ARCH%" == "x86" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" if NOT "%QT_ROOT%" == "NO" set BUILD_EXIT=TRUE
before_build:
- git submodule update --init --recursive
- cd %APPVEYOR_BUILD_FOLDER%
- if "%BUILD_TARGERT%" == "android" C:\msys64\usr\bin\bash.exe %APPVEYOR_BUILD_FOLDER%\ThirdLibrary\build_script\ci\build-install-tools-windows.sh
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- if NOT "%BUILD_EXIT%" == "TRUE" C:\msys64\usr\bin\bash.exe %APPVEYOR_BUILD_FOLDER%\ThirdLibrary\build_script\ci\build.sh
- if NOT "%BUILD_EXIT%" == "TRUE" if "%BUILD_TARGERT%" == "windows_msvc" copy "%APPVEYOR_BUILD_FOLDER%\Install\Install.nsi" "%APPVEYOR_BUILD_FOLDER%\build_%BUILD_TARGERT%" && cd "%APPVEYOR_BUILD_FOLDER%\build_%BUILD_TARGERT%" && "C:\Program Files (x86)\NSIS\makensis.exe" "Install.nsi"
#after_build:
artifacts:
- path: build_${BUILD_TARGERT}/RabbitIM-Setup-*.exe
name: RabbitIM_$(BUILD_TARGERT)$(RABBIT_TOOLCHAIN_VERSION)_$(RABBIT_ARCH)_qt$(QT_VERSION)_$(RABBIT_CONFIG)_$(BUILD_VERSION)
type: zip
test: off
deploy:
#provider: FTP
#protocol: sftp
#host: frs.sourceforge.net
#username: kl222,rabbitim
#密码用这个加密 https://ci.appveyor.com/tools/encrypt
#password:
# secure: 2WEtOQrdty3V3g0aEVvS3Q==
#folder: pfs #link pfs to /home/frs/project/r/ra/rabbitim
#draft: false
#active_mode: false
#on:
#branch: master
- provider: GitHub
#token : https://github.com/settings/tokens password encrypt: https://ci.appveyor.com/tools/encrypt
auth_token:
secure: xgIFN2iAfgj1gsWabdHrmFXvj0rce/ZWtKUwm3aDUNfLGu+kO/q94MYD8a46AbDL
#artifact: RabbitGIS_$(BUILD_TARGERT)$(TOOLCHAIN_VERSION)_$(AUTOBUILD_ARCH)_$(QT_VERSION)_v$(appveyor_build_version)
#draft: true
#prerelease: true
on:
BUILD_TARGERT: windows_msvc
TOOLCHAIN_VERSION: 14
QT_VERSION: qt5.6.2
AUTOBUILD_ARCH: x86
appveyor_repo_tag: true # deploy on tag push only