Rabbit Slide Show

My .travis.yml Tips

2014-09-21

Description

Configuration for Travis CI

Text

Page: 1

My .travis.yml Tips
Masafumi Yokoyama
Ruby-GNOME2 Project Team
RubyHiroba 2014
2014/09/21
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 2

Self Introduction
@myokoym
みょこやまー
Ruby札幌
Rabbitコミッター
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 3

Ruby Kaja 2013
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 4

よろしくお願いします。
m(_ _)m
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 5

Theme
Configuration for Travis CI
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 6

.travis.yml
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 7

Agenda
Getting Started
Choosing Ruby versions
Configuring your build
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 8

Agenda
Getting Started
Choosing Ruby versions
Configuring your build
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 9

Getting Started
1. Edit Rakefile
2. Enable your projects
3. Push .travis.yml
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 10

1. Edit Rakefile
require "bundler/gem_tasks"
desc "Run test"
task :test do
Bundler::GemHelper.install_tasks
ruby("test/run-test.rb")
end
task :default => :test
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 11

2. Enable your projects
https://travis-ci.org/profile/myokoym
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 12

3. Push .travis.yml
%
%
%
%
My .travis.yml Tips
editor .travis.yml
git add .travis.yml
git commit -m "travis: Enable"
git push
Powered by Rabbit 2.1.3

Page: 13

Agenda
Getting Started
Choosing Ruby versions
Configuring your build
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 14

Ruby 1.9.3
rvm:
- 1.9.3
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 15

Ruby 2.0.0
rvm:
- 2.0.0
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 16

Ruby 2.1.x
rvm:
- 2.1
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 17

Ruby 2.2.x←NEW!
rvm:
- 2.2
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 18

1.9.3, 2.0.0 and 2.1
rvm:
- 1.9.3
- 2.0.0
- 2.1
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 19

ruby-head
rvm:
- ruby-head
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 20

ruby-head
$ ruby --version
ruby 2.2.0dev
(2014-09-20 trunk 47652)
[x86_64-linux]
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 21

2.2.0dev!
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 22

JRuby
rvm:
- jruby-19mode
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 23

Rubinius
rvm:
- rbx-2
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 24

Agenda
Getting Started
Choosing Ruby versions
Configuring your build
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 25

allow_failures
matrix:
allow_failures:
- rvm: ruby-head
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 26

fast_finish
matrix:
allow_failures:
- rvm: ruby-head
fast_finish: true
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 27

before_install
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y ...
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 28

GUI
env:
global:
- DISPLAY=":99.0"
before_script:
- sh -e /etc/init.d/xvfb start
after_script:
- sh -e /ext/init.d/xvfb stop
My .travis.yml Tips
Powered by Rabbit 2.1.3

Page: 29

References
Travis CI: Building a Ruby Project
http://docs.travis-ci.com/user/languages/ruby/
Travis CI: Configuring your build
http://docs.travis-ci.com/user/build-configuration/
ruby-gnome2/.travis.yml
https://github.com/ruby-gnome2/ruby-gnome2/blob/
master/.travis.yml
My .travis.yml Tips
Powered by Rabbit 2.1.3

Other slides