.appveyor.yml 6.64 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:
10 11
#  - BUILD: 'Debug'
#    CONFIG: debug
12
#    SHADOW_BUILD_DIR: C:\projects\qgroundcontrol\build_windows_debug
Daniel Agar's avatar
Daniel Agar committed
13 14
  - BUILD: 'Release'
    CONFIG: installer
15
    SHADOW_BUILD_DIR: C:\projects\qgroundcontrol\build_windows_install
16 17

install:
DonLakeFlyer's avatar
DonLakeFlyer committed
18
  - git submodule update --init --recursive
DonLakeFlyer's avatar
DonLakeFlyer committed
19
  - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
DonLakeFlyer's avatar
DonLakeFlyer committed
20
  - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.12.5\msvc2017_64\bin;%PATH%
21
  - mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
Don Gagne's avatar
Don Gagne committed
22 23 24 25
  - 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
26
      (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
27 28 29
      Write-Host "Unzipping..."
      cmd /c start /wait 7z x $qt7zPath -oC:\
      Write-Host "Installed" -ForegroundColor Green
Daniel Agar's avatar
Daniel Agar committed
30 31
  - ps: |
      Write-Host "Installing GStreamer..." -ForegroundColor Cyan
DonLakeFlyer's avatar
DonLakeFlyer committed
32
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86_64-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
33
      Write-Host "Downloading..."
DonLakeFlyer's avatar
DonLakeFlyer committed
34
      (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
35
      Write-Host "Installing..."
Don Gagne's avatar
Don Gagne committed
36
      cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Daniel Agar's avatar
Daniel Agar committed
37 38 39
      Write-Host "Installed" -ForegroundColor Green
  - ps: |
      Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan
DonLakeFlyer's avatar
DonLakeFlyer committed
40
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86_64-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
41
      Write-Host "Downloading..."
DonLakeFlyer's avatar
DonLakeFlyer committed
42
      (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
43
      Write-Host "Installing..."
Don Gagne's avatar
Don Gagne committed
44
      cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Daniel Agar's avatar
Daniel Agar committed
45
      Write-Host "Installed" -ForegroundColor Green
46 47

build_script:
Don Gagne's avatar
Don Gagne committed
48
  - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt-QGC-5.12.6\5.12.6\msvc2017_64\bin\qmake -r CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
49
  - cd %SHADOW_BUILD_DIR% && jom
50
  - if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
51
# Generate the source server information to embed in the PDB
DonLakeFlyer's avatar
DonLakeFlyer committed
52
  - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\release\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%\release\qgroundcontrol.pdb.srcsrv'
53
# write the source server info
DonLakeFlyer's avatar
DonLakeFlyer committed
54
  - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb -s:srcsrv'
55
# build the symbol / PE store
DonLakeFlyer's avatar
DonLakeFlyer committed
56 57
  - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\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%\release\qgroundcontrol.exe /t qgroundcontrol'
58
  - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1'
59 60

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

63
artifacts:
64 65
  - path: QGroundControl-installer.exe
    name: qgcinstaller
Don Gagne's avatar
Don Gagne committed
66
  - path: build_windows_install\release\qgroundcontrol.pdb
67
    name: pdb
68

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

85
# Symbols for daily builds are currently turned off due to AppVeyor artifact storage limits
86
# deploy daily build symbols to s3
87 88 89 90 91 92 93 94 95 96 97 98 99
#  - 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
100

101
# deploy release symbols to s3
102 103 104 105 106 107 108 109 110 111 112 113 114
#  - 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
115

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

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

142 143 144 145 146 147 148
# 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
149
    region: us-west-2
150 151 152 153 154 155
    set_public: true
    folder: latest
    artifact: qgcinstaller
    on:
      CONFIG: installer
      appveyor_repo_tag: true
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170

# 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