forked from GoldenCheetah/GoldenCheetah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
216 lines (189 loc) · 9.38 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
version: ci.{build}
image: Visual Studio 2019
clone_depth: 1
environment:
GC_GOOGLE_CALENDAR_CLIENT_SECRET:
secure: hwjHTrSAMEbKd9PA+5x/zI4x5Uk4KQm1hdfZzkwiu8k=
GC_GOOGLE_DRIVE_CLIENT_ID:
secure: mNqG+pqpMl21ZFVvAMKvhm2rfOdv42fFpnLwfrvX5QqpWVcHEeBuUFeJeUAZfTR0GQGfWfPOEmhb9CG0W1ZJ05TIyb+kTLrWF7iijCiVR6s=
GC_GOOGLE_DRIVE_CLIENT_SECRET:
secure: T+BaB/L7x4dPPf592e0kfw4sTlAslUXl10irJqiUjpY=
GC_GOOGLE_DRIVE_API_KEY:
secure: oxTAhK/kiLUsXdYvITAgzSqeB5FRcL+XANFuAYpoW5P/xBb7XaLbNnL2gyrmzQeG
GC_CLOUD_OPENDATA_SECRET:
secure: 6fPhBiHKvJeOMqXdHGqpkPS+NpUDMczEXjedx8GcjbHr82ISX+gwSuXfOUDLq/S9
GC_WITHINGS_CONSUMER_SECRET:
secure: 86xAkdoQB8mLXq964/lGCp3ElTSF4k3a27R3UUXt3618guWLyBfsEK5Q0+XSOI3Q38w80CTpmNdwejoISv8Ilg==
GC_NOKIA_CLIENT_SECRET:
secure: pvPWraDplrKeRNamt5MKga8fzDmI2+zgFx+y3lsQE6gmBadZU2xkTIc/xCaP7UPv2erNCmKivfMOh2NIcRmqvIHynDoifNVy2P61KyG5v3E=
GC_DROPBOX_CLIENT_SECRET:
secure: 7pCVnVEKKmSU4SZN6IFqUw==
GC_STRAVA_CLIENT_SECRET:
secure: n3cMS1yy709xhSnTeWABMsoAIkJzy5euh3Pw4ehv0BzszJKoWkypF0cyW8RXSm3M
GC_TODAYSPLAN_CLIENT_SECRET:
secure: 7PnFB8cfahFT6LyP64eB7N1vkbwVaULpB2ORmEkn+J75zNB1xxGClFNXSHZ7kXhB
GC_CYCLINGANALYTICS_CLIENT_SECRET:
secure: UY+m3YypNNLUzKyGdrLw8xdCvxuQWRZi9EHS3j1ubLC4qyRL7iEVW6ubumfdh6gT
GC_CLOUD_DB_BASIC_AUTH:
secure: OEBetrOnXjsY7wN8hYqmMj6482oDORmAmCq8PI7mfnfiWE6Z4jB676JvgdNlP98q
GC_CLOUD_DB_APP_NAME:
secure: bpkyuw/BsJw0OrpuBqQwZ46CHbhkbmcjcMttVtfJoZU=
GC_POLARFLOW_CLIENT_SECRET:
secure: h2JdlC1i4QOmwpkz+Xxbrw==
GC_SPORTTRACKS_CLIENT_SECRET:
secure: n6a8nJgqMyg+VsVeoIIR8TFzxyDFVi2w/ggetQk5agY=
GC_RWGPS_API_KEY:
secure: uUtCyF5ByZ1VYJOztUngIA==
init:
# Setup QT 5.14 - 64Bit
- set QTDIR=C:\Qt\5.14\msvc2017_64
- set PATH=%QTDIR%\bin;%PATH%
- qmake --version
# Setup MSVC - VS 2019
- call c:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
# Setup NSIS
- set PATH=%PATH%;C:\"Program Files (x86)"\NSIS
cache:
- gc-ci-libs.zip -> appveyor.yml
- jom_1_1_3.zip
- sip-4.19.8.zip
- C:\R
- C:\Python -> src\Python\requirements.txt
- c:\tools\vcpkg\installed\
- qwt
install:
# Get the libraries
- if not exist gc-ci-libs.zip appveyor DownloadFile "https://github.com/GoldenCheetah/WindowsSDK/releases/download/v0.1.1/gc-ci-libs.zip"
- 7z x -y gc-ci-libs.zip -oC:\libs
# GSL
- vcpkg install gsl:x64-windows
# Get config
- copy qwt\qwtconfig.pri.in qwt\qwtconfig.pri
- copy c:\libs\gcconfig64-Release.appveyor.pri src\gcconfig.pri
# Get jom
- if not exist jom_1_1_3.zip appveyor DownloadFile "https://download.qt.io/official_releases/jom/jom_1_1_3.zip"
- 7z x -y jom_1_1_3.zip -oc:\jom\
- set PATH=%PATH%;c:\jom\;
# Get R and add to config
- ps: >-
if (-not (Test-Path 'C:\R')) {
$rurl = $(ConvertFrom-JSON $(Invoke-WebRequest https://rversions.r-pkg.org/r-release-win).Content).URL
Start-FileDownload $rurl "R-win.exe"
Start-Process -FilePath .\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
}
- set PATH=%PATH%;c:\R\bin\;
- R --version
- echo DEFINES+=GC_WANT_R >> src\gcconfig.pri
# Get Python embeddable and install packages
- ps: >-
if (-not (Test-Path 'C:\Python')) {
Start-FileDownload "https://www.python.org/ftp/python/3.7.9/python-3.7.9-embed-amd64.zip" Python.zip
7z x Python.zip -oC:\Python\
echo python37.zip . '' 'import site' | Out-File C:\Python\python37._pth -Encoding ascii
mkdir C:\Python\lib\site-packages
c:\python37-x64\python -m pip install --upgrade pip
c:\python37-x64\python -m pip install -r src\Python\requirements.txt -t C:\Python\lib\site-packages
}
# Get SIP and and install on Python
- c:\python37-x64\python --version
- if not exist sip-4.19.8.zip appveyor DownloadFile "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip"
- 7z x sip-4.19.8.zip
- cd sip-4.19.8
- c:\python37-x64\python configure.py
- jom -j4
- nmake install
- cd ..
# Add Python (avoiding colision between GC Context.h and Python context.h)
- echo DEFINES+=GC_WANT_PYTHON >> src\gcconfig.pri
- echo PYTHONINCLUDES=-ICore -I\"c:\python37-x64\include\" >> src\gcconfig.pri
- echo PYTHONLIBS=-L\"c:\python37-x64\libs\" -lpython37 >> src\gcconfig.pri
# GSL
- echo GSL_INCLUDES=c:\tools\vcpkg\installed\x64-windows\include >> src\gcconfig.pri
- echo GSL_LIBS=-Lc:\tools\vcpkg\installed\x64-windows\lib -lgsl -lgslcblas >> src\gcconfig.pri
before_build:
# Define GC version string, only for tagged builds
- if %APPVEYOR_REPO_TAG%==true echo DEFINES+=GC_VERSION=VERSION_STRING >> src\gcconfig.pri
# Enable CloudDB
- echo CloudDB=active >> src\gcconfig.pri
# Add Train Robot
- echo DEFINES+=GC_WANT_ROBOT >> src\gcconfig.pri
# Add debug console
#- echo CONFIG+=console >> src\gcconfig.pri
# Patch Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_CALENDAR_CLIENT_SECRET__', $env:GC_GOOGLE_CALENDAR_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_ID__', $env:GC_GOOGLE_DRIVE_CLIENT_ID | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_SECRET__', $env:GC_GOOGLE_DRIVE_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_API_KEY__', $env:GC_GOOGLE_DRIVE_API_KEY | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace 'OPENDATA_DISABLE', 'OPENDATA_ENABLE' | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_OPENDATA_SECRET__', $env:GC_CLOUD_OPENDATA_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_WITHINGS_CONSUMER_SECRET__', $env:GC_WITHINGS_CONSUMER_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_NOKIA_CLIENT_SECRET__', $env:GC_NOKIA_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_DROPBOX_CLIENT_SECRET__', $env:GC_DROPBOX_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_STRAVA_CLIENT_SECRET__', $env:GC_STRAVA_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_TODAYSPLAN_CLIENT_SECRET__', $env:GC_TODAYSPLAN_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CYCLINGANALYTICS_CLIENT_SECRET__', $env:GC_CYCLINGANALYTICS_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_DB_BASIC_AUTH__', $env:GC_CLOUD_DB_BASIC_AUTH | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_DB_APP_NAME__', $env:GC_CLOUD_DB_APP_NAME | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_POLARFLOW_CLIENT_SECRET__', $env:GC_POLARFLOW_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_SPORTTRACKS_CLIENT_SECRET__', $env:GC_SPORTTRACKS_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_RWGPS_API_KEY__', $env:GC_RWGPS_API_KEY | Set-Content src\Core\Secrets.h
build_script:
- qmake.exe build.pro -r -spec win32-msvc
- cd qwt\
- jom -j1
- cd ..
- jom -j4
after_build:
- cd src\release
# copy dependencies
- windeployqt --release GoldenCheetah.exe
- copy c:\libs\10_Precompiled_DLL\usbexpress_3.5.1\USBXpress\USBXpress_API\Host\x64\SiUSBXp.dll
- copy c:\libs\10_Precompiled_DLL\libsamplerate64\lib\libsamplerate-0.dll
- copy c:\libs\10_Precompiled_DLL\VLC\win64\lib\libvlc*.dll
- xcopy /s /i /e /q c:\libs\10_Precompiled_DLL\VLC\win64\plugins plugins
- copy c:\OpenSSL-v111-Win64\bin\lib*.dll
- copy c:\OpenSSL-v111-Win64\license.txt "OpenSSL License.txt"
- xcopy /s /i /e /q C:\Python .
- copy C:\Python\LICENSE.txt "PYTHON LICENSE.txt"
- copy c:\tools\vcpkg\installed\x64-windows\bin\gsl*.dll
# ReadMe, license and icon files
- copy ..\Resources\win32\ReadMe.txt
- echo GoldenCheetah is licensed under the GNU General Public License v2 > license.txt
- echo. >> license.txt
- type ..\..\COPYING >> license.txt
- copy ..\Resources\win32\gc.ico
# Installer script
- copy ..\Resources\win32\GC3.6-Dev-Master-W64-QT5.14.2.nsi
# Build the installer
- makensis GC3.6-Dev-Master-W64-QT5.14.2.nsi
- move GoldenCheetah_v3.6-DEV_64bit_Windows.exe ..\..\GoldenCheetah_v3.6-DEV_x64.exe
- cd ..\..
- ps: Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value false
- ps: if ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[publish binaries\]") { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value true }
test_script:
# minimum test
- src\release\GoldenCheetah --version 2>GCversionWindows.txt
- git log -1 >> GCversionWindows.txt
- ps: CertUtil -hashfile GoldenCheetah_v3.6-DEV_x64.exe sha256 | Select-Object -First 2 | Add-Content GCversionWindows.txt
- type GCversionWindows.txt
artifacts:
- path: GoldenCheetah_v3.6-DEV_x64.exe
name: GCinstaller
- path: GCversionWindows.txt
name: GCversionWindows
deploy:
# deploy continuous builds to s3
- provider: S3
access_key_id:
secure: RoEkfKfOnF7JHOiLZX5qfZM08X+bu4oaDzzSKgdooNM=
secret_access_key:
secure: GPAArawatirYwgpHJBthdrbvyFU5bBzPOdK7VYYPiG2YHYi/DNJZ5Q5qGK1A440p
bucket: goldencheetah-binaries
region: us-east-1
remove_files: true
set_public: true
folder: Windows
artifact: GCinstaller, GCversionWindows
on:
PUBLISH_BINARIES: true
APPVEYOR_REPO_NAME: "GoldenCheetah/GoldenCheetah"