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

Fix Libv8::Node::Paths with RubyGems >=3.3.21 on *-linux-gnu platforms #36

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2e94fc2
Fix repo address
lloeki Jan 24, 2022
21eeb92
Pin mini_racer test version
lloeki Jan 24, 2022
a6cc61e
Patch platform for musl tests with old rubygems
lloeki Oct 18, 2021
f55ed74
Fix library path for old rubygems
lloeki Oct 19, 2021
90b7d78
Improve local building
lloeki Aug 25, 2022
5c54319
Transpose CPU to aarch64 for Docker on Darwin
lloeki Aug 25, 2022
f6a5708
Relax mini_racer Ruby version check for CI testing
lloeki Aug 25, 2022
f4d6da8
Use Ruby 2.6 as base compiling environment
lloeki Aug 25, 2022
1328005
Remove Ruby 2.5
lloeki Aug 25, 2022
fe34cc6
Add Ruby 3.1
lloeki Aug 25, 2022
4460470
Fix lint
lloeki Aug 25, 2022
690c03f
Test ruby platform on musl too
lloeki Aug 26, 2022
ff6449f
Test more versions for `ruby` platform
lloeki Aug 26, 2022
b5a47ed
Move CI to macOS 12
lloeki Aug 26, 2022
3be6699
Remove python2 from alpine
lloeki Aug 26, 2022
7d3ed36
Add ccache support
lloeki Aug 26, 2022
461eedc
Add more cross-compilation options
lloeki Aug 26, 2022
f53bf1e
Update to node 16.17.0
lloeki Aug 26, 2022
6b7f57d
Move back to macOS 11
lloeki Aug 26, 2022
98078bc
Build with Ruby 2.4
lloeki Aug 27, 2022
98c9258
Test with mini_racer 0.6.3
lloeki Aug 27, 2022
7fa4743
Add ccache only once
lloeki Aug 27, 2022
e35a4fa
Update to node 16.19.0
lloeki Jan 8, 2023
d742196
Optimize 'libexec/build-monolith' on Linux
Fayti1703 Jan 8, 2023
abae20e
Skip compilation on TruffleRuby
eregon Jan 10, 2023
6da5856
Merge pull request #38 from eregon/truffleruby
lloeki Jan 12, 2023
db76c05
Ignore stubdata object
Fayti1703 Jan 9, 2023
d8c6b58
googletest 'hello test'
seanmakesgames Jan 10, 2023
f17c160
get test to reference built libv8
seanmakesgames Jan 13, 2023
fdd9edf
actually use v8 in the test
seanmakesgames Jan 13, 2023
261889c
Add initial multi-platform support for test.
seanmakesgames Jan 13, 2023
bf1dff5
Add ctest to makefile
seanmakesgames Jan 15, 2023
d8d1567
fix building test on linux on some build setups
seanmakesgames Jan 15, 2023
f803993
integrate test into actions
seanmakesgames Jan 15, 2023
0248883
CI: Install CMake in docker container
Fayti1703 Jan 15, 2023
02f6af3
attempt to move forward docker image to newer version
seanmakesgames Jan 16, 2023
fd333f5
Auto-detect vendor dir in GTest CMake Configuration
Fayti1703 Jan 16, 2023
d016d23
Use pathed archives on Linux
Fayti1703 Jan 17, 2023
b1af510
Fix aarch64 cross-compile by dropping -msign-return-address on host
Fayti1703 Jan 18, 2023
29c7341
skip arm64 c test on mac and lin
seanmakesgames Jan 18, 2023
9a61bac
2.6 is EOL -- remove and bump
seanmakesgames Jan 19, 2023
97560d6
Force ruby platform when testing ruby gem
Fayti1703 Jan 22, 2023
543ee88
Merge pull request #37 from seanmakesgames/add_test
SamSaffron Jan 23, 2023
0d462cb
Use Ruby 2.7 in Makefile and Dockerfile
lloeki Jan 24, 2023
f38ca6d
Use ccache in Dockerfile
lloeki Jan 24, 2023
0fad627
Pin Rubygems and Bundler
lloeki Jan 24, 2023
dcb3894
Add Ruby 3.2
lloeki Jan 25, 2023
4db6396
Fix and bump Rubocop
lloeki Jan 25, 2023
f6a5a86
Fix Libv8::Node::Paths with RubyGems >=3.3.21 on *-linux-gnu platforms
knu Oct 29, 2022
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
Prev Previous commit
Next Next commit
Fix and bump Rubocop
lloeki committed Jan 25, 2023
commit 4db6396edce91a5c17224c7c41a4b514dea1c85e
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
AllCops:
SuggestExtensions: false
NewCops: disable
TargetRubyVersion: 2.0
Exclude:
- src/**/*
- pkg/**/*
- vendor/**/*
- test/**/*

