Skip to content

Add appveyor CI to build on windows #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
os:
- Windows Server 2012 R2

platform:
- x86
# - x64

matrix:
fast_finish: true

init:
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform%

before_build:
- choco install -y swig
- tools/appveyor.win.install.deps.bat

build_script:
- tools/appveyor.build.bat

before_test:
- set PATH=C:\Python27\scripts;%PATH%
- pip install nose

test_script:
- cd ..
- tools/appveyor.python.nosetests.bat

on_failure:
- type "C:\projects\avtranscoder\build\CMakeFiles\CMakeOutput.log"

#on_success:
# - create archives

#artifacts:
# - path: C:\ProgramData\ffmpeg-2.2.11
# name: ffmpeg
# type: zip

# - path: C:\projects\avtranscoder\build
# name: avtranscoder
# type: zip

#deploy:
# - provider: GitHub
# artifact: ffmpeg,avtranscoder
# auth_token:
# secure: <your encrypted token>
# on:
# branch: master
# appveyor_repo_tag: true
15 changes: 15 additions & 0 deletions tools/appveyor.build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo on

set FFMPEG_VERSION=2.2.11

MKDIR build
cd build

:: Configure
call cmake.exe .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CD% -DCMAKE_PREFIX_PATH=C:\ProgramData\ffmpeg-%FFMPEG_VERSION% -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7

:: Build & Install
call nmake /F Makefile
call nmake /F Makefile install

@echo off
23 changes: 23 additions & 0 deletions tools/appveyor.python.nosetests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo on

set PWD=C:\projects\avtranscoder
set FFMPEG_VERSION=2.2.11

:: Get avtranscoder library
set PYTHONPATH=%PWD%\build\lib\python2.7\site-packages;%PYTHONPATH%
set PATH=C:\ProgramData\ffmpeg-%FFMPEG_VERSION%\bin;%PWD%\build\lib;%PATH%

:: Get avtranscoder profiles
set AVPROFILES=%PWD%\build\share\avprofiles

:: Get assets
git clone https://github.com/avTranscoder/avTranscoder-data.git
set AVTRANSCODER_TEST_VIDEO_FILE=%PWD%\avTranscoder-data/video\BigBuckBunny\BigBuckBunny_480p_stereo.avi
set AVTRANSCODER_TEST_AUDIO_WAVE_FILE=%PWD%\avTranscoder-data\audio\frequenciesPerChannel.wav
set AVTRANSCODER_TEST_AUDIO_MOV_FILE=%PWD%\avTranscoder-data\video\BigBuckBunny\BigBuckBunny_1080p_5_1.mov

:: Launch tests
cd test\pyTest
nosetests

@echo off
19 changes: 19 additions & 0 deletions tools/appveyor.win.install.deps.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo on

set FFMPEG_VERSION=2.2.11

if %platform% == x86 set PLATFORM_VERSION=32
if %platform% == X64 set PLATFORM_VERSION=64

:: Installing ffmpeg dev (include + apps)
curl -kLO http://ffmpeg.zeranoe.com/builds/win%PLATFORM_VERSION%/dev/ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-dev.7z
7z x ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-dev.7z

:: Installing ffmpeg shared (libs)
curl -kLO http://ffmpeg.zeranoe.com/builds/win%PLATFORM_VERSION%/shared/ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-shared.7z
7z x ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-shared.7z

move ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-shared\bin ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-dev
move ffmpeg-%FFMPEG_VERSION%-win%PLATFORM_VERSION%-dev C:\ProgramData\ffmpeg-%FFMPEG_VERSION%

@echo off