Skip to content

Commit 4d18c94

Browse files
committed
Skip compilation on TruffleRuby
* Running libv8 on GraalVM LLVM is unlikely to ever work, instead using Graal.js makes more sense. This is already the case in mini_racer. libv8-node is a necessary dependency of mini_racer on CRuby, so for TruffleRuby the extconf.rb simply creates a dummy Makefile.
1 parent ad91055 commit 4d18c94

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/build.yml

+10
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ jobs:
2525
run: apt-get update && apt-get install -y shellcheck
2626
- name: Shellcheck
2727
run: shellcheck libexec/*
28+
compile-truffleruby:
29+
name: Compile on truffleruby
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: truffleruby
36+
bundler-cache: true
37+
- run: bundle exec rake compile
2838
build-ruby:
2939
name: Build (ruby)
3040
outputs:

ext/libv8-node/extconf.rb

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# frozen_string_literal: true
22

33
require 'mkmf'
4+
5+
if RUBY_ENGINE == "truffleruby"
6+
File.write("Makefile", dummy_makefile($srcdir).join(""))
7+
return
8+
end
9+
410
create_makefile('libv8-node')
511

612
require File.expand_path('location', __dir__)

0 commit comments

Comments
 (0)