Naming/FileName:
Exclude:
@@ -26,3 +29,6 @@ Style/WordArray:

Style/PerlBackrefs:
Enabled: false

Gemspec/RequiredRubyVersion:
Enabled: false
8 changes: 2 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -23,9 +23,7 @@ task :compile, [:platform] => [] do |_, args|
local_platform = Gem::Platform.local
target_platform = Gem::Platform.new(ENV['RUBY_TARGET_PLATFORM'] || args.to_h[:platform] || Gem::Platform.local)

if target_platform.os == 'darwin'
target_platform.instance_eval { @version = nil }
end
target_platform.instance_eval { @version = nil } if target_platform.os == 'darwin'

puts "local platform: #{local_platform}"
puts "target platform: #{target_platform}"
@@ -46,9 +44,7 @@ task :binary, [:platform] => [:compile] do |_, args|
local_platform = Gem::Platform.local.dup
target_platform = Gem::Platform.new(ENV['RUBY_TARGET_PLATFORM'] || args.to_h[:platform] || Gem::Platform.local)

if target_platform.os == 'darwin'
target_platform.instance_eval { @version = nil }
end
target_platform.instance_eval { @version = nil } if target_platform.os == 'darwin'

puts "local platform: #{local_platform}"
puts "target platform: #{target_platform}"
2 changes: 1 addition & 1 deletion ext/libv8-node/builder.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unless $LOAD_PATH.include?(File.expand_path('../../lib', __dir__))
unless $LOAD_PATH.include?(File.expand_path('../../lib', __dir__)) # rubocop:disable Style/IfUnlessModifier
$LOAD_PATH.unshift(File.expand_path('../../lib', __dir__))
end
require 'libv8/node/version'
4 changes: 2 additions & 2 deletions ext/libv8-node/extconf.rb
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@

require 'mkmf'

if RUBY_ENGINE == "truffleruby"
File.write("Makefile", dummy_makefile($srcdir).join(""))
if RUBY_ENGINE == 'truffleruby'
File.write('Makefile', dummy_makefile($srcdir).join('')) # rubocop:disable Style/GlobalVars
return
end

2 changes: 1 addition & 1 deletion ext/libv8-node/location.rb
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ def configure(context = MkmfContext.new)
def verify_installation!
include_paths = Libv8::Node::Paths.include_paths

unless include_paths.detect { |p| Pathname(p).join('v8.h').exist? }
unless include_paths.detect { |p| Pathname(p).join('v8.h').exist? } # rubocop:disable Style/IfUnlessModifier
raise(HeaderNotFound, "Unable to locate 'v8.h' in the libv8 header paths: #{include_paths.inspect}")
end

4 changes: 2 additions & 2 deletions libv8-node.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
require 'libv8/node/version'

Gem::Specification.new do |s|
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
s.require_paths = ['lib', 'ext']

s.add_development_dependency 'rake', '~> 12'
s.add_development_dependency 'rubocop', '~> 0.50.0'
s.add_development_dependency 'rubocop', '~> 1.44.0'
end