rake-compiler-dock 1.1.0 → 1.2.0
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
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +168 -0
- data/.gitignore +11 -1
- data/Dockerfile.jruby +6 -5
- data/Dockerfile.mri.erb +83 -43
- data/History.md +19 -1
- data/README.md +95 -36
- data/Rakefile +39 -12
- data/build/parallel_docker_build.rb +7 -3
- data/build/patches/{ruby-2.5.8 → ruby-2.5.9}/no_sendfile.patch +0 -0
- data/build/patches/{ruby-3.0.0 → ruby-3.1.0}/no_sendfile.patch +0 -0
- data/build/patches2/{rake-compiler-1.1.1 → rake-compiler-1.1.6}/0004-Enable-build-of-static-libruby.patch +3 -4
- data/build/rcd-env.sh +6 -0
- data/build/runas +1 -9
- data/lib/rake_compiler_dock/starter.rb +3 -2
- data/lib/rake_compiler_dock/version.rb +2 -2
- data/mingw64-ucrt/Dockerfile +62 -0
- data/mingw64-ucrt/binutils-mingw-w64-ignore-check-errors.patch +13 -0
- data/mingw64-ucrt/gcc-mingw-w64-only-c-c++.patch +13 -0
- data/mingw64-ucrt/mingw-w64-enable-ucrt.patch +22 -0
- data/rake-compiler-dock.gemspec +2 -2
- data/test/env/Dockerfile.alpine +17 -0
- data/test/env/Dockerfile.centos +17 -0
- data/test/env/Dockerfile.debian +24 -0
- data/test/rcd_test/Gemfile +11 -0
- data/test/rcd_test/Rakefile +74 -0
- data/test/rcd_test/ext/java/RcdTestExtService.java +19 -0
- data/test/rcd_test/ext/java/RubyRcdTest.java +16 -0
- data/test/rcd_test/ext/mri/extconf.rb +20 -0
- data/test/rcd_test/ext/mri/rcd_test_ext.c +35 -0
- data/test/rcd_test/ext/mri/rcd_test_ext.h +6 -0
- data/test/rcd_test/lib/rcd_test.rb +6 -0
- data/test/rcd_test/rcd_test.gemspec +27 -0
- data/test/rcd_test/test/test_basic.rb +22 -0
- data/test/test_environment_variables.rb +56 -31
- data/test/test_parallel_docker_build.rb +19 -6
- data.tar.gz.sig +0 -0
- metadata +74 -37
- metadata.gz.sig +0 -0
- data/build/patches2/hoe-3.20.0/0001-Load-encrypted-private-key-using-ENV-GEM_PRIVATE_KEY.patch +0 -32
- data/build/patches2/rake-compiler-1.1.1/0001-Fix-determining-of-ruby-versions-in-rake-native-gem.patch +0 -44
- data/build/patches2/rake-compiler-1.1.1/0003-Allow-building-of-cross-rubies-in-parallel.patch +0 -214
- data/build/patches2/rake-compiler-1.1.1/0005-Don-t-mask-out-build-env-vars-for-cross-ruby.patch +0 -30
- data/build/patches2/rake-compiler-1.1.1/0006-Use-RAKE_EXTENSION_TASK_NO_NATIVE-env-var-as-the-def.patch +0 -26
- data/build/patches2/ruby-2.7.0/ruby2_keywords.patch +0 -15
- data/build/patches2/ruby-3.0.0/ruby2_keywords.patch +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c37670b488779329186dd39d128aa4b8be99d4394138a9df57d1d2862acf2979
|
4
|
+
data.tar.gz: 397b5fb2a1cde23888eda7640a953051452b267c0ebda2d14e64bde954b1d97e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36bbf85db406a3d1a34997a110847fdcfca2fa61ae6d4f21430c931d91ee8880c0973172dfa531bc1a8284043ae5c51455411b3baee98ac589cbfafc30cba1e5
|
7
|
+
data.tar.gz: 92c54b094f5a8049201ee538a36d8c9f4c5e8a221476380231e4ba42f0dc4b92ee3b8e0d2dba83acfaa08d6f6cc21a2b5516ddcb9675f5e4b080db775f92d4c1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,168 @@
|
|
1
|
+
name: Build docker images
|
2
|
+
concurrency:
|
3
|
+
group: "${{github.workflow}}-${{github.ref}}"
|
4
|
+
cancel-in-progress: true
|
5
|
+
on: [push, pull_request]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
# These jobs use Buildx layer caching
|
9
|
+
docker_build:
|
10
|
+
name: Build
|
11
|
+
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
matrix:
|
15
|
+
include:
|
16
|
+
- platform: x86-mingw32
|
17
|
+
- platform: x64-mingw-ucrt
|
18
|
+
- platform: x64-mingw32
|
19
|
+
- platform: x86-linux
|
20
|
+
- platform: x86_64-linux
|
21
|
+
- platform: x86_64-darwin
|
22
|
+
- platform: arm64-darwin
|
23
|
+
- platform: arm-linux
|
24
|
+
- platform: aarch64-linux
|
25
|
+
- platform: jruby
|
26
|
+
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
env:
|
29
|
+
PLATFORM: ${{ matrix.platform }}
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v2
|
32
|
+
|
33
|
+
- name: Cache Docker layers
|
34
|
+
uses: actions/cache@v2
|
35
|
+
with:
|
36
|
+
path: tmp/build-cache
|
37
|
+
key: ${{ runner.os }}-${{ matrix.platform }}-buildx-${{ github.sha }}
|
38
|
+
restore-keys: |
|
39
|
+
${{ runner.os }}-${{ matrix.platform }}-buildx
|
40
|
+
|
41
|
+
- uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: "3.0"
|
44
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
45
|
+
|
46
|
+
- name: Build docker image
|
47
|
+
run: |
|
48
|
+
docker buildx create --driver docker-container --use
|
49
|
+
bundle exec rake build:${PLATFORM} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new --load"
|
50
|
+
|
51
|
+
- name: Move build cache and remove outdated layers
|
52
|
+
run: |
|
53
|
+
rm -rf tmp/build-cache
|
54
|
+
mv tmp/build-cache-new tmp/build-cache
|
55
|
+
|
56
|
+
- name: Build rcd_test.gem
|
57
|
+
run: |
|
58
|
+
gem build rake-compiler-dock.gemspec
|
59
|
+
gem install -l rake-compiler-dock-*.gem
|
60
|
+
cd test/rcd_test/
|
61
|
+
bundle install
|
62
|
+
bundle exec rake gem:${PLATFORM}
|
63
|
+
|
64
|
+
- name: Upload binary gem
|
65
|
+
uses: actions/upload-artifact@v2
|
66
|
+
with:
|
67
|
+
name: gem-${{ matrix.platform }}
|
68
|
+
path: test/rcd_test/pkg/*-*-*.gem
|
69
|
+
|
70
|
+
- name: Upload source gem
|
71
|
+
uses: actions/upload-artifact@v2
|
72
|
+
if: matrix.platform == 'jruby'
|
73
|
+
with:
|
74
|
+
name: gem-ruby
|
75
|
+
path: test/rcd_test/pkg/*-?.?.?.gem
|
76
|
+
|
77
|
+
|
78
|
+
job_test_native:
|
79
|
+
name: Test
|
80
|
+
needs: docker_build
|
81
|
+
strategy:
|
82
|
+
fail-fast: false
|
83
|
+
matrix:
|
84
|
+
include:
|
85
|
+
- os: windows
|
86
|
+
ruby: "3.0"
|
87
|
+
platform: x64-mingw32
|
88
|
+
- os: windows
|
89
|
+
ruby: "2.4"
|
90
|
+
platform: x64-mingw32
|
91
|
+
- os: macos
|
92
|
+
ruby: "3.0"
|
93
|
+
platform: x86_64-darwin
|
94
|
+
- os: macos
|
95
|
+
ruby: "2.4"
|
96
|
+
platform: x86_64-darwin
|
97
|
+
- os: ubuntu
|
98
|
+
ruby: "3.0"
|
99
|
+
platform: x86_64-linux
|
100
|
+
- os: ubuntu
|
101
|
+
ruby: "2.4"
|
102
|
+
platform: x86_64-linux
|
103
|
+
- os: ubuntu
|
104
|
+
ruby: jruby-head
|
105
|
+
platform: jruby
|
106
|
+
- os: ubuntu
|
107
|
+
ruby: "3.0"
|
108
|
+
platform: ruby
|
109
|
+
|
110
|
+
runs-on: ${{ matrix.os }}-latest
|
111
|
+
steps:
|
112
|
+
- uses: actions/checkout@v2
|
113
|
+
- name: Set up Ruby
|
114
|
+
uses: ruby/setup-ruby@v1
|
115
|
+
with:
|
116
|
+
ruby-version: ${{ matrix.ruby }}
|
117
|
+
|
118
|
+
- run: ruby --version
|
119
|
+
|
120
|
+
- name: Download gem from build job
|
121
|
+
uses: actions/download-artifact@v2
|
122
|
+
with:
|
123
|
+
name: gem-${{ matrix.platform }}
|
124
|
+
|
125
|
+
- run: gem install --local *.gem --verbose
|
126
|
+
|
127
|
+
- name: Run tests
|
128
|
+
run: |
|
129
|
+
cd test/rcd_test/
|
130
|
+
bundle install
|
131
|
+
ruby -rrcd_test -S rake test
|
132
|
+
|
133
|
+
job_test_multiarch:
|
134
|
+
name: Test
|
135
|
+
needs: docker_build
|
136
|
+
strategy:
|
137
|
+
fail-fast: false
|
138
|
+
matrix:
|
139
|
+
include:
|
140
|
+
- from_image: amd64/centos
|
141
|
+
platform: x86_64-linux
|
142
|
+
dockerfile: centos
|
143
|
+
- from_image: navikey/raspbian-bullseye
|
144
|
+
platform: arm-linux
|
145
|
+
dockerfile: debian
|
146
|
+
- from_image: arm64v8/ubuntu
|
147
|
+
platform: aarch64-linux
|
148
|
+
dockerfile: debian
|
149
|
+
- from_image: i386/alpine
|
150
|
+
platform: x86-linux
|
151
|
+
dockerfile: alpine
|
152
|
+
- from_image: arm32v6/alpine
|
153
|
+
platform: arm-linux
|
154
|
+
dockerfile: alpine
|
155
|
+
|
156
|
+
runs-on: ubuntu-latest
|
157
|
+
steps:
|
158
|
+
- uses: actions/checkout@v2
|
159
|
+
- name: Download gem from build job
|
160
|
+
uses: actions/download-artifact@v2
|
161
|
+
with:
|
162
|
+
name: gem-${{ matrix.platform }}
|
163
|
+
|
164
|
+
- name: Build image and Run tests
|
165
|
+
run: |
|
166
|
+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
167
|
+
docker build --rm --build-arg from_image=${{matrix.from_image}} -t ruby-test -f test/env/Dockerfile.${{matrix.dockerfile}} .
|
168
|
+
docker run --rm -t --network=host -v `pwd`:/build ruby-test
|
data/.gitignore
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
/.bundle/
|
2
2
|
/.yardoc
|
3
|
+
/Dockerfile.mri.aarch64-linux
|
4
|
+
/Dockerfile.mri.arm-linux
|
5
|
+
/Dockerfile.mri.arm64-darwin
|
6
|
+
/Dockerfile.mri.arm64-linux
|
7
|
+
/Dockerfile.mri.x64-mingw32
|
3
8
|
/Dockerfile.mri.x86-linux
|
4
9
|
/Dockerfile.mri.x86-mingw32
|
10
|
+
/Dockerfile.mri.x86_64-darwin
|
5
11
|
/Dockerfile.mri.x86_64-linux
|
6
|
-
/Dockerfile.mri.x64-mingw32
|
7
12
|
/Gemfile.lock
|
8
13
|
/_yardoc/
|
9
14
|
/coverage/
|
@@ -16,3 +21,8 @@
|
|
16
21
|
*.o
|
17
22
|
*.a
|
18
23
|
mkmf.log
|
24
|
+
.byebug_history
|
25
|
+
test/rcd_test/Gemfile.lock
|
26
|
+
test/rcd_test/pkg/
|
27
|
+
test/rcd_test/tmp/
|
28
|
+
test/rcd_test/vendor/
|
data/Dockerfile.jruby
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
FROM ubuntu:20.04
|
2
2
|
|
3
|
+
ENV DEBIAN_FRONTEND noninteractive
|
3
4
|
RUN apt-get -y update && \
|
4
|
-
apt-get install -y curl git-core xz-utils wget unzip sudo gpg dirmngr openjdk-
|
5
|
+
apt-get install -y curl git-core xz-utils wget unzip sudo gpg dirmngr openjdk-17-jdk-headless maven && \
|
5
6
|
rm -rf /var/lib/apt/lists/*
|
6
7
|
|
7
8
|
# Add "rvm" as system group, to avoid conflicts with host GIDs typically starting with 1000
|
@@ -13,7 +14,7 @@ RUN mkdir ~/.gnupg && \
|
|
13
14
|
echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf
|
14
15
|
|
15
16
|
# install rvm, RVM 1.26.0+ has signed releases, source rvm for usage outside of package scripts
|
16
|
-
RUN gpg --keyserver hkp://
|
17
|
+
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
|
17
18
|
(curl -L http://get.rvm.io | sudo bash) && \
|
18
19
|
bash -c " \
|
19
20
|
source /etc/rubybashrc && \
|
@@ -26,7 +27,7 @@ ENV BASH_ENV /etc/rubybashrc
|
|
26
27
|
# install rubies and fix permissions on
|
27
28
|
RUN bash -c " \
|
28
29
|
export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
|
29
|
-
for v in jruby-9.2.
|
30
|
+
for v in jruby-9.3.2.0 ; do \
|
30
31
|
rvm install --binary \$v --patch \$(echo ~/patches/ruby-\$v/* | tr ' ' ','); \
|
31
32
|
done && \
|
32
33
|
rvm cleanup all && \
|
@@ -46,8 +47,8 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
|
|
46
47
|
|
47
48
|
USER root
|
48
49
|
|
49
|
-
RUN bash -c "rvm alias create default jruby-9.2.
|
50
|
-
RUN echo "rvm use jruby-9.2.
|
50
|
+
RUN bash -c "rvm alias create default jruby-9.3.2.0"
|
51
|
+
RUN echo "rvm use jruby-9.3.2.0 > /dev/null" >> /etc/rubybashrc
|
51
52
|
|
52
53
|
# Add rvm to the global bashrc
|
53
54
|
RUN echo "source /etc/profile.d/rvm.sh" >> /etc/bash.bashrc
|
data/Dockerfile.mri.erb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
<%
|
2
|
+
image = case platform
|
3
|
+
when /x86_64-linux/ then "quay.io/pypa/manylinux2014_x86_64"
|
4
|
+
when /x86-linux/ then "quay.io/pypa/manylinux2014_i686"
|
5
|
+
else "ubuntu:20.04"
|
6
|
+
end
|
7
|
+
manylinux = !!(image =~ /manylinux/)
|
8
|
+
%>
|
9
|
+
FROM <%= image %>
|
10
|
+
|
11
|
+
<% if manylinux %>
|
9
12
|
# install packages which rvm will require
|
10
|
-
RUN yum install -y autoconf gcc-c++ libtool readline-devel sqlite-devel ruby openssl-devel xz cmake sudo less
|
13
|
+
RUN yum install -y autoconf gcc-c++ libtool readline-devel sqlite-devel ruby openssl-devel xz cmake sudo less libffi-devel git wget
|
11
14
|
|
12
15
|
# Prepare sudo and delete sudo as alias to gosu
|
13
16
|
RUN rm -f /usr/local/bin/sudo && \
|
@@ -36,7 +39,7 @@ RUN mkdir ~/.gnupg && \
|
|
36
39
|
echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf
|
37
40
|
|
38
41
|
# install rvm, RVM 1.26.0+ has signed releases, source rvm for usage outside of package scripts
|
39
|
-
RUN gpg --keyserver hkp://
|
42
|
+
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
|
40
43
|
(curl -L http://get.rvm.io | sudo bash) && \
|
41
44
|
bash -c " \
|
42
45
|
source /etc/rubybashrc && \
|
@@ -47,7 +50,7 @@ RUN gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A
|
|
47
50
|
COPY build/patches /home/rvm/patches/
|
48
51
|
|
49
52
|
# install rubies and fix permissions on
|
50
|
-
ENV RVM_RUBIES 2.5.
|
53
|
+
ENV RVM_RUBIES 2.5.9 3.1.0
|
51
54
|
RUN bash -c " \
|
52
55
|
export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
|
53
56
|
for v in ${RVM_RUBIES} ; do \
|
@@ -61,7 +64,7 @@ RUN bash -c " \
|
|
61
64
|
RUN echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \
|
62
65
|
bash -c " \
|
63
66
|
rvm all do gem update --system --no-document && \
|
64
|
-
rvm all do gem install --no-document bundler 'bundler:~>1.16' 'rake-compiler:1.1.
|
67
|
+
rvm all do gem install --no-document bundler 'bundler:~>1.16' 'rake-compiler:1.1.6' hoe mini_portile rubygems-tasks mini_portile2 && \
|
65
68
|
find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw "
|
66
69
|
|
67
70
|
# Install rake-compiler's cross rubies in global dir instead of /root
|
@@ -72,20 +75,32 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
|
|
72
75
|
# Add cross compilers for Windows and Linux
|
73
76
|
USER root
|
74
77
|
|
75
|
-
<% if platform
|
78
|
+
<% if platform=~/x64-mingw-ucrt/ %>
|
79
|
+
COPY --from=larskanis/mingw64-ucrt:20.04 /build/*.deb /debs/
|
80
|
+
RUN dpkg -i /debs/binutils-mingw-w64-x86-64_2.34-6ubuntu1.3+8.8_amd64.deb \
|
81
|
+
/debs/g++-mingw-w64-x86-64_9.3.0-17ubuntu1~20.04+22~exp1ubuntu4_amd64.deb \
|
82
|
+
/debs/gcc-mingw-w64-base_9.3.0-17ubuntu1~20.04+22~exp1ubuntu4_amd64.deb \
|
83
|
+
/debs/gcc-mingw-w64-x86-64_9.3.0-17ubuntu1~20.04+22~exp1ubuntu4_amd64.deb \
|
84
|
+
/debs/mingw-w64-common_7.0.0-2_all.deb \
|
85
|
+
/debs/mingw-w64-tools_7.0.0-2_amd64.deb \
|
86
|
+
/debs/mingw-w64-x86-64-dev_7.0.0-2_all.deb
|
87
|
+
|
88
|
+
<% elsif !manylinux %>
|
76
89
|
RUN apt-get -y update && \
|
77
90
|
apt-get install -y <%
|
78
|
-
if platform=~/darwin/
|
91
|
+
if platform=~/darwin/ %> clang python lzma-dev libxml2-dev libssl-dev libc++-10-dev <% end %><%
|
92
|
+
if platform=~/aarch64-linux/ %> gcc-aarch64-linux-gnu g++-aarch64-linux-gnu <% end %><%
|
93
|
+
if platform=~/arm-linux/ %> gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf <% end %><%
|
79
94
|
if platform=~/x86-mingw32/ %> gcc-mingw-w64-i686 g++-mingw-w64-i686 <% end %><%
|
80
|
-
if platform=~/x64-mingw32/
|
95
|
+
if platform=~/x64-mingw32/ %> gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 <% end %> && \
|
81
96
|
rm -rf /var/lib/apt/lists/*
|
82
97
|
<% end %>
|
83
98
|
|
84
99
|
RUN bash -c " \
|
85
|
-
rvm alias create default
|
100
|
+
rvm alias create default 3.1.0 && \
|
86
101
|
rvm use default "
|
87
102
|
|
88
|
-
<% if
|
103
|
+
<% if manylinux %>
|
89
104
|
# Create dev tools x86-linux-*
|
90
105
|
COPY build/mk_i686.rb /root/
|
91
106
|
RUN bash -c " \
|
@@ -102,6 +117,8 @@ RUN git clone -q --depth=1 https://github.com/tpoechtrager/osxcross.git /opt/osx
|
|
102
117
|
tar -cJf MacOSX11.1.sdk.tar.xz MacOSX11.1.sdk && \
|
103
118
|
cd /opt/osxcross && \
|
104
119
|
UNATTENDED=1 SDK_VERSION=11.1 OSX_VERSION_MIN=10.13 USE_CLANG_AS=1 ./build.sh && \
|
120
|
+
ln -s /usr/bin/llvm-config-10 /usr/bin/llvm-config && \
|
121
|
+
ENABLE_COMPILER_RT_INSTALL=1 SDK_VERSION=11.1 ./build_compiler_rt.sh && \
|
105
122
|
rm -rf *~ build tarballs/*
|
106
123
|
|
107
124
|
RUN echo "export PATH=/opt/osxcross/target/bin:\$PATH" >> /etc/rubybashrc && \
|
@@ -124,44 +141,65 @@ USER rvm
|
|
124
141
|
COPY build/patches2 /home/rvm/patches/
|
125
142
|
RUN bash -c " \
|
126
143
|
for v in ${RVM_RUBIES} ; do \
|
127
|
-
cd /usr/local/rvm/gems/ruby-\$v/gems/rake-compiler-1.1.
|
128
|
-
echo applying patches to ruby-\$v /home/rvm/patches/rake-compiler-1.1.
|
129
|
-
( git apply /home/rvm/patches/rake-compiler-1.1.
|
130
|
-
cd /usr/local/rvm/gems/ruby-\$v/gems/hoe-3.20.0 && \
|
131
|
-
echo applying patches to ruby-\$v /home/rvm/patches/hoe-3.20.0/*.patch && \
|
132
|
-
( git apply /home/rvm/patches/hoe-3.20.0/*.patch || true ) \
|
144
|
+
cd /usr/local/rvm/gems/ruby-\$v/gems/rake-compiler-1.1.6 && \
|
145
|
+
echo applying patches to ruby-\$v /home/rvm/patches/rake-compiler-1.1.6/*.patch && \
|
146
|
+
( git apply /home/rvm/patches/rake-compiler-1.1.6/*.patch || true ) \
|
133
147
|
done "
|
134
148
|
|
135
149
|
# Patch rubies for cross build
|
136
|
-
USER root
|
137
|
-
RUN bash -c " \
|
138
|
-
for v in 2.7.0 3.0.0 ; do \
|
139
|
-
curl -SL http://cache.ruby-lang.org/pub/ruby/\${v:0:3}/ruby-\$v.tar.xz | tar -xJC /root/ && \
|
140
|
-
cd /root/ruby-\$v && \
|
141
|
-
git apply /home/rvm/patches/ruby-\$v/*.patch && \
|
142
|
-
cd .. && \
|
143
|
-
mkdir -p /usr/local/rake-compiler/sources/ && \
|
144
|
-
tar cjf /usr/local/rake-compiler/sources/ruby-\$v.tar.bz2 ruby-\$v && \
|
145
|
-
chown rvm /usr/local/rake-compiler -R && \
|
146
|
-
rm -rf /root/ruby-\$v ; \
|
147
|
-
done "
|
148
|
-
USER rvm
|
149
|
-
|
150
|
-
|
151
|
-
|
150
|
+
#USER root
|
151
|
+
#RUN bash -c " \
|
152
|
+
# for v in 2.7.0 3.0.0 3.1.0 ; do \
|
153
|
+
# curl -SL http://cache.ruby-lang.org/pub/ruby/\${v:0:3}/ruby-\$v.tar.xz | tar -xJC /root/ && \
|
154
|
+
# cd /root/ruby-\$v && \
|
155
|
+
# git apply /home/rvm/patches/ruby-\$v/*.patch && \
|
156
|
+
# cd .. && \
|
157
|
+
# mkdir -p /usr/local/rake-compiler/sources/ && \
|
158
|
+
# tar cjf /usr/local/rake-compiler/sources/ruby-\$v.tar.bz2 ruby-\$v && \
|
159
|
+
# chown rvm /usr/local/rake-compiler -R && \
|
160
|
+
# rm -rf /root/ruby-\$v ; \
|
161
|
+
# done "
|
162
|
+
#USER rvm
|
163
|
+
|
164
|
+
<%
|
165
|
+
axrubies = if platform =~ /x64-mingw-ucrt/
|
166
|
+
[
|
167
|
+
# Rubyinstaller-3.1.0+ is platform x64-mingw-ucrt
|
168
|
+
["3.1.0", "3.1.0", true],
|
169
|
+
]
|
170
|
+
elsif platform =~ /x64-mingw32/
|
171
|
+
[
|
172
|
+
# Rubyinstaller prior to 3.1.0 is platform x64-mingw32
|
173
|
+
["2.6.0:2.5.0:2.4.0", "2.5.9", false],
|
174
|
+
["3.0.0:2.7.0", "3.1.0", true],
|
175
|
+
]
|
176
|
+
else
|
177
|
+
[
|
178
|
+
# Build xruby versions prior ruby2_keywords in parallel using ruby-2.5
|
179
|
+
["2.6.0:2.5.0:2.4.0", "2.5.9", false],
|
180
|
+
# Build xruby versions with ruby2_keywords in parallel using ruby-3.x
|
181
|
+
["3.1.0:3.0.0:2.7.0", "3.1.0", true],
|
182
|
+
]
|
183
|
+
end
|
184
|
+
|
185
|
+
axrubies.each do |xrubies, rvm, parallel| %>
|
186
|
+
ENV XRUBIES <%= xrubies %>
|
152
187
|
|
153
188
|
<% strip = '-s' if platform !~ /darwin/ %>
|
154
|
-
# Build
|
189
|
+
# Build xruby versions in parallel
|
155
190
|
# Then cleanup all build artifacts
|
156
191
|
RUN bash -c " \
|
192
|
+
rvm use <%= rvm %> && \
|
193
|
+
export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform=~/x64-mingw-ucrt/ %>' && \
|
157
194
|
export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %>' && \
|
158
195
|
export LDFLAGS='-pipe <%= strip %>' && \
|
159
196
|
<%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
|
160
197
|
<%= "export CC=#{target}-clang &&" if platform =~ /darwin/ %> \
|
161
|
-
export MAKE='make V=1' && \
|
198
|
+
export MAKE='make V=1 <%= "-j`nproc`" if parallel %>' && \
|
162
199
|
rake-compiler cross-ruby VERSION=$XRUBIES HOST=<%= target %> && \
|
163
200
|
rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources && \
|
164
201
|
find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw "
|
202
|
+
<% end %>
|
165
203
|
|
166
204
|
<% if platform=~/linux/ %>
|
167
205
|
# Avoid linking against libruby shared object.
|
@@ -200,7 +238,7 @@ RUN printf "1\n" | update-alternatives --config <%= target %>-gcc && \
|
|
200
238
|
printf "1\n" | update-alternatives --config <%= target %>-g++
|
201
239
|
<% end %>
|
202
240
|
|
203
|
-
<% if
|
241
|
+
<% if manylinux %>
|
204
242
|
# Enable modern compiler toolset of manylinux image
|
205
243
|
RUN echo "export PATH=\$DEVTOOLSET_ROOTPATH/usr/bin:\$PATH" >> /etc/rubybashrc
|
206
244
|
|
@@ -222,10 +260,12 @@ RUN gcc $HOME/sigfw.c -o /usr/bin/sigfw
|
|
222
260
|
|
223
261
|
# Install user mapper
|
224
262
|
COPY build/runas /usr/bin/
|
263
|
+
COPY build/rcd-env.sh /etc/profile.d/
|
264
|
+
RUN echo "source /etc/profile.d/rcd-env.sh" >> /etc/rubybashrc
|
225
265
|
|
226
266
|
# Install sudoers configuration
|
227
267
|
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
|
228
268
|
|
229
|
-
ENV RUBY_CC_VERSION 3.0.0:2.7.0:2.6.0:2.5.0:2.4.0
|
269
|
+
ENV RUBY_CC_VERSION 3.1.0:3.0.0:2.7.0:2.6.0:2.5.0:2.4.0
|
230
270
|
|
231
271
|
CMD bash
|
data/History.md
CHANGED
@@ -1,4 +1,22 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0 / 2022-01-04
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Add Ruby-3.1 as native rvm and cross ruby versions.
|
5
|
+
* Remove Ruby-2.2 and 2.3 from RUBY_CC_VERSION and cross rubies.
|
6
|
+
* Add Linux cross build targets "arm-linux" and "aarch64-linux".
|
7
|
+
* Add cross build target "x64-mingw-ucrt" for ruby-3.1 on Windows.
|
8
|
+
* Add `wget` and `git` to Linux image.
|
9
|
+
* Add `maven` to JRuby image.
|
10
|
+
* Update JRuby to 9.3.2.0
|
11
|
+
* Fix default value of platform for JRuby. #50
|
12
|
+
* Update openjdk version from 14 to 17
|
13
|
+
* Add a test gem and build and run it on all supported platforms on Github Actions.
|
14
|
+
* Allow alternative build command like `docker buildx build`
|
15
|
+
* Provide compiler-rt libraries for darwin builds. #60
|
16
|
+
* Extract build environment from `runas` into `rcd-env.sh` and loaded it in non-interactive non-login shells. #57
|
17
|
+
|
18
|
+
|
19
|
+
1.1.0 / 2020-12-29
|
2
20
|
------------------
|
3
21
|
|
4
22
|
* Use ManyLinux2014 as docker base image for linux targets.
|