| 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: >- |
| 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 |
| |
| mkdir build |
| |
| cd build |
| |
| cmake --version |
| |
| cmake .. -G %generator% -DAVIF_BUILD_STATIC=1 -DAVIF_BUILD_APPS=1 |
| after_build: |
| - cmd: >- |
| copy %CONFIGURATION%\avifenc.exe . |
| |
| copy %CONFIGURATION%\avifdec.exe . |
| |
| mkdir lib |
| |
| set ARTIFACT_ZIP=avif_vs2017_x64_%APPVEYOR_REPO_COMMIT:~0,8%_%CONFIGURATION%.zip |
| |
| copy %CONFIGURATION%\avif_static_x64.lib lib\avif_x64_%CONFIGURATION%.lib |
| |
| 7z a %ARTIFACT_ZIP% lib |
| |
| cd .. |
| |
| 7z a build\%ARTIFACT_ZIP% include examples |
| build: |
| project: C:/projects/avif/build/avif.sln |
| parallel: true |
| verbosity: minimal |
| artifacts: |
| - path: 'build\avif_vs2017_x64_*.zip' |
| name: Static Lib and Includes |
| - path: 'build\*.exe' |
| name: Basic apps |