Skip to content

Commit

Permalink
Add Github Actions CI support.
Browse files Browse the repository at this point in the history
- Include commits from PR #59 from MSP-Greg
- Add Ruby 3.0 support.
- Remove travis.yml entirely
- Drop support for Ruby <= 2.1 (users on older Ruby can use an earlier version of this gem)
- Cleanup gempsec and add Ruby >= 2.2 condition to gemspec
- Remove unneeded magic comments coding: utf-8
  • Loading branch information
johnnyshields committed Sep 6, 2021
1 parent 1c21149 commit 5e094e2
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 37 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/unf_ext.yml
@@ -0,0 +1,49 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: >-
${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, macos-11.0, windows-2019 ]
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, head ]
include:
- { os: windows-2019, ruby: mingw }
exclude:
- { os: macos-11.0, ruby: 2.2 }
- { os: macos-11.0, ruby: 2.3 }
- { os: windows-2019, ruby: head }

steps:
- name: repo checkout
uses: actions/checkout@v2

- name: load ruby cross-compilation toolkit
uses: MSP-Greg/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
mingw: _upgrade_

- name: bundle install
shell: pwsh
run: |
# update RubyGems in Ruby 2.2, bundle install
if ('${{ matrix.ruby }}' -lt '2.3') {
gem update --system 2.7.10 --no-document
}
bundle config set --local path .bundle/vendor
bundle install --jobs 4 --retry 3
- name: compile
timeout-minutes: 5
run: bundle exec rake compile

- name: test
timeout-minutes: 5
run: bundle exec rake test
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion CHANGELOG.md
@@ -1,4 +1,10 @@
## 0.0.7.7 (2019-03-19)
## Unreleased

- Include Windows binaries for Ruby 3.0.
- Drop support for Ruby 2.1 and earlier.
- Replace Travis CI with Github Actions.

## 0.0.7.7 (2020-03-30)

- Include Windows binaries for Ruby 2.7.

Expand Down
1 change: 0 additions & 1 deletion Rakefile
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
require 'bundler/gem_tasks'

gemspec = Bundler::GemHelper.gemspec
Expand Down
1 change: 0 additions & 1 deletion test/test_unf_ext.rb
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
require 'helper'
require 'pathname'

Expand Down
16 changes: 4 additions & 12 deletions unf_ext.gemspec
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'unf_ext/version'
Expand All @@ -24,17 +23,10 @@ Gem::Specification.new do |gem|
"README.md"
]

if RUBY_VERSION < "1.9"
gem.add_development_dependency("rake", [">= 0.9.2.2", "< 11"])
gem.add_development_dependency('i18n', '< 0.7.0')
# Cap dependency on activesupport with < 4.0 on behalf of
# shoulda-matchers to satisfy bundler.
gem.add_development_dependency("activesupport", ["< 4.0"])
gem.add_development_dependency("test-unit", ["= 3.1.5"])
else
gem.add_development_dependency("rake", [">= 0.9.2.2"])
gem.add_development_dependency("test-unit")
end
gem.required_ruby_version = '>= 2.2'

gem.add_development_dependency("rake", [">= 0.9.2.2"])
gem.add_development_dependency("test-unit")
gem.add_development_dependency("rdoc", ["> 2.4.2"])
gem.add_development_dependency("bundler", [">= 1.2"])
gem.add_development_dependency("rake-compiler", [">= 0.7.9"])
Expand Down

0 comments on commit 5e094e2

Please sign in to comment.