| version: '{build}' |
| branches: |
| only: |
| - master |
| image: Visual Studio 2017 |
| configuration: |
| - Debug |
| - Release |
| init: |
| - cmd: >- |
| set arch=Win64 |
| |
| if "%arch%"=="Win64" ( set arch= Win64) |
| |
| echo %arch% |
| |
| echo %APPVEYOR_BUILD_WORKER_IMAGE% |
| |
| if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017%arch%" ) |
| |
| if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015%arch%" ) |
| |
| if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" ( set generator="Visual Studio 12 2013%arch%" ) |
| |
| echo %generator% |
| install: |
| - cmd: >- |
| cd %APPVEYOR_BUILD_FOLDER% |
| |
| git submodule update --init --recursive |
| before_build: |
| - cmd: >- |
| call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" |
| |
| appveyor DownloadFile "https://github.com/joedrago/nasm_mirror/raw/master/nasm-2.14.02-win64.zip" -FileName "nasm.zip" |
| |
| 7z x "nasm.zip" > nul |
| |
| move nasm-* NASM |
| |
| set PATH=%PATH%;%CD%\NASM; |
| |
| nasm -v |
| |
| set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip" |
| |
| appveyor DownloadFile %NINJA_URL% -FileName ninja.zip |
| |
| 7z x ninja.zip -oC:\projects\deps\ninja > nul |
| |
| set PATH=C:\projects\deps\ninja;%PATH% |
| |
| cd ext |
| |
| aom.cmd |
| |
| cd .. |
| |
| mkdir build |
| |
| cd build |
| |
| cmake --version |
| |
| cmake .. -G %generator% -DAVIF_CODEC_AOM=ON -DAVIF_LOCAL_AOM=ON -DBUILD_SHARED_LIBS=OFF -DAVIF_BUILD_APPS=ON |
| after_build: |
| - cmd: >- |
| copy %CONFIGURATION%\avifenc.exe . |
| |
| copy %CONFIGURATION%\avifdec.exe . |
| |
| mkdir lib |
| |
| set ARTIFACT_ZIP=libavif_vs2017_x64_%APPVEYOR_REPO_COMMIT:~0,8%_%CONFIGURATION%.zip |
| |
| copy %CONFIGURATION%\avif.lib lib\avif_x64_%CONFIGURATION%.lib |
| |
| 7z a %ARTIFACT_ZIP% lib |
| |
| cd .. |
| |
| 7z a build\%ARTIFACT_ZIP% include examples |
| build: |
| project: build/libavif.sln |
| parallel: true |
| verbosity: minimal |
| artifacts: |
| - path: 'build\libavif_vs2017_x64_*.zip' |
| name: Static Lib and Includes |
| - path: 'build\*.exe' |
| name: Basic apps |