bungee_gum 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/README.md +1 -1
- data/lib/bungee_gum/ruby_build.rb +67 -24
- data/lib/bungee_gum/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b73801021ed4fc17f2998128096f4445754dd23871b09f6e8a1f872fb901c8
|
4
|
+
data.tar.gz: d6d36b10813c32094fa31dfb32c46ebef7b51d23af26a2a41f46577a88b9c62e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 498637804c88a1d7b390fc12b17861ed424c31bd629163d043f789a26ea490944d24353cc81aba821ddb48d2ceaca8dfbd9a4d5e23d3b93cd2872c5f791489d5
|
7
|
+
data.tar.gz: 72097de84ff8d341c6e5d65d4b2853202b3c4d6630d0f6fd4640eb1cf857c3f9387594d8ad000ebe7c4a9cce98e950cb5ffcb689e37dbbb749e8029800469d4f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.1.3] - 2024-04-26
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Added the following options.
|
8
|
+
- `--with-force-yjit`
|
9
|
+
- `--only-force-yjit`
|
10
|
+
- `--with-force-rjit`
|
11
|
+
- `--only-force-rjit`
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
|
15
|
+
- Changed from 'cppflags=-DRJIT_FORCE_ENABLE' to '--enable-rjit --disable-yjit' that the options used with '--with-rjit' and '--only-rjit'.
|
16
|
+
- Changed help messages for `--with-universalparser`, `--only-universalparser`, `--with-yjit`, `--only-yjit`, `--with-rjit`, and `--only-rjit`.
|
17
|
+
|
18
|
+
## [0.1.2] - 2024-04-08
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
|
22
|
+
- Fixed a bug where bungee_gum would not build as expected when run for the first time.
|
23
|
+
- Revised the README.
|
24
|
+
|
3
25
|
## [0.1.1] - 2023-12-12
|
4
26
|
|
5
27
|
### Fixed
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -39,7 +39,7 @@ This Code of Conduct applies within all community spaces, and also applies when
|
|
39
39
|
|
40
40
|
## Enforcement
|
41
41
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jinroq@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
43
|
|
44
44
|
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
45
|
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Bungee Gum collects Ruby building and testing logs.
|
6
6
|
|
7
|
-
This gem gets the latest source code from the [ruby/ruby](https://github.com/ruby/ruby) master branch. Then, build source codes in the same way as ["Building Ruby"](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html). And also run tests (i.e. `make test-all`).
|
7
|
+
This gem gets the latest source code from the [ruby/ruby](https://github.com/ruby/ruby) master branch. Then, build source codes in the same way as ["Building Ruby"](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html). And also run tests (i.e. `make test-all`). For build dependencies, see [Dependencies](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html#label-Dependencies).
|
8
8
|
|
9
9
|
Log files are compressed as `.gz` and saved in `logs` directory. `logs` directory will be created in the same directory as the directory where Bungee Gum is executed.
|
10
10
|
|
@@ -9,20 +9,24 @@ class BungeeGum::RubyBuild
|
|
9
9
|
FOR_BUILD_REPOSITORY = 'build-ruby-repo'
|
10
10
|
FOR_UP_BUILD_REPOSITORY = 'build-up-ruby-repo'
|
11
11
|
FOR_YJIT_BUILD_REPOSITORY = 'build-yjit-ruby-repo'
|
12
|
+
FOR_FORCE_YJIT_BUILD_REPOSITORY = 'build-force-yjit-ruby-repo'
|
12
13
|
FOR_RJIT_BUILD_REPOSITORY = 'build-rjit-ruby-repo'
|
14
|
+
FOR_FORCE_RJIT_BUILD_REPOSITORY = 'build-force-rjit-ruby-repo'
|
13
15
|
|
14
16
|
INSTALL_PREFIX_BASE = "#{Dir.home}/.rubies"
|
15
17
|
INSTALL_PREFIX_RUBY = "#{INSTALL_PREFIX_BASE}/ruby-master"
|
16
18
|
INSTALL_PREFIX_RUBY_UP = "#{INSTALL_PREFIX_BASE}/ruby-universal-parser"
|
17
19
|
INSTALL_PREFIX_RUBY_YJIT = "#{INSTALL_PREFIX_BASE}/ruby-yjit"
|
20
|
+
INSTALL_PREFIX_RUBY_FORCE_YJIT = "#{INSTALL_PREFIX_BASE}/ruby-force-yjit"
|
18
21
|
INSTALL_PREFIX_RUBY_RJIT = "#{INSTALL_PREFIX_BASE}/ruby-rjit"
|
22
|
+
INSTALL_PREFIX_RUBY_FORCE_RJIT = "#{INSTALL_PREFIX_BASE}/ruby-force-rjit"
|
19
23
|
|
20
24
|
def initialize
|
21
25
|
@base_ruby_repo = "#{Dir.pwd}/#{LOCAL_RUBY_REPOSITORY}"
|
22
26
|
@working_dir = {}
|
23
27
|
@now = Time.now.strftime('%Y%m%d%H%M%S')
|
24
28
|
@opt = OptionParser.new
|
25
|
-
@opt.version =
|
29
|
+
@opt.version = BungeeGum::VERSION
|
26
30
|
end
|
27
31
|
|
28
32
|
def run
|
@@ -33,42 +37,60 @@ class BungeeGum::RubyBuild
|
|
33
37
|
param[:only] = {}
|
34
38
|
param[:skip] = {}
|
35
39
|
|
36
|
-
opt.on('--with-universalparser', 'Add `--with-universalparser` if you also would like to build with Universal Parser
|
40
|
+
@opt.on('--with-universalparser', 'Add `--with-universalparser` if you also would like to build with enabled Universal Parser. This is equivalent to adding `cppflags=-DUNIVERSAL_PARSER`.') {|v|
|
37
41
|
param[:with][:up] = v
|
38
42
|
params << '--with-universalparser'
|
39
43
|
}
|
40
|
-
opt.on('--only-universalparser', 'Add `--only-universalparser` if you would like to build with only Universal Parser
|
44
|
+
@opt.on('--only-universalparser', 'Add `--only-universalparser` if you would like to build with only enabled Universal Parser. This is equivalent to adding `cppflags=-DUNIVERSAL_PARSER`. This option can not be used in conjunction with other options.') {|v|
|
41
45
|
param[:only][:up] = v
|
42
46
|
params << '--only-universalparser'
|
43
47
|
}
|
44
|
-
opt.on('--with-yjit', 'Add `--with-yjit` if you also would like to build with YJIT
|
48
|
+
@opt.on('--with-yjit', 'Add `--with-yjit` if you also would like to build with enabled YJIT. This is equivalent to adding `--enable-yjit`.') {|v|
|
45
49
|
param[:with][:yjit] = v
|
46
50
|
params << '--with-yjit'
|
47
51
|
}
|
48
|
-
opt.on('--only-yjit', 'Add `--only-yjit` if you would like to build with only YJIT
|
52
|
+
@opt.on('--only-yjit', 'Add `--only-yjit` if you would like to build with only enabled YJIT. This is equivalent to adding `--enable-yjit`. This option can not be used in conjunction with other options.') {|v|
|
49
53
|
param[:only][:yjit] = v
|
50
54
|
params << '--only-yjit'
|
51
55
|
}
|
52
|
-
opt.on('--with-
|
56
|
+
@opt.on('--with-force-yjit', 'Add `--with-force-yjit` if you also would like to build with enabled YJIT. This is equivalent to adding `cppflags=-DYJIT_FORCE_ENABLE`.') {|v|
|
57
|
+
param[:with][:force_yjit] = v
|
58
|
+
params << '--with-force-yjit'
|
59
|
+
}
|
60
|
+
@opt.on('--only-force-yjit', 'Add `--only-force-yjit` if you would like to build with only enabled YJIT. This is equivalent to adding `cppflags=-DYJIT_FORCE_ENABLE`. This option can not be used in conjunction with other options.') {|v|
|
61
|
+
param[:only][:force_yjit] = v
|
62
|
+
params << '--only-force-yjit'
|
63
|
+
}
|
64
|
+
@opt.on('--with-rjit', 'Add `--with-rjit` if you also would like to build with enabled RJIT. This is equivalent to adding `--enable-rjit --disable-yjit`.') {|v|
|
53
65
|
param[:with][:rjit] = v
|
54
66
|
params << '--with-rjit'
|
55
67
|
}
|
56
|
-
opt.on('--only-rjit', 'Add `--only-rjit` if you would like to build with only RJIT
|
68
|
+
@opt.on('--only-rjit', 'Add `--only-rjit` if you would like to build with only enabled RJIT. This is equivalent to adding `--enable-rjit --disable-yjit`. This option can not be used in conjunction with other options.') {|v|
|
57
69
|
param[:only][:rjit] = v
|
58
70
|
params << '--only-rjit'
|
59
71
|
}
|
60
|
-
opt.on('--
|
72
|
+
@opt.on('--with-force-rjit', 'Add `--with-force-rjit` if you also would like to build with enabled RJIT. This is equivalent to adding `cppflags=-DRJIT_FORCE_ENABLE`.') {|v|
|
73
|
+
param[:with][:force_rjit] = v
|
74
|
+
params << '--with-force-rjit'
|
75
|
+
}
|
76
|
+
@opt.on('--only-force-rjit', 'Add `--only-force-rjit` if you would like to build with only enabled RJIT. This is equivalent to adding `cppflags=-DRJIT_FORCE_ENABLE`. This option can not be used in conjunction with other options.') {|v|
|
77
|
+
param[:only][:force_rjit] = v
|
78
|
+
params << '--only-force-rjit'
|
79
|
+
}
|
80
|
+
@opt.on('--all-build', 'Add `--all-build` if you would like to build with all patterns that include `cppflags` option') {|v|
|
61
81
|
param[:all_build] = v
|
62
82
|
params << '--all-build'
|
63
83
|
}
|
64
|
-
opt.parse!(ARGV)
|
84
|
+
@opt.parse!(ARGV)
|
65
85
|
|
66
86
|
if param[:only].keys.size > 1 ||
|
67
87
|
(param[:only].keys.size == 1 && !param[:with].empty?) ||
|
68
88
|
(param[:only].keys.size == 1 && !!param[:all_build])
|
69
|
-
|
70
|
-
|
71
|
-
|
89
|
+
only_error('--only-universalparser') if params.include?('--only-universalparser')
|
90
|
+
only_error('--only-yjit') if params.include?('--only-yjit')
|
91
|
+
only_error('--only-force-yjit') if params.include?('--only-force-yjit')
|
92
|
+
only_error('--only-rjit') if params.include?('--only-rjit')
|
93
|
+
only_error('--only-force-rjit') if params.include?('--only-force-rjit')
|
72
94
|
|
73
95
|
exit 1
|
74
96
|
end
|
@@ -106,13 +128,33 @@ class BungeeGum::RubyBuild
|
|
106
128
|
}
|
107
129
|
end
|
108
130
|
|
131
|
+
if param[:only][:force_yjit] || param[:with][:force_yjit] || param[:all_build]
|
132
|
+
clone_or_pull(FOR_FORCE_YJIT_BUILD_REPOSITORY)
|
133
|
+
fork {
|
134
|
+
make_and_test(
|
135
|
+
FOR_FORCE_YJIT_BUILD_REPOSITORY,
|
136
|
+
'force-yjit',
|
137
|
+
"--prefix=#{INSTALL_PREFIX_RUBY_FORCE_YJIT} cppflags=-DYJIT_FORCE_ENABLE --disable-install-doc")
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
109
141
|
if param[:only][:rjit] || param[:with][:rjit] || param[:all_build]
|
110
142
|
clone_or_pull(FOR_RJIT_BUILD_REPOSITORY)
|
111
143
|
fork {
|
112
144
|
make_and_test(
|
113
145
|
FOR_RJIT_BUILD_REPOSITORY,
|
114
146
|
'rjit',
|
115
|
-
"--prefix=#{INSTALL_PREFIX_RUBY_RJIT}
|
147
|
+
"--prefix=#{INSTALL_PREFIX_RUBY_RJIT} --enable-rjit --disable-yjit --disable-install-doc")
|
148
|
+
}
|
149
|
+
end
|
150
|
+
|
151
|
+
if param[:only][:force_rjit] || param[:with][:force_rjit] || param[:all_build]
|
152
|
+
clone_or_pull(FOR_FORCE_RJIT_BUILD_REPOSITORY)
|
153
|
+
fork {
|
154
|
+
make_and_test(
|
155
|
+
FOR_FORCE_RJIT_BUILD_REPOSITORY,
|
156
|
+
'force-rjit',
|
157
|
+
"--prefix=#{INSTALL_PREFIX_RUBY_FORCE_RJIT} cppflags=-DRJIT_FORCE_ENABLE --disable-install-doc")
|
116
158
|
}
|
117
159
|
end
|
118
160
|
|
@@ -121,34 +163,31 @@ class BungeeGum::RubyBuild
|
|
121
163
|
|
122
164
|
private
|
123
165
|
|
124
|
-
attr_accessor :working_dir
|
125
|
-
attr_reader :base_ruby_repo, :now, :opt
|
126
|
-
|
127
166
|
def clone_or_pull(repo_dir, from_gh = false)
|
128
167
|
key = repo_dir.to_sym
|
129
|
-
working_dir[key] = "#{Dir.pwd}/#{repo_dir}"
|
130
|
-
wd = working_dir[key]
|
168
|
+
@working_dir[key] = "#{Dir.pwd}/#{repo_dir}"
|
169
|
+
wd = @working_dir[key]
|
131
170
|
if Dir.exist?("#{wd}/.git")
|
132
|
-
g = Git.open(wd, :
|
171
|
+
g = Git.open(wd, log: Logger.new(STDOUT))
|
133
172
|
g.pull
|
134
173
|
else
|
135
174
|
if from_gh
|
136
175
|
Git.clone(GITHUB_RUBY_REPOSITORY, repo_dir)
|
137
176
|
else
|
138
|
-
Git.clone(base_ruby_repo, repo_dir)
|
177
|
+
Git.clone(@base_ruby_repo, repo_dir)
|
139
178
|
end
|
140
179
|
end
|
141
180
|
end
|
142
181
|
|
143
182
|
def make_and_test(repo_dir, build_type, configure_option)
|
144
|
-
wd = working_dir[repo_dir.to_sym]
|
183
|
+
wd = @working_dir[repo_dir.to_sym]
|
145
184
|
current_dir = Dir.pwd
|
146
185
|
|
147
|
-
build_gz = "#{current_dir}/logs/ruby-#{build_type}-build.#{now}.log.gz"
|
148
|
-
test_gz = "#{current_dir}/logs/ruby-#{build_type}-test.#{now}.log.gz"
|
186
|
+
build_gz = "#{current_dir}/logs/ruby-#{build_type}-build.#{@now}.log.gz"
|
187
|
+
test_gz = "#{current_dir}/logs/ruby-#{build_type}-test.#{@now}.log.gz"
|
149
188
|
|
150
189
|
Dir.chdir(wd) do
|
151
|
-
unless
|
190
|
+
unless File.exist?('configure')
|
152
191
|
system('./autogen.sh > /dev/null 2>&1')
|
153
192
|
system("./configure #{configure_option} > /dev/null 2>&1")
|
154
193
|
end
|
@@ -164,4 +203,8 @@ class BungeeGum::RubyBuild
|
|
164
203
|
file.close
|
165
204
|
end
|
166
205
|
end
|
206
|
+
|
207
|
+
def only_error(option)
|
208
|
+
puts "`#{option}` can not be used in conjunction with other options."
|
209
|
+
end
|
167
210
|
end
|
data/lib/bungee_gum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bungee_gum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jinroq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -24,11 +24,11 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.18'
|
27
|
-
description: This gem gets the latest source code from the
|
28
|
-
|
29
|
-
And also run tests (i.e. `make test-all`).
|
27
|
+
description: This gem gets the latest source code from the ruby/ruby master branch
|
28
|
+
at GitHub. Then, build source codes in the same way as "Building Ruby" at Ruby Reference
|
29
|
+
Manual. And also run tests (i.e. execute to `make test-all`).
|
30
30
|
email:
|
31
|
-
-
|
31
|
+
- jinroq@users.noreply.github.com
|
32
32
|
executables:
|
33
33
|
- bgum
|
34
34
|
extensions: []
|
@@ -44,13 +44,14 @@ files:
|
|
44
44
|
- lib/bungee_gum/ruby_build.rb
|
45
45
|
- lib/bungee_gum/version.rb
|
46
46
|
- sig/bungee_gum.rbs
|
47
|
-
homepage: https://
|
47
|
+
homepage: https://rubygems.org/gems/bungee_gum
|
48
48
|
licenses:
|
49
49
|
- MIT
|
50
50
|
metadata:
|
51
|
-
homepage_uri: https://
|
51
|
+
homepage_uri: https://rubygems.org/gems/bungee_gum
|
52
52
|
source_code_uri: https://github.com/jinroq/bungee_gum
|
53
53
|
changelog_uri: https://github.com/jinroq/bungee_gum/blob/main/CHANGELOG.md
|
54
|
+
bug_tracker_uri: https://github.com/jinroq/bungee_gum/issues
|
54
55
|
post_install_message:
|
55
56
|
rdoc_options: []
|
56
57
|
require_paths:
|
@@ -66,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
67
|
- !ruby/object:Gem::Version
|
67
68
|
version: '0'
|
68
69
|
requirements: []
|
69
|
-
rubygems_version: 3.5.
|
70
|
+
rubygems_version: 3.5.9
|
70
71
|
signing_key:
|
71
72
|
specification_version: 4
|
72
73
|
summary: This gem collects Ruby building and testing logs.
|