Skip to content

Commit 10d90fd

Browse files
committed
[GR-44895] Improve Docker docs and docs about how to install libyaml
PullRequest: truffleruby/3756
2 parents 2707646 + ff55015 commit 10d90fd

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

doc/contributor/docker.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,40 @@ Note that running a test will fail the `build` command, so building the image
1313
is itself a test. You can then also log into the image after it's successfully
1414
built to use TruffleRuby.
1515

16+
## Tests Run on Release Candidates or Previews
17+
18+
This is what we run on release builds before the release to ensure the built artifacts work on the various Linux distributions.
19+
20+
First, it is useful to create a branch with the potential changes needed to [tool/docker-configs.yaml](../../tool/docker-configs.yaml), `jt docker`, etc:
21+
```bash
22+
cd truffleruby
23+
git checkout master
24+
git checkout -b bd/docker-tests-$VERSION
25+
```
26+
Note that branch is based on `master`, not the release branch, because it should be merged to `master` (so those changes will be used for the next release).
27+
28+
Then download the standalone's `.tar.gz` for linux-amd64 (looks like `ruby-standalone-svm-java*-linux-amd64-*.tar.gz`).
29+
The jdk version to use for the standalone is the one in `graal/vm/ce-release-artifacts.json`.
30+
The TruffleRuby commit in that build should correspond to the last commit of the release branch (`release/graal-vm/$VERSION`).
31+
32+
We run all Docker tests, only on the standalone distribution to make it reasonably fast.
33+
This can be done with:
34+
```bash
35+
jt docker test --standalone $PATH_TO_STANDALONE_TAR_GZ --test release/graal-vm/$VERSION
36+
# A concrete example
37+
jt docker test --standalone $PWD/ruby-standalone-svm-java17-linux-amd64-*.tar.gz --test release/graal-vm/23.0
38+
```
39+
40+
We typically run them in parallel instead to make it faster, running each of these commands in a different terminal:
41+
```bash
42+
jt docker test --filter ol --standalone $PATH_TO_STANDALONE_TAR_GZ --test release/graal-vm/$VERSION
43+
jt docker test --filter fedora --standalone $PATH_TO_STANDALONE_TAR_GZ --test release/graal-vm/$VERSION
44+
jt docker test --filter ubuntu --standalone $PATH_TO_STANDALONE_TAR_GZ --test release/graal-vm/$VERSION
45+
jt docker test --filter debian --standalone $PATH_TO_STANDALONE_TAR_GZ --test release/graal-vm/$VERSION
46+
```
47+
48+
## Example Usages
49+
1650
For example, to run a full set of tests on a set of new release candidate tarballs:
1751

1852
```bash

doc/user/installing-libyaml.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,24 @@ This is done automatically by Ruby managers, and mentioned in the post-install m
1313

1414
### Fedora-based: RHEL, Oracle Linux, etc
1515

16+
#### Fedora
17+
1618
```bash
1719
sudo dnf install libyaml-devel
1820
```
1921

22+
#### Oracle Linux 7
23+
24+
```bash
25+
sudo yum install --enablerepo=ol7_optional_latest libyaml-devel
26+
```
27+
28+
#### Oracle Linux 8
29+
30+
```bash
31+
sudo dnf install --enablerepo=ol8_codeready_builder libyaml-devel
32+
```
33+
2034
### Debian-based: Ubuntu, etc
2135

2236
```bash

tool/docker-configs.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ rpm: &rpm
33
specs: which findutils
44
zlib: zlib-devel
55
openssl: openssl-devel
6+
yaml: libyaml-devel
67
cext: gcc make
78
set-locale:
89
- ENV LANG=en_US.UTF-8
@@ -13,6 +14,7 @@ deb: &deb
1314
specs: netbase
1415
zlib: libz-dev
1516
openssl: libssl-dev
17+
yaml: libyaml-dev
1618
cext: gcc make
1719
set-locale:
1820
# Uncomment the en_US.UTF-8 line in /etc/locale.gen
@@ -23,13 +25,15 @@ deb: &deb
2325

2426
ol7:
2527
base: oraclelinux:7-slim
26-
install: RUN yum install -y
28+
# --enablerepo needed for libyaml-devel
29+
install: RUN yum install --enablerepo=ol7_optional_latest -y
2730
locale:
2831
<<: *rpm
2932

3033
ol8:
3134
base: oraclelinux:8-slim
32-
install: RUN microdnf install -y
35+
# --enablerepo needed for libyaml-devel
36+
install: RUN microdnf install --enablerepo=ol8_codeready_builder -y
3337
locale: glibc-langpack-en
3438
<<: *rpm
3539

tool/docker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def docker(*args)
125125

126126
packages << distro.fetch('zlib')
127127
packages << distro.fetch('openssl')
128+
packages << distro.fetch('yaml')
128129
packages << distro.fetch('cext')
129130

130131
proxy_vars = []

0 commit comments

Comments
 (0)