blob: 0a4cca05dc8806fdf978b6905a0a2964a7e9bfc4 [file] [log] [blame]
Lei Zhangc7551e12016-05-17 09:02:45 -04001# Windows Build Configuration for AppVeyor
2# http://www.appveyor.com/docs/appveyor-yml
3
4# version format
5version: "{build}"
6
David Neto059fe082017-12-11 15:50:51 -05007# The most recent compiler gives the most interesting new results.
8# Put it first so we get its feedback first.
Lei Zhang478d96a2016-08-10 10:12:14 -04009os:
David Neto65b180f2017-08-01 11:42:28 -040010 - Visual Studio 2017
Ehsan Nasiri6e550f42018-07-10 12:48:23 -040011 #- Visual Studio 2013
Lei Zhangc7551e12016-05-17 09:02:45 -040012
13platform:
Lei Zhang651ba752017-11-08 16:44:53 -050014 - x64
Lei Zhangc7551e12016-05-17 09:02:45 -040015
16configuration:
17 - Debug
Ehsan Nasiri6e550f42018-07-10 12:48:23 -040018 #- Release
Lei Zhangc7551e12016-05-17 09:02:45 -040019
20branches:
21 only:
22 - master
23
Lei Zhang0126ad92017-11-14 09:18:42 -050024# Travis advances the master-tot tag to current top of the tree after
25# each push into the master branch, because it relies on that tag to
26# upload build artifacts to the master-tot release. This will cause
27# double testing for each push on Appveyor: one for the push, one for
28# the tag advance. Disable testing tags.
29skip_tags: true
30
Lei Zhangb8aeab82017-11-30 21:12:23 -050031clone_depth: 1
Lei Zhangc7551e12016-05-17 09:02:45 -040032
33matrix:
34 fast_finish: true # Show final status immediately if a test fails.
Ehsan Nasiri6e550f42018-07-10 12:48:23 -040035 #exclude:
36 # - os: Visual Studio 2013
37 # configuration: Debug
Lei Zhangc7551e12016-05-17 09:02:45 -040038
39# scripts that run after cloning repository
40install:
Lei Zhangb8aeab82017-11-30 21:12:23 -050041 # Install ninja
42 - set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
43 - appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
44 - 7z x ninja.zip -oC:\ninja > nul
Steven Perron07f80c42019-03-06 14:11:01 -050045 - set PATH=C:\ninja;C:\Python36;%PATH%
Lei Zhangb8aeab82017-11-30 21:12:23 -050046
47before_build:
48 - git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
Alastair Donaldson663d0502020-10-16 14:58:35 +010049 - git clone https://github.com/google/googletest.git external/googletest
50 - cd external && cd googletest && git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31dc610fec7 && cd .. && cd ..
Lei Zhangb8aeab82017-11-30 21:12:23 -050051 - git clone --depth=1 https://github.com/google/effcee.git external/effcee
52 - git clone --depth=1 https://github.com/google/re2.git external/re2
53 # Set path and environment variables for the current Visual Studio version
David Netob1c9c4e2018-02-06 08:13:39 -080054 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64)
Lei Zhangb8aeab82017-11-30 21:12:23 -050055 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64)
Lei Zhangc7551e12016-05-17 09:02:45 -040056
57build:
58 parallel: true # enable MSBuild parallel builds
59 verbosity: minimal
60
61build_script:
62 - mkdir build && cd build
dan sinclair42abaa02019-05-24 15:43:59 -040063 - cmake -GNinja -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF ..
Lei Zhangb8aeab82017-11-30 21:12:23 -050064 - ninja install
Lei Zhangc7551e12016-05-17 09:02:45 -040065
66test_script:
Daniel Koch0755d6c2019-06-06 14:53:48 -040067 - ctest -C %CONFIGURATION% --output-on-failure --timeout 310
Lei Zhang651ba752017-11-08 16:44:53 -050068
69after_test:
70 # Zip build artifacts for uploading and deploying
71 - cd install
72 - 7z a SPIRV-Tools-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip *\*
73
74artifacts:
75 - path: build\install\*.zip
76 name: artifacts-zip
77
78deploy:
79 - provider: GitHub
80 auth_token:
81 secure: TMfcScKzzFIm1YgeV/PwCRXFDCw8Xm0wY2Vb2FU6WKlbzb5eUITTpr6I5vHPnAxS
82 release: master-tot
83 description: "Continuous build of the latest master branch by Appveyor and Travis CI"
84 artifact: artifacts-zip
85 draft: false
86 prerelease: false
87 force_update: true
88 on:
89 branch: master
90 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017