| os: Visual Studio 2017 |
| |
| platform: |
| - x64 |
| |
| environment: |
| # Build matrix |
| matrix: |
| - arch: x86 |
| compiler: msvc2015 |
| - arch: x64 |
| compiler: msvc2015 |
| - arch: x86 |
| compiler: msvc2017 |
| - arch: x64 |
| compiler: msvc2017 |
| |
| install: |
| # Download ninja |
| - cmd: mkdir C:\ninja-build |
| - ps: (new-object net.webclient).DownloadFile('https://github.com/mesonbuild/cidata/raw/master/ninja.exe', 'C:\ninja-build\ninja.exe') |
| # Set python root based on architecture |
| - cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python37) else (set PYTHON_ROOT=C:\python37-x64) |
| # Add necessary paths to PATH variable |
| - cmd: set PATH=%cd%;C:\ninja-build;%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH% |
| # Install meson |
| - cmd: pip install meson |
| # Set up the build environment |
| - cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% ) |
| - cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch% ) |
| |
| build_script: |
| - cmd: echo Building on %arch% with %compiler% |
| # Configure |
| - cmd: meson --backend=ninja build |
| # Build |
| - cmd: ninja -C build |