Skip to content

Commit d018fb6

Browse files
committed
Merge pull request #162 in G/truffleruby from merge-release-rc2-branch to master
* commit 'a628175aa00a045dc23dffb5b3fadf4b5bb72b6f': (29 commits) New CE/EE version string Run PE tests in Docker for --jvm Accommodate ce/ee prefix, and build suffix, in tarballs gu install --file now Ubuntu needs the post-install hook to be run gu install -c org.graalvm.ruby is now gu install org.graalvm.ruby Remove old Docker infrastructure Missing keep file Fixes Use ENV rather than a wrapper script Use fetch rather than normal hash lookup in the Docker tool Hardcode the working directory code in Docker Update version regexp Tidy up Docker command parsing Use full ruby-installable.jar name in documentation Re-arrange --rebuild-images logic Break up a long line Don't write Dockerfiles to the root directory --rebuild-images needs gcc jt docker tool ...
2 parents e8d03d2 + a628175 commit d018fb6

File tree

2 files changed

+40
-41
lines changed

2 files changed

+40
-41
lines changed

3rd_party_licenses.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
LICENSING INFORMATION
1+
LICENSING INFORMATION
22
TruffleRuby
33

44
===============================================================================
55

6-
7-
LICENSES FOR THIRD-PARTY COMPONENTS
6+
LICENSES FOR THIRD-PARTY COMPONENTS
87

98
The following sections contain licensing information for libraries that we have
109
included with the GraalVM Community Edition 1.0 source and components used to

tool/jt.rb

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ def verify_native_bin!
18581858
raise "Could not find native image -- either build with 'jt build native' or set AOT_BIN to an image location"
18591859
end
18601860
end
1861-
1861+
18621862
def docker(*args)
18631863
command = args.shift
18641864
case command
@@ -1874,7 +1874,7 @@ def docker(*args)
18741874
abort "Unkown jt docker command #{command}"
18751875
end
18761876
end
1877-
1877+
18781878
def docker_build(*args)
18791879
if args.first.nil? || args.first.start_with?('--')
18801880
image_name = 'truffleruby-test'
@@ -1885,25 +1885,25 @@ def docker_build(*args)
18851885
File.write(File.join(docker_dir, 'Dockerfile'), dockerfile(*args))
18861886
sh 'docker', 'build', '-t', image_name, '.', chdir: docker_dir
18871887
end
1888-
1888+
18891889
def docker_test(*args)
18901890
distros = ['--ol7', '--ubuntu1604', '--fedora25']
18911891
managers = ['--no-manager', '--rbenv', '--chruby', '--rvm']
1892-
1892+
18931893
distros.each do |distro|
18941894
managers.each do |manager|
18951895
docker 'build', distro, manager, *args
18961896
end
18971897
end
18981898
end
1899-
1899+
19001900
def docker_print(*args)
19011901
puts dockerfile(*args)
19021902
end
1903-
1903+
19041904
def dockerfile(*args)
19051905
config = @config ||= YAML.load_file(File.join(TRUFFLERUBY_DIR, 'tool', 'docker-configs.yaml'))
1906-
1906+
19071907
truffleruby_repo = 'https://github.com/oracle/truffleruby.git'
19081908
distro = 'ubuntu1604'
19091909
install_method = :public
@@ -1913,7 +1913,7 @@ def dockerfile(*args)
19131913
manager = :none
19141914
basic_test = false
19151915
full_test = false
1916-
1916+
19171917
until args.empty?
19181918
arg = args.shift
19191919
case arg
@@ -1951,47 +1951,47 @@ def dockerfile(*args)
19511951
abort "unknown option #{arg}"
19521952
end
19531953
end
1954-
1954+
19551955
distro = config.fetch(distro)
19561956
run_post_install_hook = rebuild_openssl && distro.fetch('post-install')
19571957

19581958
lines = []
1959-
1959+
19601960
lines.push "FROM #{distro.fetch('base')}"
1961-
1961+
19621962
lines.push *distro.fetch('setup')
1963-
1963+
19641964
lines.push *distro.fetch('locale')
1965-
1965+
19661966
lines.push *distro.fetch('curl') if install_method == :public
19671967
lines.push *distro.fetch('git') if install_method == :source || manager != :none || full_test
19681968
lines.push *distro.fetch('which') if manager == :rvm || full_test
19691969
lines.push *distro.fetch('find') if full_test
19701970
lines.push *distro.fetch('rvm') if manager == :rvm
19711971
lines.push *distro.fetch('source') if install_method == :source
19721972
lines.push *distro.fetch('images') if rebuild_images
1973-
1973+
19741974
lines.push *distro.fetch('openssl')
19751975
lines.push *distro.fetch('cext')
19761976
lines.push *distro.fetch('cppext')
1977-
1977+
19781978
lines.push "WORKDIR /test"
19791979
lines.push "RUN useradd -ms /bin/bash test"
19801980
lines.push "RUN chown test /test"
19811981
lines.push "USER test"
1982-
1982+
19831983
docker_dir = File.join(TRUFFLERUBY_DIR, 'tool', 'docker')
1984-
1984+
19851985
case install_method
19861986
when :graalvm
19871987
tarball = graalvm_tarball
19881988
when :standalone
19891989
tarball = standalone_tarball
19901990
end
1991-
1991+
19921992
if defined?(tarball)
19931993
graalvm_version = /([ce]e-)?\d+(\.\d+)*(-rc\d+)?(\-dev)?(-\h+)?/.match(tarball).to_s
1994-
1994+
19951995
# Test build tarballs may have a -bn suffix, which isn't really part of the version string but matches the hex part in some cases
19961996
graalvm_version = graalvm_version.gsub(/-b\d+\Z/, '')
19971997
end
@@ -2050,19 +2050,19 @@ def dockerfile(*args)
20502050
lines.push "ENV D_RUBY_BASE=/test/truffleruby"
20512051
lines.push "ENV D_RUBY_BIN=$D_RUBY_BASE/bin"
20522052
end
2053-
2053+
20542054
if rebuild_images
20552055
if [:public, :graalvm].include?(install_method)
20562056
lines.push "RUN $D_GRAALVM_BASE/bin/gu rebuild-images ruby"
20572057
else
20582058
abort "can't rebuild images for a build not from public or from local GraalVM components"
20592059
end
20602060
end
2061-
2061+
20622062
case manager
20632063
when :none
20642064
lines.push "ENV PATH=$D_RUBY_BASE/bin:$PATH"
2065-
2065+
20662066
setup_env = lambda do |command|
20672067
command
20682068
end
@@ -2074,9 +2074,9 @@ def dockerfile(*args)
20742074

