Skip to content

Commit e9dedde

Browse files
authored
Merge pull request #104 from robinst/github-actions
Replace Travis with GitHub Actions
2 parents c1d3ba8 + b97dd39 commit e9dedde

File tree

6 files changed

+35
-21
lines changed

6 files changed

+35
-21
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: ci
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ruby: [2.4, 2.7]
11+
env:
12+
PLATFORM: x86_64-linux
13+
TAGLIB_VERSION: 1.11.1
14+
SKIP_SWIG: true
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-ruby@v1
18+
with:
19+
ruby-version: ${{ matrix.ruby }}
20+
- name: Bundle install
21+
run: |
22+
gem install bundler
23+
bundle install
24+
- name: Install taglib
25+
run: bundle exec rake vendor
26+
- name: Compile
27+
run: TAGLIB_DIR=$PWD/tmp/x86_64-linux/taglib-$TAGLIB_VERSION LD_LIBRARY_PATH=$PWD/tmp/x86_64-linux/taglib-$TAGLIB_VERSION/lib bundle exec rake compile
28+
- name: Test
29+
run: bundle exec rake test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Makefile
99
# Editor
1010
.*.swp
1111
.redcar
12+
.idea
1213

1314
# Build
1415
/.yardoc

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ taglib-ruby currently supports the following:
1919
Contributions for more coverage of the library are very welcome.
2020

2121
[![Gem version][gem-img]][gem-link]
22-
[![Build status][travis-img]][travis-link]
22+
[![ci](https://github.com/robinst/taglib-ruby/workflows/ci/badge.svg)](https://github.com/robinst/taglib-ruby/actions?query=workflow%3Aci)
2323

2424
Installation
2525
------------
@@ -143,5 +143,3 @@ version 2.1 (LGPL) and Mozilla Public License (MPL).
143143
[taglib]: http://taglib.github.io/
144144
[gem-img]: https://badge.fury.io/rb/taglib-ruby.svg
145145
[gem-link]: https://rubygems.org/gems/taglib-ruby
146-
[travis-img]: https://api.travis-ci.org/robinst/taglib-ruby.png
147-
[travis-link]: https://travis-ci.org/robinst/taglib-ruby

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ import 'tasks/gemspec_check.rake'
3333
# by Swig. Since the ExtensionTasks depend on the *_wrap.cxx files,
3434
# compiling the extensions will trigger Swig, which is not desired as
3535
# those files have already been generated and there's no reason to make
36-
# Swig a variable of the CI. To prevent those dependencies, do not import
37-
# swig.rake when running in Travis.
38-
import 'tasks/swig.rake' unless ENV['TRAVIS'] == 'true'
36+
# Swig a variable of the CI. The environment variable can be set to
37+
# prevent running swig.
38+
import 'tasks/swig.rake' unless ENV['SKIP_SWIG'] == 'true'

tasks/gemspec_check.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
desc "Checks file list in .gemspec against files tracked in Git"
22
task :gemspec_check do |t|
3-
exclude = ['.gitignore', '.travis.yml']
3+
exclude = ['.gitignore', '.github/workflows/ci.yml']
44
git_files = `git ls-files`.split("\n") - exclude
55
gemspec_files = $gemspec.files
66

0 commit comments

Comments
 (0)