rake-compiler-dock 1.9.1 → 1.10.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 +65 -71
- data/.github/workflows/publish-images.yml +73 -38
- data/.github/workflows/release-images.yml +71 -35
- data/{History.md → CHANGELOG.md} +18 -0
- data/CONTRIBUTING.md +44 -1
- data/Dockerfile.mri.erb +58 -18
- data/README.md +48 -6
- data/Rakefile +83 -39
- data/build/buildkitd.toml +2 -0
- data/build/gem_helper.rb +1 -1
- data/build/mk_musl_cross.sh +1 -1
- data/build/parallel_docker_build.rb +17 -13
- data/build/patches/rake-compiler-1.2.9/0004-Enable-build-of-static-libruby.patch +3 -1
- data/build/sudoers +1 -1
- data/lib/rake_compiler_dock/starter.rb +11 -1
- data/lib/rake_compiler_dock/version.rb +2 -2
- data/lib/rake_compiler_dock.rb +11 -17
- data/mingw64-ucrt/README.md +0 -44
- data/test/env/Dockerfile.alpine +1 -1
- data/test/fixtures/mig_test_rpc.defs +8 -0
- data/test/rcd_test/Rakefile +1 -0
- data/test/rcd_test/ext/mri/extconf.rb +2 -0
- data/test/rcd_test/rcd_test.gemspec +1 -1
- data/test/rcd_test/test/test_basic.rb +11 -0
- data/test/test_environment_variables.rb +13 -0
- data/test/test_mig.rb +18 -0
- data/test/test_starter.rb +6 -0
- data.tar.gz.sig +3 -0
- metadata +35 -7
- metadata.gz.sig +0 -0
- data/test/env/Dockerfile.centos +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 57ecb66968375f3760cad17a375491ed6cf1c54805701cbc7de194e9ad51b66d
|
|
4
|
+
data.tar.gz: 28b54d3fc8dbefa9965495e8ec6af213e0e53ac350e6a63cdae0bc7b31efd2ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cac2c1ff268c3415f5685160b646e849424569a2e71020375feeccde039bdda59405734d6f0b1b08892214d2690d66d746c36dbb5014b50f233ba0a5e3279cc1
|
|
7
|
+
data.tar.gz: 2a6ef8cb75a03d03d312657764f67f04c017dde4f15b11d2766c9a6b3f907705e33b050315eaa381a1d82d73a6170eab61454983a746bfc883486547e1351027
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -44,10 +44,30 @@ jobs:
|
|
|
44
44
|
strategy:
|
|
45
45
|
fail-fast: false
|
|
46
46
|
matrix:
|
|
47
|
+
os:
|
|
48
|
+
- ubuntu-latest
|
|
49
|
+
- ubuntu-24.04-arm
|
|
50
|
+
platform:
|
|
51
|
+
- aarch64-linux-gnu
|
|
52
|
+
- aarch64-linux-musl
|
|
53
|
+
- aarch64-mingw-ucrt
|
|
54
|
+
- arm-linux-gnu
|
|
55
|
+
- arm-linux-musl
|
|
56
|
+
- arm64-darwin
|
|
57
|
+
- jruby
|
|
58
|
+
- x64-mingw-ucrt
|
|
59
|
+
- x64-mingw32
|
|
60
|
+
- x86-linux-gnu
|
|
61
|
+
- x86-linux-musl
|
|
62
|
+
- x86-mingw32
|
|
63
|
+
- x86_64-darwin
|
|
64
|
+
- x86_64-linux-gnu
|
|
65
|
+
- x86_64-linux-musl
|
|
47
66
|
include:
|
|
48
67
|
- platform: aarch64-linux-gnu
|
|
49
68
|
alias: aarch64-linux
|
|
50
69
|
- platform: aarch64-linux-musl
|
|
70
|
+
- platform: aarch64-mingw-ucrt
|
|
51
71
|
- platform: arm-linux-gnu
|
|
52
72
|
alias: arm-linux
|
|
53
73
|
- platform: arm-linux-musl
|
|
@@ -65,7 +85,7 @@ jobs:
|
|
|
65
85
|
- platform: x86_64-linux-gnu
|
|
66
86
|
alias: x86_64-linux
|
|
67
87
|
- platform: x86_64-linux-musl
|
|
68
|
-
runs-on:
|
|
88
|
+
runs-on: ${{ matrix.os }}
|
|
69
89
|
steps:
|
|
70
90
|
- uses: actions/checkout@v4
|
|
71
91
|
- uses: ruby/setup-ruby@v1
|
|
@@ -76,18 +96,20 @@ jobs:
|
|
|
76
96
|
- name: Fetch docker buildx layer cache
|
|
77
97
|
uses: actions/cache@v4
|
|
78
98
|
with:
|
|
79
|
-
path: tmp/build-cache
|
|
80
|
-
key: ${{ runner.os }}-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
81
|
-
restore-keys: ${{ runner.os }}-${{ matrix.platform }}-buildx
|
|
82
|
-
|
|
99
|
+
path: tmp/build-cache-${{ runner.arch }}
|
|
100
|
+
key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
101
|
+
restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx
|
|
102
|
+
enableCrossOsArchive: true
|
|
103
|
+
- name: Change docker to a cache-able driver
|
|
83
104
|
run: |
|
|
84
105
|
docker buildx create --driver docker-container --use
|
|
85
|
-
bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new
|
|
86
|
-
|
|
106
|
+
bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new"
|
|
107
|
+
- name: Show docker images
|
|
108
|
+
run: docker images
|
|
87
109
|
- name: Update and prune docker buildx layer cache
|
|
88
110
|
run: |
|
|
89
|
-
rm -rf tmp/build-cache
|
|
90
|
-
mv tmp/build-cache-new tmp/build-cache
|
|
111
|
+
rm -rf tmp/build-cache-${{ runner.arch }}
|
|
112
|
+
mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }}
|
|
91
113
|
|
|
92
114
|
- name: Test the generated image
|
|
93
115
|
run: bundle exec rake test TEST_PLATFORM=${{ matrix.platform }}
|
|
@@ -100,6 +122,7 @@ jobs:
|
|
|
100
122
|
bundle exec rake gem:${{ matrix.platform }}
|
|
101
123
|
|
|
102
124
|
- name: Upload native gem
|
|
125
|
+
if: runner.arch == 'X64'
|
|
103
126
|
uses: actions/upload-artifact@v4
|
|
104
127
|
with:
|
|
105
128
|
name: gem-${{ matrix.platform }}
|
|
@@ -115,7 +138,7 @@ jobs:
|
|
|
115
138
|
bundle exec rake clean clobber
|
|
116
139
|
bundle exec rake gem:${{ matrix.platform }}
|
|
117
140
|
|
|
118
|
-
- if: matrix.static
|
|
141
|
+
- if: matrix.static && runner.arch == 'X64'
|
|
119
142
|
name: Upload static native gem
|
|
120
143
|
uses: actions/upload-artifact@v4
|
|
121
144
|
with:
|
|
@@ -130,7 +153,7 @@ jobs:
|
|
|
130
153
|
bundle exec rake clean clobber
|
|
131
154
|
bundle exec rake gem:${{ matrix.alias }}
|
|
132
155
|
|
|
133
|
-
- if: matrix.alias
|
|
156
|
+
- if: matrix.alias && runner.arch == 'X64'
|
|
134
157
|
name: Upload native gem ${{ matrix.alias }}
|
|
135
158
|
uses: actions/upload-artifact@v4
|
|
136
159
|
with:
|
|
@@ -144,7 +167,7 @@ jobs:
|
|
|
144
167
|
fail-fast: false
|
|
145
168
|
matrix:
|
|
146
169
|
os: [ubuntu-latest]
|
|
147
|
-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"
|
|
170
|
+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
|
148
171
|
runs-on: ${{ matrix.os }}
|
|
149
172
|
steps:
|
|
150
173
|
- uses: actions/checkout@v4
|
|
@@ -169,14 +192,11 @@ jobs:
|
|
|
169
192
|
fail-fast: false
|
|
170
193
|
matrix:
|
|
171
194
|
platform: [x86_64-linux, x86_64-linux-gnu]
|
|
172
|
-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"
|
|
195
|
+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
|
173
196
|
include:
|
|
174
197
|
# declare rubygems for each ruby version
|
|
175
198
|
- { ruby: "3.0", rubygems: "3.5.23" }
|
|
176
199
|
- { ruby: "2.7", rubygems: "3.4.22" }
|
|
177
|
-
- { ruby: "2.6", rubygems: "3.4.22" }
|
|
178
|
-
- { ruby: "2.5", rubygems: "3.3.26" }
|
|
179
|
-
- { ruby: "2.4", rubygems: "3.3.26" }
|
|
180
200
|
runs-on: ubuntu-latest
|
|
181
201
|
steps:
|
|
182
202
|
- uses: actions/checkout@v4
|
|
@@ -215,30 +235,29 @@ jobs:
|
|
|
215
235
|
- x86_64-linux
|
|
216
236
|
- x86_64-linux-gnu
|
|
217
237
|
- x86_64-linux-musl
|
|
218
|
-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"
|
|
238
|
+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
|
219
239
|
include:
|
|
220
240
|
# declare rubygems for each ruby version
|
|
221
241
|
- { ruby: "3.0", rubygems: "3.5.23" }
|
|
222
242
|
- { ruby: "2.7", rubygems: "3.4.22" }
|
|
223
|
-
- { ruby: "2.6", rubygems: "3.4.22" }
|
|
224
|
-
- { ruby: "2.5", rubygems: "3.3.26" }
|
|
225
|
-
- { ruby: "2.4", rubygems: "3.3.26" }
|
|
226
243
|
# declare docker image for each platform
|
|
227
|
-
- { platform: aarch64-linux-musl, docker_tag: "-alpine" }
|
|
228
|
-
- { platform: arm-linux-musl, docker_tag: "-alpine" }
|
|
229
|
-
- { platform: x86-linux-musl, docker_tag: "-alpine" }
|
|
230
|
-
- { platform: x86_64-linux-musl, docker_tag: "-alpine" }
|
|
244
|
+
- { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" }
|
|
245
|
+
- { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" }
|
|
246
|
+
- { platform: x86-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" }
|
|
247
|
+
- { platform: x86_64-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" }
|
|
248
|
+
- { platform: x86_64-linux, runon: "ubuntu-latest" }
|
|
249
|
+
- { platform: x86_64-linux-gnu, runon: "ubuntu-latest" }
|
|
231
250
|
# declare docker platform for each platform
|
|
232
|
-
- { platform: aarch64-linux, docker_platform: "--platform=linux/arm64" }
|
|
233
|
-
- { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64" }
|
|
234
|
-
- { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64" }
|
|
235
|
-
- { platform: arm-linux, docker_platform: "--platform=linux/arm/v7" }
|
|
236
|
-
- { platform: arm-linux-gnu, docker_platform: "--platform=linux/arm/v7" }
|
|
237
|
-
- { platform: arm-linux-musl, docker_platform: "--platform=linux/arm/v7" }
|
|
238
|
-
- { platform: x86-linux, docker_platform: "--platform=linux/386" }
|
|
239
|
-
- { platform: x86-linux-gnu, docker_platform: "--platform=linux/386" }
|
|
240
|
-
- { platform: x86-linux-musl, docker_platform: "--platform=linux/386" }
|
|
241
|
-
runs-on:
|
|
251
|
+
- { platform: aarch64-linux, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" }
|
|
252
|
+
- { platform: aarch64-linux-gnu, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" }
|
|
253
|
+
- { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" }
|
|
254
|
+
- { platform: arm-linux, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" }
|
|
255
|
+
- { platform: arm-linux-gnu, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" }
|
|
256
|
+
- { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" }
|
|
257
|
+
- { platform: x86-linux, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" }
|
|
258
|
+
- { platform: x86-linux-gnu, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" }
|
|
259
|
+
- { platform: x86-linux-musl, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" }
|
|
260
|
+
runs-on: ${{ matrix.runon }}
|
|
242
261
|
steps:
|
|
243
262
|
- uses: actions/checkout@v4
|
|
244
263
|
- name: Download gem-${{ matrix.platform }}
|
|
@@ -247,7 +266,6 @@ jobs:
|
|
|
247
266
|
name: gem-${{ matrix.platform }}
|
|
248
267
|
- name: Run tests
|
|
249
268
|
run: |
|
|
250
|
-
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
251
269
|
docker run --rm -v $PWD:/work -w /work \
|
|
252
270
|
${{ matrix.docker_platform}} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \
|
|
253
271
|
sh -c "
|
|
@@ -265,13 +283,7 @@ jobs:
|
|
|
265
283
|
fail-fast: false
|
|
266
284
|
matrix:
|
|
267
285
|
os: [macos-13, macos-14]
|
|
268
|
-
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"
|
|
269
|
-
exclude:
|
|
270
|
-
# setup-ruby does not provide ruby 2.4 or 2.5 on arm64-darwin as of 2024-05-01
|
|
271
|
-
- os: macos-14
|
|
272
|
-
ruby: "2.4"
|
|
273
|
-
- os: macos-14
|
|
274
|
-
ruby: "2.5"
|
|
286
|
+
ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
|
275
287
|
include:
|
|
276
288
|
- os: macos-13
|
|
277
289
|
platform: x86_64-darwin
|
|
@@ -280,15 +292,6 @@ jobs:
|
|
|
280
292
|
- os: ubuntu-latest
|
|
281
293
|
ruby: jruby
|
|
282
294
|
platform: jruby
|
|
283
|
-
- os: windows-latest
|
|
284
|
-
ruby: "2.4"
|
|
285
|
-
platform: x64-mingw32
|
|
286
|
-
- os: windows-latest
|
|
287
|
-
ruby: "2.5"
|
|
288
|
-
platform: x64-mingw32
|
|
289
|
-
- os: windows-latest
|
|
290
|
-
ruby: "2.6"
|
|
291
|
-
platform: x64-mingw32
|
|
292
295
|
- os: windows-latest
|
|
293
296
|
ruby: "2.7"
|
|
294
297
|
platform: x64-mingw32
|
|
@@ -335,15 +338,6 @@ jobs:
|
|
|
335
338
|
fail-fast: false
|
|
336
339
|
matrix:
|
|
337
340
|
include:
|
|
338
|
-
- os: windows-latest
|
|
339
|
-
ruby: "2.4"
|
|
340
|
-
platform: x64-mingw32
|
|
341
|
-
- os: windows-latest
|
|
342
|
-
ruby: "2.5"
|
|
343
|
-
platform: x64-mingw32
|
|
344
|
-
- os: windows-latest
|
|
345
|
-
ruby: "2.6"
|
|
346
|
-
platform: x64-mingw32
|
|
347
341
|
- os: windows-latest
|
|
348
342
|
ruby: "2.7"
|
|
349
343
|
platform: x64-mingw32
|
|
@@ -390,31 +384,32 @@ jobs:
|
|
|
390
384
|
fail-fast: false
|
|
391
385
|
matrix:
|
|
392
386
|
include:
|
|
393
|
-
-
|
|
394
|
-
|
|
395
|
-
platform: x86_64-linux # centos-8 ships ruby 2.5, rubygems won't recognize -gnu suffix
|
|
396
|
-
dockerfile: centos
|
|
397
|
-
- from_image: navikey/raspbian-bullseye
|
|
387
|
+
- runon: ubuntu-24.04-arm
|
|
388
|
+
from_image: navikey/raspbian-bullseye
|
|
398
389
|
image_platform: linux/arm/v7
|
|
399
390
|
platform: arm-linux # bullseye ships ruby 2.7, rubygems won't recognize -gnu suffix
|
|
400
391
|
dockerfile: debian
|
|
401
|
-
-
|
|
392
|
+
- runon: ubuntu-24.04-arm
|
|
393
|
+
from_image: arm64v8/ubuntu
|
|
402
394
|
image_platform: linux/aarch64
|
|
403
395
|
platform: aarch64-linux # arm64v8 ships ruby 3.0, rubygems won't recognize -gnu suffix
|
|
404
396
|
dockerfile: debian
|
|
405
|
-
-
|
|
397
|
+
- runon: ubuntu-latest
|
|
398
|
+
from_image: i386/alpine
|
|
406
399
|
image_platform: linux/386
|
|
407
400
|
platform: x86-linux-musl
|
|
408
401
|
dockerfile: alpine
|
|
409
|
-
-
|
|
402
|
+
- runon: ubuntu-24.04-arm
|
|
403
|
+
from_image: arm32v6/alpine
|
|
410
404
|
image_platform: linux/arm/v6
|
|
411
405
|
platform: arm-linux-musl
|
|
412
406
|
dockerfile: alpine
|
|
413
|
-
-
|
|
407
|
+
- runon: ubuntu-latest
|
|
408
|
+
from_image: alpine
|
|
414
409
|
image_platform: linux/amd64
|
|
415
410
|
platform: x86_64-linux-musl
|
|
416
411
|
dockerfile: alpine
|
|
417
|
-
runs-on:
|
|
412
|
+
runs-on: ${{ matrix.runon }}
|
|
418
413
|
steps:
|
|
419
414
|
- uses: actions/checkout@v4
|
|
420
415
|
- name: Download gem-${{ matrix.platform }}
|
|
@@ -423,7 +418,6 @@ jobs:
|
|
|
423
418
|
name: gem-${{ matrix.platform }}
|
|
424
419
|
- name: Build ${{ matrix.from_image }} image
|
|
425
420
|
run: |
|
|
426
|
-
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
427
421
|
docker build --rm --build-arg from_image=${{ matrix.from_image }} --platform=${{ matrix.image_platform }} -t ruby-test -f test/env/Dockerfile.${{ matrix.dockerfile }} .
|
|
428
422
|
- name: Run tests
|
|
429
423
|
run: docker run --rm -t --network=host -v `pwd`:/build ruby-test
|
|
@@ -9,12 +9,17 @@ on:
|
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
11
|
build:
|
|
12
|
+
name: build native
|
|
12
13
|
strategy:
|
|
13
14
|
fail-fast: false
|
|
14
15
|
matrix:
|
|
16
|
+
os:
|
|
17
|
+
- ubuntu-latest
|
|
18
|
+
- ubuntu-24.04-arm
|
|
15
19
|
platform:
|
|
16
20
|
- aarch64-linux-gnu
|
|
17
21
|
- aarch64-linux-musl
|
|
22
|
+
- aarch64-mingw-ucrt
|
|
18
23
|
- arm-linux-gnu
|
|
19
24
|
- arm-linux-musl
|
|
20
25
|
- arm64-darwin
|
|
@@ -27,55 +32,85 @@ jobs:
|
|
|
27
32
|
- x86_64-darwin
|
|
28
33
|
- x86_64-linux-gnu
|
|
29
34
|
- x86_64-linux-musl
|
|
30
|
-
runs-on:
|
|
35
|
+
runs-on: ${{ matrix.os }}
|
|
31
36
|
steps:
|
|
32
37
|
- uses: actions/checkout@v4
|
|
33
|
-
- name: Use cache from primary pipeline
|
|
34
|
-
uses: actions/cache@v4
|
|
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
38
|
- uses: ruby/setup-ruby@v1
|
|
41
39
|
with:
|
|
42
40
|
ruby-version: "3.3"
|
|
43
41
|
bundler-cache: true
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if %q(${{matrix.platform}}).end_with?("-gnu"); \
|
|
54
|
-
print "generic_linux_snapshot_name="; \
|
|
55
|
-
puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}}), :version => %q(snapshot)).chomp("-gnu"); \
|
|
56
|
-
end \
|
|
57
|
-
' | tee -a $GITHUB_OUTPUT
|
|
58
|
-
- name: Build docker image
|
|
59
|
-
env:
|
|
60
|
-
RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new --load
|
|
42
|
+
|
|
43
|
+
- name: Fetch docker buildx layer cache
|
|
44
|
+
uses: actions/cache@v4
|
|
45
|
+
with:
|
|
46
|
+
path: tmp/build-cache-${{ runner.arch }}
|
|
47
|
+
key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
48
|
+
restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx
|
|
49
|
+
enableCrossOsArchive: true
|
|
50
|
+
- name: Change docker to a cache-able driver
|
|
61
51
|
run: |
|
|
62
52
|
docker buildx create --driver docker-container --use
|
|
63
|
-
bundle exec rake build:${{matrix.platform}}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new"
|
|
54
|
+
- name: Show docker images
|
|
55
|
+
run: docker images
|
|
56
|
+
- name: Update and prune docker buildx layer cache
|
|
57
|
+
run: |
|
|
58
|
+
rm -rf tmp/build-cache-${{ runner.arch }}
|
|
59
|
+
mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }}
|
|
60
|
+
|
|
61
|
+
push:
|
|
62
|
+
name: push
|
|
63
|
+
needs: build
|
|
64
|
+
strategy:
|
|
65
|
+
fail-fast: false
|
|
66
|
+
matrix:
|
|
67
|
+
platform:
|
|
68
|
+
- aarch64-linux-gnu
|
|
69
|
+
- aarch64-linux-musl
|
|
70
|
+
- aarch64-mingw-ucrt
|
|
71
|
+
- arm-linux-gnu
|
|
72
|
+
- arm-linux-musl
|
|
73
|
+
- arm64-darwin
|
|
74
|
+
- jruby
|
|
75
|
+
- x64-mingw-ucrt
|
|
76
|
+
- x64-mingw32
|
|
77
|
+
- x86-linux-gnu
|
|
78
|
+
- x86-linux-musl
|
|
79
|
+
- x86-mingw32
|
|
80
|
+
- x86_64-darwin
|
|
81
|
+
- x86_64-linux-gnu
|
|
82
|
+
- x86_64-linux-musl
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v4
|
|
86
|
+
- name: Use X64 cache from primary pipeline
|
|
87
|
+
uses: actions/cache/restore@v4
|
|
88
|
+
with:
|
|
89
|
+
path: tmp/build-cache-X64
|
|
90
|
+
key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
91
|
+
restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx
|
|
92
|
+
enableCrossOsArchive: true
|
|
93
|
+
- name: Use ARM64 cache from primary pipeline
|
|
94
|
+
uses: actions/cache/restore@v4
|
|
95
|
+
with:
|
|
96
|
+
path: tmp/build-cache-ARM64
|
|
97
|
+
key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
98
|
+
restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx
|
|
99
|
+
enableCrossOsArchive: true
|
|
100
|
+
fail-on-cache-miss: true
|
|
101
|
+
- uses: ruby/setup-ruby@v1
|
|
102
|
+
with:
|
|
103
|
+
ruby-version: "3.3"
|
|
104
|
+
bundler-cache: true
|
|
67
105
|
- uses: docker/login-action@v3
|
|
68
106
|
with:
|
|
69
107
|
registry: ghcr.io
|
|
70
108
|
username: ${{github.actor}}
|
|
71
109
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
72
|
-
- name:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
docker
|
|
76
|
-
docker push ${{steps.rcd_config.outputs.snapshot_name}}
|
|
77
|
-
- name: Push a generic linux image
|
|
78
|
-
if: ${{ steps.rcd_config.outputs.generic_linux_snapshot_name }}
|
|
110
|
+
- name: Use cache and push docker image
|
|
111
|
+
env:
|
|
112
|
+
RCD_IMAGE_VERSION: snapshot
|
|
113
|
+
RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache-X64 --cache-from=type=local,src=tmp/build-cache-ARM64 --cache-to=type=local,dest=tmp/build-cache-new
|
|
79
114
|
run: |
|
|
80
|
-
docker
|
|
81
|
-
|
|
115
|
+
docker buildx create --driver docker-container --use
|
|
116
|
+
bundle exec rake release:${{matrix.platform}}
|
|
@@ -19,9 +19,61 @@ jobs:
|
|
|
19
19
|
strategy:
|
|
20
20
|
fail-fast: false
|
|
21
21
|
matrix:
|
|
22
|
+
os:
|
|
23
|
+
- ubuntu-latest
|
|
24
|
+
- ubuntu-24.04-arm
|
|
22
25
|
platform:
|
|
23
26
|
- aarch64-linux-gnu
|
|
24
27
|
- aarch64-linux-musl
|
|
28
|
+
- aarch64-mingw-ucrt
|
|
29
|
+
- arm-linux-gnu
|
|
30
|
+
- arm-linux-musl
|
|
31
|
+
- arm64-darwin
|
|
32
|
+
- jruby
|
|
33
|
+
- x64-mingw-ucrt
|
|
34
|
+
- x64-mingw32
|
|
35
|
+
- x86-linux-gnu
|
|
36
|
+
- x86-linux-musl
|
|
37
|
+
- x86-mingw32
|
|
38
|
+
- x86_64-darwin
|
|
39
|
+
- x86_64-linux-gnu
|
|
40
|
+
- x86_64-linux-musl
|
|
41
|
+
runs-on: ${{ matrix.os }}
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: ruby/setup-ruby@v1
|
|
45
|
+
with:
|
|
46
|
+
ruby-version: "3.3"
|
|
47
|
+
bundler-cache: true
|
|
48
|
+
|
|
49
|
+
- name: Fetch docker buildx layer cache
|
|
50
|
+
uses: actions/cache@v4
|
|
51
|
+
with:
|
|
52
|
+
path: tmp/build-cache-${{ runner.arch }}
|
|
53
|
+
key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
54
|
+
restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx
|
|
55
|
+
enableCrossOsArchive: true
|
|
56
|
+
- name: Change docker to a cache-able driver
|
|
57
|
+
run: |
|
|
58
|
+
docker buildx create --driver docker-container --use
|
|
59
|
+
bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new"
|
|
60
|
+
- name: Show docker images
|
|
61
|
+
run: docker images
|
|
62
|
+
- name: Update and prune docker buildx layer cache
|
|
63
|
+
run: |
|
|
64
|
+
rm -rf tmp/build-cache-${{ runner.arch }}
|
|
65
|
+
mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }}
|
|
66
|
+
|
|
67
|
+
push:
|
|
68
|
+
needs: build
|
|
69
|
+
name: "push ${{ inputs.tag }} ${{ matrix.platform }}"
|
|
70
|
+
strategy:
|
|
71
|
+
fail-fast: false
|
|
72
|
+
matrix:
|
|
73
|
+
platform:
|
|
74
|
+
- aarch64-linux-gnu
|
|
75
|
+
- aarch64-linux-musl
|
|
76
|
+
- aarch64-mingw-ucrt
|
|
25
77
|
- arm-linux-gnu
|
|
26
78
|
- arm-linux-musl
|
|
27
79
|
- arm64-darwin
|
|
@@ -39,49 +91,33 @@ jobs:
|
|
|
39
91
|
- uses: actions/checkout@v4
|
|
40
92
|
with:
|
|
41
93
|
ref: ${{ inputs.tag }}
|
|
42
|
-
- name: Use cache from primary pipeline
|
|
43
|
-
uses: actions/cache@v4
|
|
94
|
+
- name: Use X64 cache from primary pipeline
|
|
95
|
+
uses: actions/cache/restore@v4
|
|
96
|
+
with:
|
|
97
|
+
path: tmp/build-cache-X64
|
|
98
|
+
key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
99
|
+
restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx
|
|
100
|
+
enableCrossOsArchive: true
|
|
101
|
+
- name: Use ARM64 cache from primary pipeline
|
|
102
|
+
uses: actions/cache/restore@v4
|
|
44
103
|
with:
|
|
45
|
-
path: tmp/build-cache
|
|
46
|
-
key: ${{runner.os}}-${{matrix.platform}}-buildx-${{github.sha}}
|
|
47
|
-
restore-keys:
|
|
48
|
-
|
|
104
|
+
path: tmp/build-cache-ARM64
|
|
105
|
+
key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx-${{ github.sha }}
|
|
106
|
+
restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx
|
|
107
|
+
enableCrossOsArchive: true
|
|
108
|
+
fail-on-cache-miss: true
|
|
49
109
|
- uses: ruby/setup-ruby@v1
|
|
50
110
|
with:
|
|
51
111
|
ruby-version: "3.3"
|
|
52
112
|
bundler-cache: true
|
|
53
|
-
- name: Generate docker image names
|
|
54
|
-
id: rcd_config
|
|
55
|
-
run: |
|
|
56
|
-
bundle exec ruby -e ' \
|
|
57
|
-
require "rake_compiler_dock"; \
|
|
58
|
-
print "image_name="; \
|
|
59
|
-
puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}})); \
|
|
60
|
-
if %q(${{matrix.platform}}).end_with?("-gnu"); \
|
|
61
|
-
print "generic_linux_image_name="; \
|
|
62
|
-
puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}})).chomp("-gnu"); \
|
|
63
|
-
end \
|
|
64
|
-
' | tee -a $GITHUB_OUTPUT
|
|
65
|
-
- name: Build docker image
|
|
66
|
-
env:
|
|
67
|
-
RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new --load
|
|
68
|
-
run: |
|
|
69
|
-
docker buildx create --driver docker-container --use
|
|
70
|
-
bundle exec rake build:${{matrix.platform}}
|
|
71
|
-
# move build cache and remove outdated layers
|
|
72
|
-
rm -rf tmp/build-cache
|
|
73
|
-
mv tmp/build-cache-new tmp/build-cache
|
|
74
113
|
- uses: docker/login-action@v3
|
|
75
114
|
with:
|
|
76
115
|
registry: ghcr.io
|
|
77
116
|
username: ${{github.actor}}
|
|
78
117
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
79
|
-
- name:
|
|
80
|
-
|
|
81
|
-
docker
|
|
82
|
-
docker push ${{steps.rcd_config.outputs.image_name}}
|
|
83
|
-
- name: Push a generic linux image
|
|
84
|
-
if: ${{ steps.rcd_config.outputs.generic_linux_image_name }}
|
|
118
|
+
- name: Use cache and push docker image
|
|
119
|
+
env:
|
|
120
|
+
RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache-X64 --cache-from=type=local,src=tmp/build-cache-ARM64 --cache-to=type=local,dest=tmp/build-cache-new
|
|
85
121
|
run: |
|
|
86
|
-
docker
|
|
87
|
-
|
|
122
|
+
docker buildx create --driver docker-container --use
|
|
123
|
+
bundle exec rake release:${{matrix.platform}}
|
data/{History.md → CHANGELOG.md}
RENAMED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# `rake-compiler/rake-compiler-dock` Changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.1 / 2025-10-25
|
|
4
|
+
|
|
5
|
+
- Add support for ARM64 host images and release rake-compiler-dock host images for ARM64 and x86_64. #140
|
|
6
|
+
- Add new target platform `aarch64-mingw-ucrt` aka Windows on ARM. #152
|
|
7
|
+
- Allow easier selection of the ruby run in the container. #151
|
|
8
|
+
- Install `mig` which is a Macos specific RPC code generator. #155
|
|
9
|
+
- Add `RCD_IMAGE_VERSION` env var to easily set image version or `snapshot`. #163
|
|
10
|
+
- Disable `rpath` in cross compiled C extensions, since it is only valid in the build environment. #165
|
|
11
|
+
- Drop support for Ruby 2.4, 2.5, and 2.6. #153 @ianks @flavorjones
|
|
12
|
+
- Remove `rbenv` ruby version 2.5.9 from the build container. #153 @ianks @flavorjones
|
|
13
|
+
- Rename `History.md` to `CHANGELOG.md` which is more common.
|
|
14
|
+
|
|
15
|
+
### CRuby container summary
|
|
16
|
+
|
|
17
|
+
- native rubies: 3.4.5 (default), 3.1.7
|
|
18
|
+
- `RUBY_CC_VERSION=3.4.5:3.3.9:3.2.9:3.1.7:3.0.7:2.7.8`
|
|
19
|
+
|
|
20
|
+
|
|
3
21
|
## v1.9.1 / 2025-01-20
|
|
4
22
|
|
|
5
23
|
### Features
|
data/CONTRIBUTING.md
CHANGED
|
@@ -6,7 +6,7 @@ This document is intended for the rake-compiler-dock contributors.
|
|
|
6
6
|
|
|
7
7
|
- prep
|
|
8
8
|
- [ ] make sure CI is green!
|
|
9
|
-
- [ ] update `
|
|
9
|
+
- [ ] update `CHANGELOG.md` and `lib/rake_compiler_dock/version.rb`
|
|
10
10
|
- [ ] commit and create a git tag
|
|
11
11
|
- option 1: build locally
|
|
12
12
|
- build
|
|
@@ -64,3 +64,46 @@ docker buildx create --use --driver=docker-container
|
|
|
64
64
|
bundle exec rake build
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
|
|
68
|
+
### Create builder instance for two architectures
|
|
69
|
+
|
|
70
|
+
Building with qemu emulation fails currently with a segfault, so that it must be built by a builder instance with at least one remote node for the other architecture.
|
|
71
|
+
Building on native hardware is also much faster (~45 minutes) than on qemu.
|
|
72
|
+
A two-nodes builder requires obviously a ARM and a Intel/AMD device.
|
|
73
|
+
It can be created like this:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
# Make sure the remote instance can be connected
|
|
77
|
+
$ docker -H ssh://isa info
|
|
78
|
+
|
|
79
|
+
# Create a new builder with the local instance
|
|
80
|
+
# Disable the garbage collector by the config file
|
|
81
|
+
$ docker buildx create --name isayoga --config build/buildkitd.toml
|
|
82
|
+
|
|
83
|
+
# Add the remote instance
|
|
84
|
+
$ docker buildx create --name isayoga --config build/buildkitd.toml --append ssh://isa
|
|
85
|
+
|
|
86
|
+
# They are inactive from the start
|
|
87
|
+
$ docker buildx ls
|
|
88
|
+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
|
|
89
|
+
isayoga docker-container
|
|
90
|
+
\_ isayoga0 \_ unix:///var/run/docker.sock inactive
|
|
91
|
+
\_ isayoga1 \_ ssh://isa inactive
|
|
92
|
+
default* docker
|
|
93
|
+
\_ default \_ default running v0.13.2 linux/arm64
|
|
94
|
+
|
|
95
|
+
# Bootstrap the instances
|
|
96
|
+
$ docker buildx inspect --bootstrap --builder isayoga
|
|
97
|
+
|
|
98
|
+
# Set the new builder as default
|
|
99
|
+
$ docker buildx use isayoga
|
|
100
|
+
|
|
101
|
+
# Now it should be default and in state "running"
|
|
102
|
+
$ docker buildx ls
|
|
103
|
+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
|
|
104
|
+
isayoga* docker-container
|
|
105
|
+
\_ isayoga0 \_ unix:///var/run/docker.sock running v0.18.2 linux/arm64
|
|
106
|
+
\_ isayoga1 \_ ssh://isa running v0.18.2 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
|
|
107
|
+
default docker
|
|
108
|
+
\_ default \_ default running v0.13.2 linux/arm64
|
|
109
|
+
```
|