.appveyor.yml 6.62 KB
Newer Older
Daniel Agar's avatar
Daniel Agar committed
1 2
version: '{branch}-{build}'

DonLakeFlyer's avatar
DonLakeFlyer committed
3 4
image: Visual Studio 2017

Daniel Agar's avatar
Daniel Agar committed
5 6
build:
  verbosity: minimal
7 8 9

environment:
  matrix:
Daniel Agar's avatar
Daniel Agar committed
10 11
  - BUILD: 'Release'
    CONFIG: installer
12
    SHADOW_BUILD_DIR: C:\projects\qgroundcontrol\build_windows_install
DonLakeFlyer's avatar
DonLakeFlyer committed
13 14
    QT_JOM_DIR: C:\Qt-QGC-5.12.6\Tools\QtCreator\bin
    QT_QMAKE_DIR: C:\Qt-QGC-5.12.6\5.12.6\msvc2017_64\bin
15 16

install:
DonLakeFlyer's avatar
DonLakeFlyer committed
17
  - git submodule update --init --recursive
DonLakeFlyer's avatar
DonLakeFlyer committed
18
  - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
19
  - mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
Don Gagne's avatar
Don Gagne committed
20 21 22 23
  - ps: |
      Write-Host "Installing Qt..." -ForegroundColor Cyan
      $qt7zPath = "$($env:USERPROFILE)\Qt-QGC-5.12.6.7z"
      Write-Host "Downloading..."
Don Gagne's avatar
Don Gagne committed
24
      (New-Object Net.WebClient).DownloadFile('https://qgroundcontrol.s3-us-west-2.amazonaws.com/dependencies/Qt-QGC-5.12.6.7z', $qt7zPath)
Don Gagne's avatar
Don Gagne committed
25 26 27
      Write-Host "Unzipping..."
      cmd /c start /wait 7z x $qt7zPath -oC:\
      Write-Host "Installed" -ForegroundColor Green
Daniel Agar's avatar
Daniel Agar committed
28 29
  - ps: |
      Write-Host "Installing GStreamer..." -ForegroundColor Cyan
DonLakeFlyer's avatar
DonLakeFlyer committed
30
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86_64-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
31
      Write-Host "Downloading..."
