Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the C extension on truffleruby #23

Merged
merged 3 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/truffleruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: truffleruby

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ 'truffleruby-head' ]
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@master
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run test
run: rake
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/test_*.rb"]
end

if RUBY_ENGINE == "ruby"
if RUBY_ENGINE == "ruby" || RUBY_ENGINE == "truffleruby"
require 'rake/extensiontask'
Rake::ExtensionTask.new(name)
task :test => :compile
Expand Down
2 changes: 1 addition & 1 deletion ext/io/console/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: false
require 'mkmf'

ok = true if RUBY_ENGINE == "ruby"
ok = true if RUBY_ENGINE == "ruby" || RUBY_ENGINE == "truffleruby"
hdr = nil
case
when macro_defined?("_WIN32", "")
Expand Down
2 changes: 1 addition & 1 deletion lib/io/console.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if RUBY_ENGINE == 'ruby'
if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'truffleruby'
require_relative 'console.so'
else
require_relative 'console/ffi/console'
Expand Down