Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 1 | # Windows Build Configuration for AppVeyor |
| 2 | # http://www.appveyor.com/docs/appveyor-yml |
Karl Schultz | 129a74b | 2017-09-04 08:16:23 -0600 | [diff] [blame] | 3 | # |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 4 | |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 5 | # This version starts a separte job for each platform config |
| 6 | # in order to get around the AppVeyor limit of 60 mins per job. |
| 7 | |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 8 | # build version format |
| 9 | version: "{build}" |
| 10 | |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 11 | # Free accounts have a max of 1, but ask anyway. |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 12 | max_jobs: 4 |
| 13 | |
Karl Schultz | 615b7f7 | 2017-02-22 13:41:55 -0700 | [diff] [blame] | 14 | os: |
Mike Schuchardt | 166f5e9 | 2018-01-03 10:48:34 -0700 | [diff] [blame] | 15 | - Visual Studio 2013 |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 16 | |
| 17 | environment: |
| 18 | PYTHON_PATH: "C:/Python35" |
| 19 | PYTHON_PACKAGE_PATH: "C:/Python35/Scripts" |
| 20 | |
Karl Schultz | acfb380 | 2017-05-26 16:57:28 -0600 | [diff] [blame] | 21 | # Cache the external directory to improve build times. |
| 22 | # If the appveyor config file changes, invalidate the cache. |
| 23 | cache: |
| 24 | - external -> .appveyor.yml |
| 25 | |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 26 | branches: |
| 27 | only: |
| 28 | - master |
| 29 | |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 30 | before_build: |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 31 | - "SET PATH=C:\\Python35;C:\\Python35\\Scripts;%PATH%" |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 32 | - echo. |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 33 | - echo Starting build for %APPVEYOR_REPO_NAME% in %APPVEYOR_BUILD_FOLDER% |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 34 | - git submodule update --init --recursive |
Karl Schultz | 0e41713 | 2018-01-03 12:50:46 -0700 | [diff] [blame] | 35 | # Determine the appropriate CMake generator for the current version of Visual Studio |
| 36 | - echo Determining VS version |
| 37 | - python .\scripts\determine_vs_version.py > vsversion.tmp |
| 38 | - set /p VS_VERSION=< vsversion.tmp |
| 39 | - echo Detected Visual Studio Version as %VS_VERSION% |
| 40 | - del /Q /F vsversion.tmp |
| 41 | - if %PLATFORM% == Win32 (set GENERATOR="Visual Studio %VS_VERSION%") |
| 42 | - if %PLATFORM% == x64 (set GENERATOR="Visual Studio %VS_VERSION% Win64") |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 43 | - if %PLATFORM% == Win32 (set BUILD_DIR="build32") |
| 44 | - if %PLATFORM% == x64 (set BUILD_DIR="build") |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 45 | # Build Vulkan-Loader |
| 46 | - echo Building Vulkan-Loader for %PLATFORM% %CONFIGURATION% |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 47 | - cd %APPVEYOR_BUILD_FOLDER% |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 48 | - git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Loader.git |
| 49 | - cd Vulkan-Loader |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 50 | - mkdir %BUILD_DIR% |
| 51 | - cd %BUILD_DIR% |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 52 | - cmake -G %GENERATOR% .. |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 53 | - cmake --build . --config %CONFIGURATION% -- /maxcpucount |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 54 | # Build glslang |
| 55 | - echo Building glslang for %PLATFORM% %CONFIGURATION% |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 56 | - cd %APPVEYOR_BUILD_FOLDER% |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 57 | - git clone https://github.com/KhronosGroup/glslang.git |
| 58 | - cd glslang |
Karl Schultz | 45b7c1e | 2018-05-12 10:22:26 -0600 | [diff] [blame] | 59 | - update_glslang_sources.py |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 60 | - mkdir %BUILD_DIR% |
| 61 | - cd %BUILD_DIR% |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 62 | - cmake -G %GENERATOR% -DCMAKE_INSTALL_PREFIX=install .. |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 63 | - cmake --build . --config %CONFIGURATION% -- /maxcpucount |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 64 | # Generate build files using CMake for the build step. |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 65 | - echo Generating Vulkan-ValidationLayers CMake files for %PLATFORM% %CONFIGURATION% |
| 66 | - cd %APPVEYOR_BUILD_FOLDER% |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 67 | - mkdir build |
| 68 | - cd build |
Karl Schultz | 59b5b81 | 2018-05-12 14:24:42 -0600 | [diff] [blame] | 69 | - cmake -G %GENERATOR% -DGLSLANG_REPO_ROOT=%APPVEYOR_BUILD_FOLDER%\glslang -DLOADER_REPO_ROOT=%APPVEYOR_BUILD_FOLDER%\Vulkan-Loader .. |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 70 | - echo Building platform=%PLATFORM% configuration=%CONFIGURATION% |
Karl Schultz | 6ba2be1 | 2016-12-30 10:16:33 -0700 | [diff] [blame] | 71 | |
Karl Schultz | 237b53a | 2017-12-02 14:17:12 -0700 | [diff] [blame] | 72 | platform: |
| 73 | - Win32 |
| 74 | - x64 |
| 75 | |
| 76 | configuration: |
| 77 | - Release |
| 78 | - Debug |
| 79 | |
| 80 | build: |
Karl Schultz | 60db9ac | 2018-05-12 07:08:03 -0600 | [diff] [blame] | 81 | parallel: true # enable MSBuild parallel builds |
| 82 | project: build/Vulkan-ValidationLayers.sln # path to Visual Studio solution or project |
| 83 | verbosity: quiet # quiet|minimal|normal|detailed |