chore: configure travis

Former-commit-id: 37da21fda9
This commit is contained in:
Vlad Jerca 2019-05-09 23:12:16 +03:00
parent a3a6bd1fdf
commit 45335bc334
4 changed files with 44 additions and 3 deletions

View file

@ -0,0 +1,14 @@
const fs = require('fs');
const path = require('path');
const CONFIG_PATH = path.resolve('./FFMpegCore.Test/ffmpeg.config.json');
console.log('--- Configuring ffmpeg binary path for:', process.env.TRAVIS_OS_NAME);
let data = require(CONFIG_PATH);
data.RootDirectory = process.env.TRAVIS_OS_NAME === 'linux' ?
'/usr/bin' :
'/usr/local/bin';
fs.writeFileSync(CONFIG_PATH, JSON.stringify(data, null, 4));

26
.travis.yml Normal file
View file

@ -0,0 +1,26 @@
language: csharp
mono: none
dotnet: 2.1.300
os:
- linux
- osx
dist: trusty
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:mc3man/trusty-media; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y ffmpeg libgdiplus; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ffmpeg mono-libgdiplus; fi
- ffmpeg -hwaccels
script:
- nvm install --lts
- nvm use --lts
- node ./.build/travis-ffmpeg-config.js
- dotnet restore
- dotnet build ./FFMpegCore/
- dotnet test ./FFMpegCore.Test/
branches:
only:
- master
- /fix\/.+/
- /feature\/.+/

View file

@ -1,3 +1,3 @@
{ {
"RootDirectory": ".//FFMPEG//bin" "RootDirectory": "./FFMPEG/bin"
} }

View file

@ -1,6 +1,7 @@
![FFMpeg Sharp](https://media.licdn.com/media/gcrc/dms/image/C5612AQFDCKxnyQ3tmw/article-cover_image-shrink_600_2000/0?e=1542844800&v=beta&t=ntfxKUaio7wjO2VFRL4o7gyoIPNKT95SPt94etMFuzw)
# FFMpegCore [![NuGet Badge](https://buildstats.info/nuget/FFMpegCore)](https://www.nuget.org/packages/FFMpegCore/) # FFMpegCore
[![NuGet Badge](https://buildstats.info/nuget/FFMpegCore)](https://www.nuget.org/packages/FFMpegCore/)
[![Build Status](https://travis-ci.org/vladjerca/FFMpegCore.svg?branch=master)](https://travis-ci.org/vladjerca/FFMpegCore)
## Setup ## Setup