Skip to content

Commit

Permalink
Merge pull request #2 from alexeymorozov/feature/compile-with-mini_po…
Browse files Browse the repository at this point in the history
…rtile2

Feature/compile with mini portile2
  • Loading branch information
CAMOBAP authored Feb 17, 2021
2 parents 2ce1fa6 + 825b70c commit dfe10d0
Show file tree
Hide file tree
Showing 92 changed files with 294 additions and 21,215 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/rake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: rake

on:
push:
branches: [ master ]
pull_request:

jobs:
rake:
name: test on ruby-${{ matrix.ruby }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
os: [ ubuntu-latest, macos-latest ] # windows-latest, doesn't support
experimental: [ false ]
include:
- ruby: '3.0'
os: 'ubuntu-latest'
experimental: true
- ruby: '3.0'
os: 'windows-latest'
experimental: true
- ruby: '3.0'
os: 'macos-latest'
experimental: true

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- if: matrix.os == 'macos-latest'
env:
LDFLAGS: "-L/usr/local/opt/[email protected]/lib"
CPPFLAGS: "-I/usr/local/opt/[email protected]/include"
run: |
brew install autoconf automake libtool
bundle exec rake compile
ls -l lib/xar/
- if: matrix.os != 'macos-latest'
run: |
bundle exec rake compile
ls -l lib/xar/
- run: bundle exec rake
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/pkg/
/spec/reports/
/tmp/
*.o
*.a
mkmf.log
/ports/
/*.installed
lib/xar/*.dylib
lib/xar/*.so
lib/xar/*.dll
17 changes: 2 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
require "bundler/gem_tasks"
require "rake/extensiontask"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)
task default: :spec

spec = Gem::Specification.load("xar.gemspec")

Gem::PackageTask.new(spec) do |pkg|
end

# HACK: Prevent rake-compiler from overriding required_ruby_version,
# because the shared library here is Ruby-agnostic.
# See https://github.com/rake-compiler/rake-compiler/issues/153
module FixRequiredRubyVersion
def required_ruby_version=(*); end
end
Gem::Specification.prepend(FixRequiredRubyVersion)

Rake::ExtensionTask.new("xar", spec)
task :compile, [:host, :sysroot] => [:libxar]
2 changes: 0 additions & 2 deletions ext/xar/.gitignore

This file was deleted.

154 changes: 0 additions & 154 deletions ext/xar/ChangeLog

This file was deleted.

Loading

0 comments on commit dfe10d0

Please sign in to comment.