Skip to content

Commit 786dd57

Browse files
committed
[GR-16742] Update Docker testing for the separate native-image installable.
PullRequest: truffleruby/915
2 parents e832ab8 + 0f9f808 commit 786dd57

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

doc/contributor/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ $ jt docker print --fedora28 --source --rvm
3030
Or, to run a full set of tests on a set of new release candidate tarballs:
3131

3232
```bash
33-
$ jt docker test --graalvm graalvm-ce.tar.gz ruby-installable.jar --test release_branch
34-
$ jt docker test --graalvm graalvm-ee.tar.gz ruby-installable.jar --test release_branch
35-
$ jt docker test --graalvm graalvm-ee.tar.gz ruby-installable.jar --rebuild-images --test release_branch
33+
$ jt docker test --graalvm graalvm-ce.tar.gz ruby-installable-ce.jar --test release_branch
34+
$ jt docker test --graalvm graalvm-ee.tar.gz ruby-installable-ee.jar --test release_branch
35+
$ jt docker test --graalvm graalvm-ee.tar.gz ruby-installable-ee.jar --rebuild-images native-image-installable-ee.jar --test release_branch
3636
$ jt docker test --standalone truffleruby-linux-amd64.tar.gz --test release_branch
3737
```
3838

@@ -74,7 +74,7 @@ Pick any of:
7474
## Other options
7575

7676
* Print the Dockerfile rather than building it, `print` instead of `build`
77-
* Rebuild images after installing the Ruby component, `--rebuild-images`
77+
* Rebuild `polyglot` and `libpolyglot` images after installing the Ruby component, `--rebuild-images`
7878
* Run a full set of Docker tests we care about, `test` instead of `build`
7979
* Use a custom TruffleRuby repo, `--repo url`
8080
* Do not rebuild `openssl`, to test error messages, `--no-rebuild-openssl`

doc/user/installing-graalvm.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,15 @@ You can also download the Ruby component (`ruby-installable-...`) manually from
5656
https://github.com/oracle/truffleruby/releases. Then install it with
5757
`gu install --file path/to/ruby-installable-...`.
5858

59-
If you install Ruby into the Enterprise Edition of GraalVM, you should then
60-
rebuild the Ruby executable images using the runtime from the Enterprise
61-
Edition. The version of the Ruby executable images you install by default uses
62-
the Community Edition runtime until you rebuild.
59+
If you are installing Ruby into GraalVM EE then you need to download the Ruby
60+
EE installable from OTN and install using `--file` in the same way.
6361

64-
To get the best performance you want to rebuild the images. Check that `ruby
65-
--version` reports that you are running `GraalVM EE` rather than `GraalVM CE`.
66-
67-
Rebuilding the executable images can take a few minutes and you should have
68-
about 8 GB of RAM available.
62+
After installing Ruby you may want to rebuild other images so that they can
63+
use the new language. Rebuilding the executable images can take a few minutes
64+
and you should have about 10 GB of RAM available.
6965

7066
```bash
71-
$ gu rebuild-images ruby
67+
$ gu rebuild-images polyglot libpolyglot
7268
```
7369

7470
## Using a Ruby package manager

tool/jt.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,7 @@ def dockerfile(*args)
20782078
source_branch = args.shift
20792079
when '--rebuild-images'
20802080
rebuild_images = true
2081+
native_component = args.shift
20812082
when '--no-rebuild-openssl'
20822083
rebuild_openssl = false
20832084
when '--no-manager'
@@ -2199,7 +2200,11 @@ def dockerfile(*args)
21992200

22002201
if rebuild_images
22012202
if [:public, :graalvm].include?(install_method)
2202-
lines.push "RUN #{graalvm_base}/bin/gu rebuild-images ruby"
2203+
FileUtils.copy native_component, docker_dir
2204+
native_component = File.basename(native_component)
2205+
lines.push "COPY #{native_component} /test/"
2206+
lines.push "RUN #{graalvm_bin}/gu install --file /test/#{native_component} | tee install.log"
2207+
lines.push "RUN #{graalvm_base}/bin/gu rebuild-images polyglot libpolyglot"
22032208
else
22042209
abort "can't rebuild images for a build not from public or from local GraalVM components"
22052210
end

0 commit comments

Comments
 (0)