Skip to content

Commit 3a9edd0

Browse files
committed
Rename and reorganize Ruby build stages
1 parent f5b30b3 commit 3a9edd0

3 files changed

Lines changed: 25 additions & 26 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
target:
16-
- ruby-0.x-2.0
17-
- ruby-1.2-1.6
16+
- ruby-0.x-1.6
1817
- ruby-1.8.6-1.8.7
1918
- ruby-1.9
19+
- ruby-2.0
2020
- ruby-2.1
2121
- ruby-2.2
2222
- ruby-2.3

Dockerfile

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,21 @@ COPY patch /all-ruby/patch/
4141
RUN rake setup_build
4242

4343
# =============================================================================
44-
# Ruby 0.x-2.0.0 on Debian Buster
44+
# Ruby 0.x-1.6 on Debian Buster (needs i386 for 32-bit builds)
4545
# =============================================================================
46-
FROM builder-buster AS ruby-0.x-2.0
46+
FROM builder-buster AS ruby-0.x-1.6
4747
ARG j=numcpu_plus_alpha
4848

49-
COPY versions/0.* versions/1.0* versions/1.1* versions/1.8.0* versions/1.8.1* versions/1.8.2* versions/1.8.3* versions/1.8.4* versions/1.8.5* versions/2.0.0* /all-ruby/versions/
50-
RUN rake -j ${j} all-0 all-1.0 all-1.1a all-1.1b all-1.1c all-1.1d all-1.8 all-1.8.5
51-
RUN rake -j ${j} all-2.0.0
49+
COPY versions/0.* versions/1.0* versions/1.1* versions/1.2* versions/1.3* versions/1.4* versions/1.6* versions/1.8.0* versions/1.8.1* versions/1.8.2* versions/1.8.3* versions/1.8.4* versions/1.8.5* /all-ruby/versions/
50+
RUN rake -j ${j} all-0 all-1.0 all-1.1a all-1.1b all-1.1c all-1.1d all-1.2 all-1.3 all-1.4 all-1.6 all-1.8 all-1.8.5
5251

5352
RUN rm -rf Rakefile versions/ patch/ DIST build/*/log build/*/ruby*/ \
5453
build/*/man build/*/share/man build/*/share/doc build/*/share/ri && \
5554
rm -f build/*/lib/libruby-static.a build/*/bin/gcc build/*/bin/cc
5655
RUN find /build-all-ruby -type f \( -name ruby -o -name '*.so' \) -exec sh -c 'file $1 | grep -q "not stripped"' - '{}' \; -print0 | xargs -0 strip
5756

5857
# =============================================================================
59-
# Base build environment: Debian Bullseye (for Ruby 1.2-3.0)
58+
# Base build environment: Debian Bullseye (for Ruby 1.8.6-3.0)
6059
# =============================================================================
6160
FROM debian:bullseye-slim AS builder-bullseye
6261
ENV DEBIAN_FRONTEND=noninteractive
@@ -83,42 +82,42 @@ COPY patch /all-ruby/patch/
8382
RUN rake setup_build
8483

8584
# =============================================================================
86-
# Ruby 1.2-1.6 on Debian Buster (needs i386 for 32-bit builds)
85+
# Ruby 1.8.6-1.8.7
8786
# =============================================================================
88-
FROM builder-buster AS ruby-1.2-1.6
87+
FROM builder-bullseye AS ruby-1.8.6-1.8.7
8988
ARG j=numcpu_plus_alpha
9089

91-
COPY versions/1.2* versions/1.3* versions/1.4* versions/1.6* /all-ruby/versions/
92-
RUN rake -j ${j} all-1.2 all-1.3 all-1.4 all-1.6
90+
COPY versions/1.8.6* versions/1.8.7* /all-ruby/versions/
91+
RUN rake -j ${j} all-1.8.6 all-1.8.7
9392

9493
RUN rm -rf Rakefile versions/ patch/ DIST build/*/log build/*/ruby*/ \
9594
build/*/man build/*/share/man build/*/share/doc build/*/share/ri && \
9695
rm -f build/*/lib/libruby-static.a build/*/bin/gcc build/*/bin/cc
9796
RUN find /build-all-ruby -type f \( -name ruby -o -name '*.so' \) -exec sh -c 'file $1 | grep -q "not stripped"' - '{}' \; -print0 | xargs -0 strip
9897

9998
# =============================================================================
100-
# Ruby 1.8.6-1.8.7
99+
# Ruby 1.9.x
101100
# =============================================================================
102-
FROM builder-bullseye AS ruby-1.8.6-1.8.7
101+
FROM builder-bullseye AS ruby-1.9
103102
ARG j=numcpu_plus_alpha
104103

105-
COPY versions/1.8.6* versions/1.8.7* /all-ruby/versions/
106-
RUN rake -j ${j} all-1.8.6 all-1.8.7
104+
COPY versions/1.9* /all-ruby/versions/
105+
RUN rake -j ${j} all-1.9.0 all-1.9.1 all-1.9.2
106+
RUN rake -j ${j} all-1.9.3
107107

108108
RUN rm -rf Rakefile versions/ patch/ DIST build/*/log build/*/ruby*/ \
109109
build/*/man build/*/share/man build/*/share/doc build/*/share/ri && \
110110
rm -f build/*/lib/libruby-static.a build/*/bin/gcc build/*/bin/cc
111111
RUN find /build-all-ruby -type f \( -name ruby -o -name '*.so' \) -exec sh -c 'file $1 | grep -q "not stripped"' - '{}' \; -print0 | xargs -0 strip
112112

113113
# =============================================================================
114-
# Ruby 1.9.x
114+
# Ruby 2.0
115115
# =============================================================================
116-
FROM builder-bullseye AS ruby-1.9
116+
FROM builder-bullseye AS ruby-2.0
117117
ARG j=numcpu_plus_alpha
118118

119-
COPY versions/1.9* /all-ruby/versions/
120-
RUN rake -j ${j} all-1.9.0 all-1.9.1 all-1.9.2
121-
RUN rake -j ${j} all-1.9.3
119+
COPY versions/2.0.0* /all-ruby/versions/
120+
RUN rake -j ${j} all-2.0.0
122121

123122
RUN rm -rf Rakefile versions/ patch/ DIST build/*/log build/*/ruby*/ \
124123
build/*/man build/*/share/man build/*/share/doc build/*/share/ri && \

