mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
build: add Travis build configuration
This commit is contained in:
committed by
Till Höppner
parent
fdd32b3679
commit
e30673e64f
@@ -0,0 +1,38 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
language: rust
|
||||
rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
matrix:
|
||||
allow_failures:
|
||||
- rust: nightly
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- build-essential
|
||||
before_install:
|
||||
- sudo apt-get update -q
|
||||
# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
|
||||
- sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
|
||||
- sudo apt-get install yasm
|
||||
- pushd ~
|
||||
- git clone https://github.com/FFmpeg/FFmpeg.git
|
||||
- cd FFmpeg
|
||||
- git checkout release/2.8
|
||||
- mkdir ~/FFmpeg-build
|
||||
- cd ~/FFmpeg-build
|
||||
- ../FFmpeg/configure --disable-ffprobe --disable-ffserver --disable-doc --enable-avresample
|
||||
- make -j
|
||||
- sudo make install
|
||||
- make distclean
|
||||
- popd
|
||||
|
||||
script:
|
||||
# Current Travis Ubuntu version uses libav which doesn't come with libswresample
|
||||
- cargo build --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale"
|
||||
- cargo test --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale"
|
||||
after_failure:
|
||||
- find /usr -type f 2>/dev/null | grep -E 'lib(avcodec/version|avcodec/avcodec).h$' | xargs -I THEFILE -- sh -c 'echo "=== THEFILE ==="; cat THEFILE'
|
||||
@@ -1,3 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
int main()
|
||||
|
||||
+7
-4
@@ -2,10 +2,10 @@ extern crate libc;
|
||||
extern crate ffmpeg_sys;
|
||||
|
||||
use std::env;
|
||||
use std::fs::{create_dir, File};
|
||||
use std::fs::{create_dir, File, symlink_metadata};
|
||||
use std::io::Write;
|
||||
use std::mem;
|
||||
use std::path::PathBuf;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
|
||||
@@ -14,8 +14,11 @@ use libc::c_void;
|
||||
use ffmpeg_sys::AVCodecContext;
|
||||
|
||||
fn output() -> PathBuf {
|
||||
let ret = PathBuf::from("tmp");
|
||||
create_dir(&ret).ok();
|
||||
let mut ret = std::env::current_dir().unwrap();
|
||||
ret.push(&Path::new("tmp"));
|
||||
if symlink_metadata(&ret).is_err() {
|
||||
create_dir(&ret).expect("Failed to create temporary output dir");
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user