mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Compare commits
27 commits
v7.3.492.2
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4cac62479a | ||
![]() |
90ea31f215 | ||
![]() |
62ee7fa2ee | ||
![]() |
e8a9669de8 | ||
![]() |
07705eddb6 | ||
![]() |
2d5250a069 | ||
![]() |
ffc7bb0c24 | ||
![]() |
818cc4ef84 | ||
![]() |
43902f09ea | ||
![]() |
c46dcba41a | ||
![]() |
5c7c6e3966 | ||
![]() |
fcf04ce786 | ||
![]() |
5c924d4e2c | ||
![]() |
279d2cadc7 | ||
![]() |
a5850d9e20 | ||
![]() |
dee91ce99f | ||
![]() |
1a95528b09 | ||
![]() |
0b1d3307d7 | ||
![]() |
0f80921e2c | ||
![]() |
2652512973 | ||
![]() |
2c3f6293e2 | ||
![]() |
ba871661a1 | ||
![]() |
d6219df22f | ||
![]() |
14665afe39 | ||
![]() |
2cce1340f7 | ||
![]() |
5fc4ac7aba | ||
![]() |
d85b88cd60 |
9 changed files with 100 additions and 66 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,4 +15,5 @@ lib/libv8/VERSION
|
|||
/release/**/.scaleway
|
||||
/vendor/.gclient
|
||||
/vendor/.gclient_entries
|
||||
/vendor/.cipd
|
||||
/vendor/v8/
|
||||
|
|
25
.travis.yml
25
.travis.yml
|
@ -2,20 +2,13 @@ dist: xenial
|
|||
compiler: clang
|
||||
language: ruby
|
||||
rvm:
|
||||
- 2.7
|
||||
- 2.6
|
||||
- 2.5
|
||||
- 2.4
|
||||
- rubinius-3
|
||||
matrix:
|
||||
include:
|
||||
- rvm: 2.5.1
|
||||
os: osx
|
||||
osx_image: xcode9.4.1
|
||||
- rvm: 2.5.1
|
||||
os: osx
|
||||
osx_image: xcode9.2
|
||||
allow_failures:
|
||||
- rvm: rubinius-3
|
||||
fast_finish: true
|
||||
- os: osx
|
||||
osx_image: xcode11.6
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
@ -31,18 +24,22 @@ before_install:
|
|||
script:
|
||||
- git submodule update --init
|
||||
- bundle exec rake spec binary --trace
|
||||
before_deploy:
|
||||
- bundle exec rake osx_varients --trace
|
||||
deploy:
|
||||
provider: releases
|
||||
file: $(git ls-files -o pkg | head -1)
|
||||
file_glob: true
|
||||
file: pkg/*.gem
|
||||
api_key:
|
||||
secure: OMCBceg89uRnU+FIPAPbeOK2pISvV4Cz62r9iTRIGXQCOOXX8M40i77/3DmtkMtc9FEuNyAu1+CH886PL2WtZZPK4CmEU3HuqXz1a5VsCI+zcAZL1tevKvblXOVQ3MG+B/SZRC3rEzGwjk4027WtzCCGoGCLUu4TFJP05+/8XN4=
|
||||
secure: "ONqUP7Unb84uQJhPCacyNdQL2JznZHIpXjXvW3Zcmvz9Hifp0Q94Kk/k7Q7jDgVZjHvqs9iI2WaXOut55Tumb9yZcMtn4ZbMCh/93MPPBYnvFGJd4qDQdiVylm+WLrg+phK/nG1259T/dX+nZKYbvKjQxQSHYaP7q6+MVvLPPcY="
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
# condition: $TRAVIS_OS_NAME = osx
|
||||
rvm: '2.7'
|
||||
cache:
|
||||
bundler: true
|
||||
notifications:
|
||||
recipients:
|
||||
- cowboyd@thefrontside.net
|
||||
- bordjukov@gmail.com
|
||||
- nightpool@cybre.space
|
||||
|
|
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
|||
### v8.4.255.0 - 2020-07-15
|
||||
|
||||
* Update upstream v8 version to 8.4.255.0
|
||||
|
||||
### v7.3.495.0 - 2020-04-14
|
||||
|
||||
* Update upstream v8 version to 7.3.495.0
|
||||
* Enable I18n support in V8
|
||||
* Drop support for Ruby 2.4 (EOL)
|
||||
|
||||
### v7.3.492.27.0, v7.3.492.27.1 - 2019-04-24
|
||||
|
||||
* Update upstream v8 version to 7.3.492.27
|
||||
|
|
21
README.md
21
README.md
|
@ -1,7 +1,7 @@
|
|||
# libv8
|
||||
[](https://badge.fury.io/rb/libv8)
|
||||
[](https://rubygems.org/gems/libv8)
|
||||
[](https://travis-ci.org/cowboyd/libv8)
|
||||
[](https://travis-ci.org/rubyjs/libv8)
|
||||
[](https://gitter.im/cowboyd/therubyracer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://www.codetriage.com/cowboyd/libv8)
|
||||
|
||||
|
@ -23,10 +23,9 @@ opens the door for supporting Windows.
|
|||
That depends on your platform. Right now, we support the following
|
||||
platforms.
|
||||
|
||||
* x86_64-darwin-19
|
||||
* x86_64-darwin-18
|
||||
* x86_64-darwin-17
|
||||
* x86_64-darwin-16
|
||||
* x86_64-darwin-15
|
||||
* x86_64-darwin-14
|
||||
* x86_64-linux
|
||||
* x86-linux
|
||||
|
||||
|
@ -77,11 +76,11 @@ source-based distribution
|
|||
|
||||
Building the V8 library from source imposes the following requirements:
|
||||
|
||||
* An x86/x86_64 CPU. See [#261](https://github.com/cowboyd/libv8/issues/261) for ARM state.
|
||||
* An x86/x86_64 CPU. See [#261](https://github.com/rubyjs/libv8/issues/261) for ARM state.
|
||||
* Linux with glibc or macOS. See
|
||||
[#259](https://github.com/cowboyd/libv8/issues/259),
|
||||
[#253](https://github.com/cowboyd/libv8/issues/253) and
|
||||
[#217](https://github.com/cowboyd/libv8/issues/217) for state of other
|
||||
[#259](https://github.com/rubyjs/libv8/issues/259),
|
||||
[#253](https://github.com/rubyjs/libv8/issues/253) and
|
||||
[#217](https://github.com/rubyjs/libv8/issues/217) for state of other
|
||||
platforms.
|
||||
* Python 2
|
||||
* pkg-config
|
||||
|
@ -94,7 +93,7 @@ so by specifying the git repo as a gem source. Just make sure you add
|
|||
the following to your `Gemfile`:
|
||||
|
||||
```Ruby
|
||||
gem "libv8", github: "cowboyd/libv8", submodules: true
|
||||
gem "libv8", github: "rubyjs/libv8", submodules: true
|
||||
```
|
||||
|
||||
You can find more info on using a git repo as a gem source in
|
||||
|
@ -107,7 +106,7 @@ platform, we'll pull it right in!
|
|||
|
||||
To get the source, these commands will get you started:
|
||||
|
||||
git clone --recursive git://github.com/cowboyd/libv8.git
|
||||
git clone --recursive git://github.com/rubyjs/libv8.git
|
||||
cd libv8
|
||||
bundle install
|
||||
bundle exec rake compile
|
||||
|
@ -115,7 +114,7 @@ To get the source, these commands will get you started:
|
|||
### About
|
||||
|
||||
This project spun off of
|
||||
[therubyracer](http://github.com/cowboyd/therubyracer) which depends
|
||||
[therubyracer](http://github.com/rubyjs/therubyracer) which depends
|
||||
on having a specific version of V8 to compile and run against.
|
||||
However, actually delivering that version reliably to all the
|
||||
different platforms proved to be a challenge to say the least.
|
||||
|
|
99
Rakefile
99
Rakefile
|
@ -1,6 +1,7 @@
|
|||
require 'bundler/setup'
|
||||
require 'rspec/core/rake_task'
|
||||
require 'tmpdir'
|
||||
require 'rubygems/package'
|
||||
|
||||
Bundler::GemHelper.install_tasks
|
||||
RSpec::Core::RakeTask.new :spec
|
||||
|
@ -20,9 +21,20 @@ DISTRIBUTIONS = [
|
|||
module Helpers
|
||||
module_function
|
||||
def binary_gemspec(platform = Gem::Platform.local)
|
||||
gemspec = eval(File.read 'libv8.gemspec')
|
||||
gemspec.platform = platform
|
||||
gemspec
|
||||
eval(File.read 'libv8.gemspec').tap do |gemspec|
|
||||
gemspec.platform = platform
|
||||
gemspec.extensions.clear
|
||||
|
||||
# We don't need most things for the binary
|
||||
gemspec.files = []
|
||||
gemspec.files += ['lib/libv8.rb', 'lib/libv8/version.rb']
|
||||
gemspec.files += ['ext/libv8/location.rb', 'ext/libv8/paths.rb']
|
||||
gemspec.files += ['ext/libv8/.location.yml']
|
||||
|
||||
# V8
|
||||
gemspec.files += Dir['vendor/v8/include/**/*.h']
|
||||
gemspec.files += Dir['vendor/v8/out.gn/**/*.a']
|
||||
end
|
||||
end
|
||||
|
||||
def binary_gem_name(platform = Gem::Platform.local)
|
||||
|
@ -38,28 +50,11 @@ end
|
|||
desc "build a binary gem #{Helpers.binary_gem_name}"
|
||||
task :binary => :compile do
|
||||
gemspec = Helpers.binary_gemspec
|
||||
gemspec.extensions.clear
|
||||
|
||||
# We don't need most things for the binary
|
||||
gemspec.files = []
|
||||
gemspec.files += ['lib/libv8.rb', 'lib/libv8/version.rb']
|
||||
gemspec.files += ['ext/libv8/location.rb', 'ext/libv8/paths.rb']
|
||||
gemspec.files += ['ext/libv8/.location.yml']
|
||||
|
||||
# V8
|
||||
gemspec.files += Dir['vendor/v8/include/**/*.h']
|
||||
gemspec.files += Dir['vendor/v8/out.gn/**/*.a']
|
||||
|
||||
FileUtils.chmod 0644, gemspec.files
|
||||
FileUtils.mkdir_p 'pkg'
|
||||
|
||||
package = if Gem::VERSION < '2.0.0'
|
||||
Gem::Builder.new(gemspec).build
|
||||
else
|
||||
require 'rubygems/package'
|
||||
Gem::Package.build gemspec
|
||||
end
|
||||
|
||||
package = Gem::Package.build gemspec
|
||||
FileUtils.mv package, 'pkg'
|
||||
end
|
||||
|
||||
|
@ -110,22 +105,56 @@ end
|
|||
task :default => [:compile, :spec]
|
||||
task :build => [:clean]
|
||||
|
||||
task :repack, [:gemfile, :new_arch] do |t, args|
|
||||
dir = Dir::mktmpdir
|
||||
desc 'Generate OSX platform builds. Although any v8 OSX compile will run on any Mac OS version down to 10.10, RubyGems requires us to submit all of the different platforms seperately. Requires `compile` to already have been run, but is seperate for Travis reasons.'
|
||||
task :osx_varients do
|
||||
gemspec = Helpers.binary_gemspec
|
||||
next unless Gem::Platform.local.os == 'darwin'
|
||||
|
||||
begin
|
||||
sh "gem unpack #{args[:gemfile]} --target=#{dir}"
|
||||
sh "gem spec #{args[:gemfile]} --ruby > #{dir}/repack.gemspec"
|
||||
Dir.chdir(dir) do
|
||||
sh "sed -iorig 's/^ s.platform = .*$/ s.platform = \"#{args[:new_arch]}\".freeze/' repack.gemspec"
|
||||
Dir.chdir(Dir.glob("libv8-*/").first) do
|
||||
sh 'mv ../repack.gemspec ./'
|
||||
sh 'gem build repack.gemspec'
|
||||
[15, 16, 17, 18, 19].each do |version|
|
||||
%w(x86_64 universal).each do |cpu|
|
||||
|
||||
gemspec.platform = Gem::Platform.local.tap do |platform|
|
||||
platform.cpu = cpu
|
||||
platform.version = version
|
||||
end
|
||||
end
|
||||
|
||||
sh "mv #{dir}/*/*.gem ./pkg/"
|
||||
ensure
|
||||
FileUtils.remove_entry_secure dir
|
||||
package = Gem::Package.build gemspec
|
||||
FileUtils.mv package, 'pkg'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc 'Push a release from github'
|
||||
task :push_github_release do
|
||||
|
||||
releases = (15..19).map do |i|
|
||||
["-universal-darwin-#{i}", "-x86_64-darwin-#{i}"]
|
||||
end.flatten
|
||||
|
||||
releases << ""
|
||||
releases << "-x86_64-linux"
|
||||
|
||||
FileUtils.mkdir_p("pkg")
|
||||
|
||||
Dir.chdir("pkg") do
|
||||
releases.each do |release|
|
||||
cmd = "wget https://github.com/rubyjs/libv8/releases/download/v#{Libv8::VERSION}/libv8-#{Libv8::VERSION}#{release}.gem"
|
||||
puts cmd
|
||||
puts `#{cmd}`
|
||||
end
|
||||
|
||||
otp = 111111
|
||||
Dir["*#{Libv8::VERSION}*.gem"].each do |f|
|
||||
puts "pushing #{f}"
|
||||
begin
|
||||
result = `gem push #{f} --otp #{otp}`
|
||||
if result =~ /OTP code is incorrect/
|
||||
puts "enter otp"
|
||||
otp = STDIN.gets.strip
|
||||
redo
|
||||
end
|
||||
end
|
||||
puts result
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ module Libv8
|
|||
target_cpu="#{libv8_arch}"
|
||||
v8_target_cpu="#{libv8_arch}"
|
||||
treat_warnings_as_errors=false
|
||||
v8_enable_i18n_support=false).join(' ')
|
||||
icu_use_data_file=false).join(' ')
|
||||
end
|
||||
|
||||
def generate_gn_args
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Libv8
|
||||
VERSION = "7.3.492.27.1"
|
||||
VERSION = "8.4.255.0"
|
||||
end
|
||||
|
|
|
@ -7,13 +7,11 @@ Gem::Specification.new do |s|
|
|||
s.platform = Gem::Platform::RUBY
|
||||
s.authors = ["Charles Lowell"]
|
||||
s.email = ["cowboyd@thefrontside.net"]
|
||||
s.homepage = "http://github.com/cowboyd/libv8"
|
||||
s.homepage = "http://github.com/rubyjs/libv8"
|
||||
s.summary = %q{Distribution of the V8 JavaScript engine}
|
||||
s.description = %q{Distributes the V8 JavaScript engine in binary and source forms in order to support fast builds of The Ruby Racer}
|
||||
s.license = "MIT"
|
||||
|
||||
s.rubyforge_project = "libv8"
|
||||
|
||||
s.files = `git ls-files`.split("\n").reject {|f| f =~ /^release\//}
|
||||
|
||||
submodules = `git submodule --quiet foreach 'echo $path'`.split("\n").map(&:chomp)
|
||||
|
|
2
vendor/depot_tools
vendored
2
vendor/depot_tools
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 0d8271895be710d8d04130b5dfa96c002cada6c2
|
||||
Subproject commit 9d9199a509bf792d7d24ac91d92ed0d111f8d9fb
|
Loading…
Add table
Reference in a new issue