1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00

Compare commits

..

27 commits

Author SHA1 Message Date
Sam Saffron
4cac62479a
Added small script to push a release from GitHub to rubygems 2020-07-22 09:02:44 +10:00
nightpool
90ea31f215 .org key instead of .com key 2020-07-20 21:31:22 -04:00
nightpool
62ee7fa2ee New Travis deploy key (old one 401s) 2020-07-20 18:19:36 -04:00
nightpool
e8a9669de8
Merge pull request #303 from nightpool/update_osx_builds
Update mac OS build configuration
2020-07-20 16:36:27 -04:00
nightpool
07705eddb6 Update mac OS build compilation to be faster and support more platforms 2020-07-20 16:28:37 -04:00
Sam
2d5250a069
Merge pull request #301 from nightpool/8.4.255
Update to 8.4.255
2020-07-20 10:55:25 +10:00
nightpool
ffc7bb0c24 bug fixes 2020-07-18 12:24:54 -04:00
nightpool
818cc4ef84 Revamp Travis configuration files for automatic deployment
We now build against three darwin versions (Sierra, High Sierra and Catalina)
to match Ruby core. We continue to build against 3 ruby versions on Linux, but
we only deploy the ruby 2.7 builds (since they should all be identical).
2020-07-17 17:09:36 -04:00
nightpool
43902f09ea Bundle ICU data files
Otherwise, attempts to use the i18n api (toLocaleString, Intl, etc)
raise the TypeError 'Internal error. Icu error.'
2020-07-17 17:08:09 -04:00
nightpool
c46dcba41a Use last good version before build error
Using bisect, I was able to find that the build error was introduced in
5bbca548e9,
so let's use the version before that one while we wait for upstream to
merge the patch (https://bugs.chromium.org/p/v8/issues/detail?id=10708)
2020-07-17 17:07:11 -04:00
nightpool
5c7c6e3966 update to 8.4.371.19
This requires changing our checkout strategy to check out the branch-heads branch (as documented at https://v8.dev/docs/version-numbers) instead of using the 8.4.371 branch, which never gets patches (it's always locked to 8.4.371.0).

We could also specify the v8 patch version manually, and i'm open to doing that, just wanted to do this to get it working.
2020-07-17 17:06:55 -04:00
Sam
fcf04ce786
Update v8 to 7.3.495.0
Bump to 7.3.495.0
2020-04-23 14:24:35 +10:00
Trung Lê
5c924d4e2c Remove rbx testing
Travis CI no longer offer up-to-date rbx, plus the project has not gained enough community attention
2020-04-15 01:24:16 +10:00
Trung Lê
279d2cadc7 Test against Ruby 2.6 on macOS 2020-04-15 01:09:20 +10:00
Trung Lê
a5850d9e20 Test against Ruby 2.7 2020-04-15 01:08:00 +10:00
Trung Lê
dee91ce99f Test against latest Ruby 2.5 on OSX 2020-04-15 01:07:12 +10:00
Trung Lê
1a95528b09 s/cowboyd/runjs 2020-04-15 01:02:00 +10:00
Trung Lê
0b1d3307d7 Update README 2020-04-15 00:59:08 +10:00
Trung Lê
0f80921e2c s/rubinius-3/rbx 2020-04-15 00:56:34 +10:00
Trung Lê
2652512973 Remove testing against XCode 9.2
Upstream setuptools, pip and wheel yields dyld: lazy symbol binding failed: Symbol not found: _utimensat error
2020-04-15 00:14:52 +10:00
Trung Lê
2c3f6293e2 Fix failed Xcode9.2 failed build 2020-04-14 23:25:19 +10:00
Trung Lê
ba871661a1 Update old gemspec details 2020-04-14 22:39:03 +10:00
Trung Lê
d6219df22f Drop test on Ruby 2.4 2020-04-14 22:38:43 +10:00
Trung Lê
14665afe39 Update CHANGELOG 2020-04-14 22:09:42 +10:00
Trung Lê
2cce1340f7
Bump to 7.3.495.0 2020-04-14 19:36:08 +10:00
Petko Bordjukov
5fc4ac7aba Update the changelog and bump the version 2019-05-03 10:13:12 +03:00
Petko Bordjukov
d85b88cd60 Enable i18n support
As described in #278, having I18n support disabled limits the functionality of
regular expressions.

This commit enables I18n support in the resulting library.
2019-04-26 11:30:24 +03:00
9 changed files with 100 additions and 66 deletions

1
.gitignore vendored
View file

@ -15,4 +15,5 @@ lib/libv8/VERSION
/release/**/.scaleway
/vendor/.gclient
/vendor/.gclient_entries
/vendor/.cipd
/vendor/v8/

View file

@ -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

View file

@ -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

View file

@ -1,7 +1,7 @@
# libv8
[![Gem Version](https://badge.fury.io/rb/libv8.svg)](https://badge.fury.io/rb/libv8)
[![Number of downloads](https://ruby-gem-downloads-badge.herokuapp.com/libv8?type=total)](https://rubygems.org/gems/libv8)
[![Build Status](https://travis-ci.org/cowboyd/libv8.svg?branch=master)](https://travis-ci.org/cowboyd/libv8)
[![Build Status](https://travis-ci.org/rubyjs/libv8.svg?branch=master)](https://travis-ci.org/rubyjs/libv8)
[![Join the chat at https://gitter.im/cowboyd/therubyracer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cowboyd/therubyracer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Code Triagers Badge](https://www.codetriage.com/cowboyd/libv8/badges/users.svg)](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.

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,3 @@
module Libv8
VERSION = "7.3.492.27.1"
VERSION = "8.4.255.0"
end

View file

@ -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

@ -1 +1 @@
Subproject commit 0d8271895be710d8d04130b5dfa96c002cada6c2
Subproject commit 9d9199a509bf792d7d24ac91d92ed0d111f8d9fb