DonLakeFlyer's avatar
DonLakeFlyer committed
32
      (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86_64-1.14.4.msi', $msiPath)
Daniel Agar's avatar
Daniel Agar committed
33
      Write-Host "Installing..."
Don Gagne's avatar
Don Gagne committed
34
      cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Daniel Agar's avatar
Daniel Agar committed
35 36 37
      Write-Host "Installed" -ForegroundColor Green
  - ps: |
      Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan
DonLakeFlyer's avatar
DonLakeFlyer committed
38
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86_64-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
39
      Write-Host "Downloading..."
DonLakeFlyer's avatar
DonLakeFlyer committed
40
      (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86_64-1.14.4.msi', $msiPath)
Daniel Agar's avatar
Daniel Agar committed
41
      Write-Host "Installing..."
Don Gagne's avatar
Don Gagne committed
42
      cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Daniel Agar's avatar
Daniel Agar committed
43
      Write-Host "Installed" -ForegroundColor Green
44 45

build_script:
46
  - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && %QT_QMAKE_DIR%\qmake -r CONFIG+=%CONFIG% %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
DonLakeFlyer's avatar
DonLakeFlyer committed
47
  - cd %SHADOW_BUILD_DIR% && %QT_JOM_DIR%\jom
48
  - if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\staging\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
49
# Generate the source server information to embed in the PDB
50
# Temporarily disabled while we try to figure out where this is located on appveyor image
51
#  - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb" | grep qgroundcontrol | grep -v moc_ | grep -v libs\\mavlink | grep -v build_windows_install | python %APPVEYOR_BUILD_FOLDER%\deploy\genPDBsrcsrv.py > %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv'
52
# write the source server info
53
#  - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb -s:srcsrv'
54
# build the symbol / PE store
55 56
#  - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb /t qgroundcontrol'
#  - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.exe /t qgroundcontrol'
57
#  - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1'
58 59

test_script:
60
  - if "%CONFIG%" EQU "debug" ( %SHADOW_BUILD_DIR%\debug\qgroundcontrol --unittest )
Daniel Agar's avatar
Daniel Agar committed
61

62
artifacts:
63 64
  - path: QGroundControl-installer.exe
    name: qgcinstaller
65
  - path: build_windows_install\staging\qgroundcontrol.pdb
66
    name: pdb
67

Daniel Agar's avatar
Daniel Agar committed
68
deploy:
69
# deploy continuous builds to s3
Daniel Agar's avatar
Daniel Agar committed
70
  - provider: S3
71 72
    access_key_id:
      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
Daniel Agar's avatar
Daniel Agar committed
73 74
    secret_access_key:
      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
75
    bucket: qgroundcontrol
Don Gagne's avatar
Don Gagne committed
76
    region: us-west-2
Daniel Agar's avatar
Daniel Agar committed
77
    set_public: true
78
    folder: builds/$(APPVEYOR_REPO_BRANCH)
Daniel Agar's avatar
Daniel Agar committed
79
    artifact: qgcinstaller
80 81
    on:
      CONFIG: installer
82
      appveyor_repo_tag: false
83

84
# Symbols for daily builds are currently turned off due to AppVeyor artifact storage limits
85
# deploy daily build symbols to s3
86 87 88 89 90 91 92 93 94 95 96 97 98
#  - provider: S3
#    access_key_id:
#      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
#    secret_access_key:
#      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
#    bucket: qgroundcontrol
#    region: us-west-2
#    set_public: true
#    folder: cisyms
#    artifact: symbols
#    on:
#      CONFIG: installer
#      appveyor_repo_tag: false
99

100
# deploy release symbols to s3
101 102 103 104 105 106 107 108 109 110 111 112 113
#  - provider: S3
#    access_key_id:
#      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
#    secret_access_key:
#      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
#    bucket: qgroundcontrol
#    region: us-west-2
#    set_public: true
#    folder: releasesyms
#    artifact: symbols
#    on:
#      CONFIG: installer
#      appveyor_repo_tag: true
114

115
# deploy tagged releases to Github releases
Daniel Agar's avatar
Daniel Agar committed
116
  - provider: GitHub
117 118
    auth_token:
      secure: dzWLqd0eTKjrAWC5LgqVnwLemmrNdddGA2ZZn/OthAP37mwCLkP2C1zil7ivmEE8
Daniel Agar's avatar
Daniel Agar committed
119
    artifact: qgcinstaller
Daniel Agar's avatar
Daniel Agar committed
120 121 122
    draft: false
    prerelease: false
    on:
123
      CONFIG: installer
Daniel Agar's avatar
Daniel Agar committed
124
      appveyor_repo_tag: true
125

126
# deploy tagged releases to s3 version folder
127 128 129 130 131 132
  - provider: S3
    access_key_id:
      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
    secret_access_key:
      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
    bucket: qgroundcontrol
133
    region: us-west-2
134
    set_public: true
135
    folder: $(APPVEYOR_REPO_TAG_NAME)
136 137 138 139
    artifact: qgcinstaller
    on:
      CONFIG: installer
      appveyor_repo_tag: true
140

141 142 143 144 145 146 147
# deploy tagged releases to s3 latest folder
  - provider: S3
    access_key_id:
      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
    secret_access_key:
      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
    bucket: qgroundcontrol
148
    region: us-west-2
149 150 151 152 153 154
    set_public: true
    folder: latest
    artifact: qgcinstaller
    on:
      CONFIG: installer
      appveyor_repo_tag: true
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

# deploy pdb for tagged releases to s3 latest folder
  - provider: S3
    access_key_id:
        secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
    secret_access_key:
        secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
    bucket: qgroundcontrol
    region: us-west-2
    set_public: true
    folder: latest
    artifact: pdb
    on:
       CONFIG: installer
       appveyor_repo_tag: true