summaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: 2440c3f601d92b80cd859bfbc4df786979a60a58 (plain)
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
platform: x64

image:
- Visual Studio 2015
- Visual Studio 2017

environment:
  PYTHON: C:\python37

  matrix:
  - configuration: Release
  - configuration: Debug

test: off

clone_depth: 1

for:
-
  matrix:
    only:
      - image: Visual Studio 2015

  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\latest\msvc2015_64\lib\cmake'

-
  matrix:
    only:
      - image: Visual Studio 2017

  environment:
    LLVM_VERSION: 7.0.0
    LLVM_HASH: 74b197a3959b0408adf0824be01db8dddfa2f9a967f4085af3fad900ed5fdbf6
    VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
    QT_PREFIX: 'C:\Qt\latest\msvc2017_64\lib\cmake'

cache:
  - '%APPVEYOR_BUILD_FOLDER%\.git\modules'
  - '%APPVEYOR_BUILD_FOLDER%\LLVM-%LLVM_VERSION%-win64.exe'
  - '%APPVEYOR_BUILD_FOLDER%\cmake-3.10.1-win64-x64.zip'
  - C:\clcache

install:
  - set PATH=%PYTHON%\Scripts;%PYTHON%;%PATH%
  - pip install clcache
  - git config --system core.longpaths true
  - git submodule sync
  - git submodule update --init
  - git submodule foreach git submodule update --init
  - 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
  - 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

before_build:
  - set PATH=C:\LLVM-%LLVM_VERSION%\bin;%PATH%
  - set PATH=C:\cmake-3.10.1-win64-x64\bin;%PATH%
  - set CLCACHE_DIR=c:\clcache
  - set CLCACHE_CL=clang-cl
  - clcache -z
  - set CC=clcache
  - set CXX=clcache
  - set CTEST_OUTPUT_ON_FAILURE=1
  - mkdir %APPVEYOR_BUILD_FOLDER%\build
  - cd %APPVEYOR_BUILD_FOLDER%\build

build_script:
  - call "%VCVARSALL%" amd64
  - cmake -E remove ../next/vendor
  - cmake -E copy_directory ../vendor ../next/vendor
  - cmake -G "Ninja"
      -DCMAKE_BUILD_TYPE=%CONFIGURATION%
      -DCMAKE_MAKE_PROGRAM="%APPVEYOR_BUILD_FOLDER%\platform\qt\ninja.exe"
      -DCMAKE_PREFIX_PATH=%QT_PREFIX%
      -DMBGL_WITH_QT=ON
      ../next
  - cmake --build . --target qmapboxgl -- -j %NUMBER_OF_PROCESSORS%
  - clcache -s