summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2018-10-31 14:00:41 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-11-01 13:49:15 +0200
commit98e12c721ed65e942e57e14114ec379f053eeac4 (patch)
tree7bcee311c45659565cf517d5a97d711e4d34761b
parent56b9928e46026f5cff3b37542ef71ef6806a2ba9 (diff)
downloadqtlocation-mapboxgl-98e12c721ed65e942e57e14114ec379f053eeac4.tar.gz
[build] Parametrize AppVeyor config to avoid duplication
The configuration for VS 2015 and VS 2017 were almost identical. Parametrize the differences to avoid duplication.
-rw-r--r--appveyor.yml121
1 files changed, 53 insertions, 68 deletions
diff --git a/appveyor.yml b/appveyor.yml
index ddb8db3df9..d224661d36 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -33,77 +33,62 @@ for:
only:
- image: Visual Studio 2015
- cache:
- - '%APPVEYOR_BUILD_FOLDER%\mason_packages'
- - '%APPVEYOR_BUILD_FOLDER%\LLVM-5.0.1-win64.exe'
- - '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'
-
- install:
- - git config --system core.longpaths true
- - git submodule sync
- - git submodule update --init
- - ps: |
- if (!(Test-Path cmake-3.10.1-win64-x64.zip)) {
- appveyor DownloadFile https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip
- }
- scripts\check-sha256.ps1 cmake-3.10.1-win64-x64.zip 8251F70C85B58F3CA1F24E4A3B0637E2D609B5E4A341D00B70E02E89244D5029
- Start-Process -FilePath '7z' -ArgumentList 'x','cmake-3.10.1-win64-x64.zip','-oC:\' -Wait
- - ps: |
- if (!(Test-Path LLVM-5.0.1-win64.exe)) {
- appveyor DownloadFile https://releases.llvm.org/5.0.1/LLVM-5.0.1-win64.exe
- }
- scripts\check-sha256.ps1 LLVM-5.0.1-win64.exe 981543611D719624ACB29A2CFFD6A479CFF36E8AB5EE8A57D8ECA4F9C4C6956F
- Start-Process -FilePath 'LLVM-5.0.1-win64.exe' -ArgumentList '/S','/D=C:\LLVM-5.0.1' -Wait
-
- before_build:
- - set PATH=C:\LLVM-5.0.1\bin;%PATH%
- - set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
- - set CC=clang-cl
- - set CXX=clang-cl
- - mkdir %APPVEYOR_BUILD_FOLDER%\build
- - cd %APPVEYOR_BUILD_FOLDER%\build
-
- build_script:
- - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- - cmake -G "Ninja" -DMBGL_PLATFORM=qt -DWITH_QT_DECODERS=ON -DWITH_QT_I18N=ON -DWITH_NODEJS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:\Qt\5.6.3\msvc2015_64\lib\cmake -DCMAKE_MAKE_PROGRAM="%APPVEYOR_BUILD_FOLDER%\platform\qt\ninja.exe" ..
- - cmake --build . -- -j %NUMBER_OF_PROCESSORS%
+ environment:
+ LLVM_VERSION: 5.0.1
+ LLVM_HASH: 981543611D719624ACB29A2CFFD6A479CFF36E8AB5EE8A57D8ECA4F9C4C6956F
+ VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
+ QT_PREFIX: 'C:\Qt\5.6.3\msvc2015_64\lib\cmake'
-
matrix:
only:
- image: Visual Studio 2017
- cache:
- - '%APPVEYOR_BUILD_FOLDER%\mason_packages'
- - '%APPVEYOR_BUILD_FOLDER%\LLVM-6.0.0-win64.exe'
- - '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'
-
- install:
- - git config --system core.longpaths true
- - git submodule sync
- - git submodule update --init
- - ps: |
- if (!(Test-Path cmake-3.10.1-win64-x64.zip)) {
- appveyor DownloadFile https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip
- }
- scripts\check-sha256.ps1 cmake-3.10.1-win64-x64.zip 8251F70C85B58F3CA1F24E4A3B0637E2D609B5E4A341D00B70E02E89244D5029
- Start-Process -FilePath '7z' -ArgumentList 'x','cmake-3.10.1-win64-x64.zip','-oC:\' -Wait
- - ps: |
- if (!(Test-Path LLVM-6.0.0-win64.exe)) {
- appveyor DownloadFile https://releases.llvm.org/6.0.0/LLVM-6.0.0-win64.exe
- }
- scripts\check-sha256.ps1 LLVM-6.0.0-win64.exe 2501887b2f638d3f65b0336f354b96f8108b563522d81e841d5c88c34af283dd
- Start-Process -FilePath 'LLVM-6.0.0-win64.exe' -ArgumentList '/S','/D=C:\LLVM-6.0.0' -Wait
-
- before_build:
- - set PATH=C:\LLVM-6.0.0\bin;%PATH%
- - set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
- - set CC=clang-cl
- - set CXX=clang-cl
- - mkdir %APPVEYOR_BUILD_FOLDER%\build
- - cd %APPVEYOR_BUILD_FOLDER%\build
-
- build_script:
- - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
- - cmake -G "Ninja" -DMBGL_PLATFORM=qt -DWITH_QT_DECODERS=ON -DWITH_QT_I18N=ON -DWITH_NODEJS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:\Qt\5.11.1\msvc2017_64\lib\cmake -DCMAKE_MAKE_PROGRAM="%APPVEYOR_BUILD_FOLDER%\platform\qt\ninja.exe" ..
- - cmake --build . -- -j %NUMBER_OF_PROCESSORS% \ No newline at end of file
+ environment:
+ LLVM_VERSION: 6.0.0
+ LLVM_HASH: 2501887b2f638d3f65b0336f354b96f8108b563522d81e841d5c88c34af283dd
+ VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
+ QT_PREFIX: 'C:\Qt\5.11.1\msvc2017_64\lib\cmake'
+
+cache:
+ - '%APPVEYOR_BUILD_FOLDER%\mason_packages'
+ - '%APPVEYOR_BUILD_FOLDER%\LLVM-%LLVM_VERSION%-win64.exe'
+ - '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'
+
+install:
+ - git config --system core.longpaths true
+ - git submodule sync
+ - git submodule update --init
+ - ps: |
+ if (!(Test-Path cmake-3.10.1-win64-x64.zip)) {
+ appveyor DownloadFile https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip
+ }
+ scripts\check-sha256.ps1 cmake-3.10.1-win64-x64.zip 8251F70C85B58F3CA1F24E4A3B0637E2D609B5E4A341D00B70E02E89244D5029
+ Start-Process -FilePath '7z' -ArgumentList 'x','cmake-3.10.1-win64-x64.zip','-oC:\' -Wait
+ - ps: |
+ if (!(Test-Path "LLVM-$env:LLVM_VERSION-win64.exe")) {
+ appveyor DownloadFile "https://releases.llvm.org/$env:LLVM_VERSION/LLVM-$env:LLVM_VERSION-win64.exe"
+ }
+ scripts\check-sha256.ps1 LLVM-$env:LLVM_VERSION-win64.exe "$env:LLVM_HASH"
+ Start-Process -FilePath "LLVM-$env:LLVM_VERSION-win64.exe" -ArgumentList '/S',"/D=C:\LLVM-$env:LLVM_VERSION" -Wait
+
+before_build:
+ - set PATH=C:\LLVM-%LLVM_VERSION%\bin;%PATH%
+ - set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
+ - set CC=clang-cl
+ - set CXX=clang-cl
+ - mkdir %APPVEYOR_BUILD_FOLDER%\build
+ - cd %APPVEYOR_BUILD_FOLDER%\build
+
+build_script:
+ - call "%VCVARSALL%" amd64
+ - cmake -G "Ninja"
+ -DMBGL_PLATFORM=qt
+ -DWITH_QT_DECODERS=ON
+ -DWITH_QT_I18N=ON
+ -DWITH_NODEJS=OFF
+ -DCMAKE_BUILD_TYPE=Release
+ -DCMAKE_PREFIX_PATH=%QT_PREFIX%
+ -DCMAKE_MAKE_PROGRAM="%APPVEYOR_BUILD_FOLDER%\platform\qt\ninja.exe"
+ ..
+ - cmake --build . -- -j %NUMBER_OF_PROCESSORS%