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

build:
  verbosity: minimal
5 6 7

environment:
  matrix:
8 9
#  - BUILD: 'Debug'
#    CONFIG: debug
10
#    SHADOW_BUILD_DIR: C:\projects\qgroundcontrol\build_windows_debug
Daniel Agar's avatar
Daniel Agar committed
11 12
  - BUILD: 'Release'
    CONFIG: installer
13
    SHADOW_BUILD_DIR: C:\projects\qgroundcontrol\build_windows_install
14 15 16

install:
  - git submodule update --init --recursive
Don Gagne's avatar
Don Gagne committed
17
  - call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
18
  - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.11\msvc2015\bin;%PATH%
19
  - mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
Daniel Agar's avatar
Daniel Agar committed
20 21
  - ps: |
      Write-Host "Installing GStreamer..." -ForegroundColor Cyan
Don Gagne's avatar
Don Gagne committed
22
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
23
      Write-Host "Downloading..."
Don Gagne's avatar
Don Gagne committed
24
      (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-x86-1.14.4.msi', $msiPath)
Daniel Agar's avatar
Daniel Agar committed
25
      Write-Host "Installing..."
Don Gagne's avatar
Don Gagne committed
26
      cmd /c start /wait msiexec /package $msiPath /passive ADDLOCAL=ALL
Daniel Agar's avatar
Daniel Agar committed
27 28 29
      Write-Host "Installed" -ForegroundColor Green
  - ps: |
      Write-Host "Installing GStreamer dev..." -ForegroundColor Cyan
Don Gagne's avatar
Don Gagne committed
30
      $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-devel-x86-1.14.4.msi"
Daniel Agar's avatar
Daniel Agar committed
31
      Write-Host "Downloading..."
Don Gagne's avatar
Don Gagne committed
32
      (New-Object Net.WebClient).DownloadFile('https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-x86-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
      Write-Host "Installed" -ForegroundColor Green
36 37

build_script:
38
  - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt\5.11\msvc2015\bin\qmake -r CONFIG-=debug_and_release CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
39
  - cd %SHADOW_BUILD_DIR% && jom
40
  - if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
41
# Generate the source server information to embed in the PDB
42
  - '"C:\Program Files (x86)\Windows Kits\8.1\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'
43
# write the source server info
44
  - '"C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb -s:srcsrv'
45
# build the symbol / PE store
46 47 48
  - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\8.1\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\8.1\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\qgroundcontrol.exe /t qgroundcontrol'
  - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1'
49 50

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

53
artifacts:
54 55
  - path: QGroundControl-installer.exe
    name: qgcinstaller
Don Gagne's avatar
Don Gagne committed
56
  - path: build_windows_install\release\qgroundcontrol.pdb
57
    name: pdb
58

Daniel Agar's avatar
Daniel Agar committed
59
deploy:
60
# deploy continuous builds to s3
Daniel Agar's avatar
Daniel Agar committed
61
  - provider: S3
62 63
    access_key_id:
      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
Daniel Agar's avatar
Daniel Agar committed
64 65
    secret_access_key:
      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
66
    bucket: qgroundcontrol
Don Gagne's avatar
Don Gagne committed
67
    region: us-west-2
Daniel Agar's avatar
Daniel Agar committed
68
    set_public: true
69
    folder: builds/$(APPVEYOR_REPO_BRANCH)
Daniel Agar's avatar
Daniel Agar committed
70
    artifact: qgcinstaller
71 72
    on:
      CONFIG: installer
73
      appveyor_repo_tag: false
74

75
# Symbols for daily builds are currently turned off due to AppVeyor artifact storage limits
76
# deploy daily build symbols to s3
77 78 79 80 81 82 83 84 85 86 87 88 89
#  - 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
90

91
# deploy release symbols to s3
92 93 94 95 96 97 98 99 100 101 102 103 104
#  - 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
105

106
# deploy tagged releases to Github releases
Daniel Agar's avatar
Daniel Agar committed
107
  - provider: GitHub
108 109
    auth_token:
      secure: dzWLqd0eTKjrAWC5LgqVnwLemmrNdddGA2ZZn/OthAP37mwCLkP2C1zil7ivmEE8
Daniel Agar's avatar
Daniel Agar committed
110
    artifact: qgcinstaller
Daniel Agar's avatar
Daniel Agar committed
111 112 113
    draft: false
    prerelease: false
    on:
114
      CONFIG: installer
Daniel Agar's avatar
Daniel Agar committed
115
      appveyor_repo_tag: true
116

117
# deploy tagged releases to s3 version folder
118 119 120 121 122 123
  - provider: S3
    access_key_id:
      secure: IGAojLMqokL+76DbdulmWDA3MTsxEBBi3ReVVSqTy9c=
    secret_access_key:
      secure: RiYqaR+3T2PMNz2j5ur8LCA6H/Zfd4jTX33CZE5iBxm+zaz4QLs25p0B7prpaoNN
    bucket: qgroundcontrol
124
    region: us-west-2
125
    set_public: true
126
    folder: $(APPVEYOR_REPO_TAG_NAME)
127 128 129 130
    artifact: qgcinstaller
    on:
      CONFIG: installer
      appveyor_repo_tag: true
131

132 133 134 135 136 137 138
# 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
139
    region: us-west-2
140 141 142 143 144 145
    set_public: true
    folder: latest
    artifact: qgcinstaller
    on:
      CONFIG: installer
      appveyor_repo_tag: true
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160

# 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