20752075
lines.push "RUN ln -s $D_RUBY_BASE /home/test/.rbenv/versions/truffleruby"
20762076
lines.push "RUN rbenv versions"
2077-
2077+
20782078
prefix = 'eval "$(rbenv init -)" && rbenv shell truffleruby'
2079-
2079+
20802080
setup_env = lambda do |command|
20812081
"eval \"$(rbenv init -)\" && rbenv shell truffleruby && #{command}"
20822082
end
@@ -2104,25 +2104,25 @@ def dockerfile(*args)
21042104
"bash -c 'source $RVM_SCRIPT && rvm use ext-truffleruby && #{command.gsub("'", "'\\\\''")}'"
21052105
end
21062106
end
2107-
2107+
21082108
configs = ['']
21092109
configs += ['--jvm'] if [:public, :graalvm].include?(install_method)
21102110
configs += ['--native'] if [:public, :graalvm, :standalone].include?(install_method)
2111-
2111+
21122112
configs.each do |config|
21132113
lines.push "RUN " + setup_env["ruby #{config} --version"]
21142114
end
2115-
2115+
21162116
if basic_test || full_test
21172117
configs.each do |config|
21182118
lines.push "RUN cp -r $D_RUBY_BASE/lib/ruby/gems /test/clean-gems"
2119-
2119+
21202120
if config == '' && install_method != :source
21212121
gem = "gem"
21222122
else
21232123
gem = "ruby #{config} -Sgem"
21242124
end
2125-
2125+
21262126
lines.push "RUN " + setup_env["#{gem} install color"]
21272127
lines.push "RUN " + setup_env["ruby #{config} -rcolor -e 'raise unless defined?(Color)'"]
21282128

@@ -2131,46 +2131,46 @@ def dockerfile(*args)
21312131

21322132
lines.push "RUN " + setup_env["#{gem} install unf"]
21332133
lines.push "RUN " + setup_env["ruby #{config} -runf -e 'raise unless defined?(UNF)'"]
2134-
2134+
21352135
lines.push "RUN rm -rf $D_RUBY_BASE/lib/ruby/gems"
21362136
lines.push "RUN mv /test/clean-gems $D_RUBY_BASE/lib/ruby/gems"
21372137
end
21382138
end
2139-
2139+
21402140
if full_test
21412141
lines.push "RUN git clone --depth 1 --branch #{test_branch} #{truffleruby_repo} truffleruby-tests"
21422142
lines.push "RUN cp -r truffleruby-tests/spec ."
21432143
lines.push "RUN cp -r truffleruby-tests/test/truffle/compiler/pe ."
21442144
lines.push "RUN rm -rf truffleruby-tests"
2145-
2145+
21462146
configs.each do |config|
21472147
excludes = ['fails', 'slow', 'ci']
21482148
excludes += ['graalvm'] if [:public, :graalvm].include?(install_method)
21492149
excludes += ['aot'] if ['', '--native'].include?(config)
2150-
2150+
21512151
[':command_line', ':security', ':language', ':core', ':library', ':capi', ':library_cext', ':truffle'].each do |set|
21522152
t_config = config.empty? ? '' : '-T' + config
21532153
t_excludes = excludes.map { |e| '--excl-tag ' + e }.join(' ')
21542154
lines.push "RUN " + setup_env["ruby spec/mspec/bin/mspec --config spec/truffle.mspec -t $D_RUBY_BIN/ruby #{t_config} #{t_excludes} #{set}"]
21552155
end
21562156
end
2157-
2157+
21582158
configs.each do |config|
21592159
if config == '--jvm'
21602160
d = '-J-'
21612161
else
21622162
d = '--native.'
21632163
end
2164-
2164+
21652165
lines.push "RUN " + setup_env["ruby #{config} #{d}Dgraal.TruffleCompilationExceptionsAreThrown=true #{d}Dgraal.TruffleIterativePartialEscape=true -Xbasic_ops.inline=false pe/pe.rb"]
21662166
end
21672167
end
2168-
2168+
21692169
lines.push "CMD " + setup_env["bash"]
2170-
2170+
21712171
lines.join("\n") + "\n"
21722172
end
2173-
2173+
21742174
def docker_extract_standalone(*args)
21752175
graalvm_component = args.shift
21762176
version = args.shift

0 commit comments

Comments
 (0)