From d8c06cd99e2b46b00da53850570aed6b6d52da27 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 19 May 2013 09:19:29 +0200 Subject: add Travis-CI integration Travis-CI [1] is a continous integration cloud service. It is free for open-source projects and tigthly integrated tiwh GitHub so there is really no reason for us not use it. :) For now we are going to do a total of 4 builds, mainly to test ffmpeg/libav API breakage: * ffmpeg-stable, libass-stable * ffmpeg-git, libass-stable * libav-stable, libass-stable * libav-git, libass-stable The compiler that is currently used is clang for two reasons: * running 8 build targets would be quite wasteful and take a long time * clang is less tested and used during development than gcc (especially on linux) Currently Travis doesn't support OS X environments alongside Linux ones [2]. When it will, we will add a fifth build target to test OS X compilation breakage. README was moved to markdown to add the little build status image. I ran some tests with my GitHub fork and couldn't get images to show up using ReStructured Text. [1]: https://github.com/travis-ci/travis-ci [2]: travis-ci/travis-ci#216 --- .travis.yml | 29 +++++++++++++++++++ README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 69 ---------------------------------------------- travis-deps | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+), 69 deletions(-) create mode 100644 .travis.yml create mode 100644 README.md delete mode 100644 README.rst create mode 100755 travis-deps diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..cd5a9d4262 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +language: c + +env: + - LIBAV=libav-stable + - LIBAV=libav-git + - LIBAV=ffmpeg-stable + - LIBAV=ffmpeg-git +compiler: + - clang +branches: + only: + - master + +before_install: ./travis-deps libass-stable $LIBAV +script: ./configure && make + +notifications: + email: + recipients: + - mpv-team@googlegroups.com + email: + on_success: change + n_failure: always + irc: + channels: + - "irc.freenode.org#mpv-player-dev" + email: + on_success: change + n_failure: always diff --git a/README.md b/README.md new file mode 100644 index 0000000000..ba3fab5360 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +mpv +=== + +[![Build Status](https://api.travis-ci.org/mpv-player/mpv.png)](https://travis-ci.org/mpv-player/mpv) + +Overview +-------- + +**mpv** is a movie player based on MPlayer and mplayer2. It supports a wide +variety of video file formats, audio and video codecs, and subtitle types. + +If you are wondering what's different from mplayer2 and MPlayer you can read +more about the [changes][changes]. + +Compilation +----------- + +Compiling with full features requires development files for several +external libraries. Below is a list of some important requirements. For +more information see the output of `./configure --help` for a list of options, +or look at the list of enabled and disabled features printed after running +`./configure`. If you think you have support for some feature installed +but configure fails to detect it, the file `config.log` may contain +information about the reasons for the failure. + +Essential dependencies (incomplete list): + +- gcc or clang +- X development headers (xlib, X extensions, libvdpau, libGL, libXv, ...) +- Audio output development headers (libasound, pulseaudio) +- fribidi, freetype, fontconfig development headers (for libass) +- libass +- FFmpeg libraries (libavutil libavcodec libavformat libswscale libpostproc) +- libjpeg +- libquvi if you want to play Youtube videos directly +- libx264 if you want to use encoding (has to be explicitly enabled when + compiling ffmpeg) + +Most of the above libraries are available in suitable versions on normal +Linux distributions. However FFmpeg is an exception (distro versions may be +too old to work at all or work well). For that reason you may want to use +the separately available build wrapper ([mpv-build][mpv-build]) that first compiles FFmpeg +libraries and libass, and then compiles the player statically linked against +those. + +If you are running Mac OSX and using homebrew we provide [homebrew-mpv][homebrew-mpv], an up +to date formula that compiles mpv with sensible dependencies and defaults for +OSX. + +Bug reports +----------- + +Please use the [issue tracker][issue tracker] provided by GitHub to send us bug +reports or feature requests. + +Contributing +------------ + +For small changes you can just send us pull requests through GitHub. For bigger +changes come and talk to us on IRC before you start working on them. It will +make code review easier for both parties later on. + +Contacts +-------- + +You can find us on IRC in `#mpv-player` on `irc.freenode.net` + +[changes]: https://github.com/mpv-player/mpv/blob/master/DOCS/man/en/changes.rst +[mpv-build]: https://github.com/mpv-player/mpv-build +[homebrew-mpv]: https://github.com/mpv-player/homebrew-mpv +[issue tracker]: https://github.com/mpv-player/mpv/issues diff --git a/README.rst b/README.rst deleted file mode 100644 index d8a962282b..0000000000 --- a/README.rst +++ /dev/null @@ -1,69 +0,0 @@ -mpv -### - -Overview -======== - -**mpv** is a movie player based on MPlayer and mplayer2. It supports a wide -variety of video file formats, audio and video codecs, and subtitle types. - -If you are wondering what's different from mplayer2 and MPlayer you can read -more about the changes_. - -Compilation -=========== - -Compiling with full features requires development files for several -external libraries. Below is a list of some important requirements. For -more information see the output of ``./configure --help`` for a list of options, -or look at the list of enabled and disabled features printed after running -``./configure``. If you think you have support for some feature installed -but configure fails to detect it, the file ``config.log`` may contain -information about the reasons for the failure. - -Essential dependencies (incomplete list): - -- gcc or clang -- X development headers (xlib, X extensions, libvdpau, libGL, libXv, ...) -- Audio output development headers (libasound, pulseaudio) -- fribidi, freetype, fontconfig development headers (for libass) -- libass -- FFmpeg libraries (libavutil libavcodec libavformat libswscale libpostproc) -- libjpeg -- libquvi if you want to play Youtube videos directly -- libx264 if you want to use encoding (has to be explicitly enabled when - compiling ffmpeg) - -Most of the above libraries are available in suitable versions on normal -Linux distributions. However FFmpeg is an exception (distro versions may be -too old to work at all or work well). For that reason you may want to use -the separately available build wrapper (mpv-build_) that first compiles FFmpeg -libraries and libass, and then compiles the player statically linked against -those. - -If you are running Mac OSX and using homebrew we provide homebrew-mpv_, an up -to date formula that compiles mpv with sensible dependencies and defaults for -OSX. - -Bug reports -=========== - -Please use the `issues tracker`_ provided by GitHub to send us bug reports or -feature requests. - -Contributing -============ - -For small changes you can just send us pull requests through GitHub. For bigger -changes come and talk to us on IRC before you start working on them. It will -make code review easier for both parties later on. - -Contacts -======== - -You can find us on IRC in ``#mpv-player`` on ``irc.freenode.net`` - -.. _changes: https://github.com/mpv-player/mpv/blob/master/DOCS/man/en/changes.rst -.. _mpv-build: https://github.com/mpv-player/mpv-build -.. _homebrew-mpv: https://github.com/mpv-player/homebrew-mpv -.. _issues tracker: https://github.com/mpv-player/mpv/issues diff --git a/travis-deps b/travis-deps new file mode 100755 index 0000000000..029c0f3992 --- /dev/null +++ b/travis-deps @@ -0,0 +1,92 @@ +#!/usr/bin/ruby + +class TravisDepsBuilder + def self.make(name) + info = build_map[name] + raise "unrecognized dependency identifier '#{name}'" unless info + instance = new(name, info[:url], info[:action]) + instance.deps + instance.build + end + + attr_reader :name, :url, :action + + def initialize(name, url=nil, action=nil) + @name, @url, @action = name, url, action + end + + def build + send(@action) + end + + def deps; end + + private + def git + sh "git clone --depth=1 #{url} #{name}" + compile name + end + + def stable + filename = File.basename(url) + sh "wget #{url}" + sh "tar -xzvf #{filename}" + dirname = File.basename(url, ".tar.gz" ) + compile dirname + end + + def compile(dirname) + sh "cd #{dirname} && ./configure && make && sudo make install" + sh "cd $TRAVIS_BUILD_DIR" + end + + def sh(command) + `#{command}` + end +end + +class Libav < TravisDepsBuilder + def self.build_map + { + "libav-stable" => { + :action => :stable, + :url => 'http://libav.org/releases/libav-9.6.tar.gz' + }, + "libav-git" => { + :action => :git, + :url => "git://git.libav.org/libav.git" + }, + "ffmpeg-stable" => { + :action => :stable, + :url => 'http://www.ffmpeg.org/releases/ffmpeg-1.2.1.tar.gz' + }, + "ffmpeg-git" => { + :action => :git, + :url => "git://github.com/FFmpeg/FFmpeg.git" + } + } + end +end + +class Libass < TravisDepsBuilder + def self.build_map + { + "libass-stable" => { + :action => :stable, + :url => 'http://libass.googlecode.com/files/libass-0.10.1.tar.gz' + } + } + end +end + +class Dependencies < TravisDepsBuilder + def deps + sh "sudo apt-get update -y" + sh "sudo apt-get install pkg-config fontconfig libfribidi-dev yasm -y" + end +end + +Dependencies.new(:deps).deps + +Libass.make(ARGV[0]) +Libav.make(ARGV[1]) -- cgit v1.2.3