Dockerfile.final

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ ARG system_ruby=ruby3.1
99
# =============================================================================
1010
FROM ${os}:${version}${variant} AS ruby-0.x-2.4
1111

12-
COPY --from=docker.io/rubylang/all-ruby:ruby-0.x-2.0 /build-all-ruby/ /build-all-ruby/
13-
COPY --from=docker.io/rubylang/all-ruby:ruby-1.2-1.6 /build-all-ruby/ /build-all-ruby/
12+
COPY --from=docker.io/rubylang/all-ruby:ruby-0.x-1.6 /build-all-ruby/ /build-all-ruby/
1413
COPY --from=docker.io/rubylang/all-ruby:ruby-1.8.6-1.8.7 /build-all-ruby/ /build-all-ruby/
1514
COPY --from=docker.io/rubylang/all-ruby:ruby-1.9 /build-all-ruby/ /build-all-ruby/
15+
COPY --from=docker.io/rubylang/all-ruby:ruby-2.0 /build-all-ruby/ /build-all-ruby/
1616
COPY --from=docker.io/rubylang/all-ruby:ruby-2.1 /build-all-ruby/ /build-all-ruby/
1717
COPY --from=docker.io/rubylang/all-ruby:ruby-2.2 /build-all-ruby/ /build-all-ruby/
1818
COPY --from=docker.io/rubylang/all-ruby:ruby-2.3 /build-all-ruby/ /build-all-ruby/
1919
COPY --from=docker.io/rubylang/all-ruby:ruby-2.4 /build-all-ruby/ /build-all-ruby/
2020

21-
COPY --from=docker.io/rubylang/all-ruby:ruby-0.x-2.0 /all-ruby/ /all-ruby/
22-
COPY --from=docker.io/rubylang/all-ruby:ruby-1.2-1.6 /all-ruby/bin/ /all-ruby/bin/
21+
COPY --from=docker.io/rubylang/all-ruby:ruby-0.x-1.6 /all-ruby/ /all-ruby/
2322
COPY --from=docker.io/rubylang/all-ruby:ruby-1.8.6-1.8.7 /all-ruby/bin/ /all-ruby/bin/
2423
COPY --from=docker.io/rubylang/all-ruby:ruby-1.9 /all-ruby/bin/ /all-ruby/bin/
24+
COPY --from=docker.io/rubylang/all-ruby:ruby-2.0 /all-ruby/bin/ /all-ruby/bin/
2525
COPY --from=docker.io/rubylang/all-ruby:ruby-2.1 /all-ruby/bin/ /all-ruby/bin/
2626
COPY --from=docker.io/rubylang/all-ruby:ruby-2.2 /all-ruby/bin/ /all-ruby/bin/
2727
COPY --from=docker.io/rubylang/all-ruby:ruby-2.3 /all-ruby/bin/ /all-ruby/bin/
@@ -114,7 +114,7 @@ COPY --from=docker.io/rubylang/all-ruby:ruby-2.5-3.1 /all-ruby/bin/ /all-ruby/bi
114114
COPY --from=docker.io/rubylang/all-ruby:ruby-3.2-4.0 /all-ruby/bin/ /all-ruby/bin/
115115

116116
# for Ruby 0.x and 1.1x (built on buster, need libcrypt.so.1)
117-
COPY --from=docker.io/rubylang/all-ruby:ruby-1.2-1.6 /lib/i386-linux-gnu/libcrypt.so.1.1.0 /lib/i386-linux-gnu/libcrypt.so.1.1.0
117+
COPY --from=docker.io/rubylang/all-ruby:ruby-0.x-1.6 /lib/i386-linux-gnu/libcrypt.so.1.1.0 /lib/i386-linux-gnu/libcrypt.so.1.1.0
118118
RUN cd /lib/i386-linux-gnu && ln -s libcrypt.so.1.1.0 libcrypt.so.1
119119

120120
# for Ruby 2.4-3.0 (built on bullseye, need libssl1.1/libcrypto1.1)

0 commit comments

Comments
 (0)