forked from GPSBabel/gpsbabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
126 lines (118 loc) · 5.62 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
version: 1.0.{build}
environment:
matrix:
# MinGW gui builds fail with Qt newer than 5.6 as webkit and webengine are missing.
# MinGW
# - name: win32
# platform: mingw
# qt: 5.5\mingw492_32
# tools: mingw492_32
# MinGW
# - name: win32
# platform: mingw
# qt: 5.6\mingw49_32
# tools: mingw492_32
# do a build with the minimum level of Qt we support.
# appveyor dropped Qt 5.7 with msvc2015.
# MSVC x32
# - name: win32
# platform: x86
# qt: 5.7\msvc2015
# MSVC x32
- name: win32
platform: x86
qt: 5.9\msvc2015
# MSVC x64
- name: win64
platform: amd64
qt: 5.9\msvc2015_64
init:
- if %platform%==mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if %platform%==mingw set PATH=C:\Qt\Tools\%tools%\bin;%PATH%
- set PATH=C:\Qt\%qt%\bin;%PATH%
- if not %platform%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform%
build_script:
- ps: |
# be aware that vcvarsall will reset platform amd64 to X64!
echo "platform: $env:platform"
echo "qt: $env:qt"
qmake -query
Get-Location
if (($env:platform -eq "mingw") -and ($env:qt -eq "5.5\mingw492_32"))
{
# windeployqt in 5.5.1 suffers from bug
# https://bugreports.qt.io/browser/QTBUG-48946
# which trashes the translations. Work around
# by using the next version of windeployqt which had this
# bug fixed.
& ".\tools\make_windows_release.ps1" -windeployqt "C:\Qt\5.6\mingw49_32\bin\windeployqt.exe"
$verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
+ '-' + (git rev-parse --short=7 HEAD)
Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Setup.exe" }
Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Manifest.txt" }
}
elseif (($env:platform -eq "x86") -and ($env:qt -eq "5.9\msvc2015"))
{
# full build and deploy of our release configuration
& ".\tools\make_windows_release.ps1" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_MSVC2015_32bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_MSVC2015_32bit-Release" -mkspec win32-msvc -mkcmd nmake.exe
$verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
+ '-' + (git rev-parse --short=7 HEAD)
Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Setup.exe" }
Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Manifest.txt" }
}
elseif ($env:platform -eq "mingw")
{
qmake GPSBabel.pro
mingw32-make
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
else
{
qmake GPSBabel.pro
nmake
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
# work around issue with standard error output causing a build failure by making sure last command succeeds.
# see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status
Write-Host "Finished build_script"
test_script:
- ps: |
$env:projdir=(C:\msys64\usr\bin\bash.exe -c "pwd")
C:\msys64\usr\bin\bash.exe -lc "echo $env:projdir"
# work around issue with standard error output from xmllint causing a build failure by redirecting stderr.
# in this case making sure the last command succeeds is not sufficient.
# see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; PNAME=./release/GPSBabel.exe GBTEMP=./gbtemp ./testo 2>&1"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; PNAME=./release/GPSBabel.exe GBTEMP=./gbtemp ./test_encoding_utf8 2>&1"
Write-Host "Finished test_script with exit status $LastExitCode"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
deploy_script:
- ps: |
$env:projdir=(C:\msys64\usr\bin\bash.exe -c "pwd")
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; ./tools/ci_tokens"
if (($env:platform -eq "x86") -and ($env:qt -eq "5.9\msvc2015") -and ($env:APPVEYOR_REPO_BRANCH -eq "master"))
{
$verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
+ '-' + (git rev-parse --short=7 HEAD)
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; ls ./gui/release/*.exe"
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; cp -p ./gui/release/GPSBabel-*-Setup.exe GPSBabel-$($verid)-Setup.exe"
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; ./tools/uploadtool/upload_appveyor.sh GPSBabel-$($verid)-Setup.exe"
Write-Host "Finished deploy_script"
}
#deploy:
# tag: 'continuous windows'
# release: 'Continuous windows build'
# description: 'Continuous build'
# provider: GitHub
# auth_token:
# secure: gOkGevzhckv5gwFMhnyRk9JZqn6eaZ4vdVFkRdjL6p6NNZu7mwf8aTfMhWSnhaS2 # your encrypted token from GitHub
# artifact: /GPSBabel.*Setup.exe/ # upload installer to release assets
# draft: false
# prerelease: true
# on:
# branch: master # release from master branch only
# appveyor_repo_tag: false # deploy on tag push only
# platform: x86
# qt: 5.9\msvc2015
skip_tags: true