Skip to content

Commit 10dd56f

Browse files
Maimerclaude
authored andcommitted
Skip malloctrim variant for Ruby >= 3.3 and target Ruby 4.0.2
Ruby 3.3+ natively includes malloc_trim, making the malloctrim variant unnecessary. This removes 42 CI jobs (162 → 120) and significantly reduces disk space needed during the publish step, which was failing with "no space left on device" after adding Ruby 4.0. Adds a config-driven variant_exclusions feature (similar to the existing distribution_exclusions) so future exclusions can be declared in config.yml without code changes. Also updates the Ruby 4.0 target from 4.0.0 to 4.0.2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4265f4c commit 10dd56f

13 files changed

Lines changed: 2538 additions & 11044 deletions

.github/workflows/ci-cd-build-packages-1.yml

Lines changed: 445 additions & 1681 deletions
Large diffs are not rendered by default.

.github/workflows/ci-cd-build-packages-2.yml

Lines changed: 445 additions & 1681 deletions
Large diffs are not rendered by default.

.github/workflows/ci-cd-build-packages-3.yml

Lines changed: 445 additions & 1681 deletions
Large diffs are not rendered by default.

.github/workflows/ci-cd-build-packages-4.yml

Lines changed: 171 additions & 789 deletions
Large diffs are not rendered by default.

.github/workflows/ci-cd-build-packages.yml.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888

8989
<%- distributions.each do |distribution| %>
9090
<%- ruby_package_versions_for_distro(distribution).each do |ruby_package_version| -%>
91-
<%- variants.each do |variant| -%>
91+
<%- variants_for_ruby_version(ruby_package_version).each do |variant| -%>
9292
<%- unindent(2) do %>
9393
build_ruby_<%= slug(distribution[:name]) %>-<%= slug(ruby_package_version[:id]) %>-<%= slug(variant[:name]) %>:
9494
name: 'Ruby [<%= distribution[:name] %>/<%= ruby_package_version[:id] %>/<%= variant[:name] %>]'
@@ -218,7 +218,7 @@ jobs:
218218
<%- unindent(2) do %>
219219
- build_jemalloc_<%= slug(distribution[:name]) %>
220220
<%- ruby_package_versions_for_distro(distribution).each do |ruby_package_version| %>
221-
<%- variants.each do |variant| -%>
221+
<%- variants_for_ruby_version(ruby_package_version).each do |variant| -%>
222222
- build_ruby_<%= slug(distribution[:name]) %>-<%= slug(ruby_package_version[:id]) %>-<%= slug(variant[:name]) %>
223223
<%- end -%>
224224
<%- end %>
@@ -300,7 +300,7 @@ jobs:
300300
if: |
301301
false
302302
<%- ruby_package_versions_for_distro(distribution).each do |ruby_package_version| -%>
303-
<%- variants.each do |variant| -%>
303+
<%- variants_for_ruby_version(ruby_package_version).each do |variant| -%>
304304
|| (needs.build_ruby_<%= slug(distribution[:name]) %>-<%= slug(ruby_package_version[:id]) %>-<%= slug(variant[:name]) %>.result != 'success'
305305
&& (needs.build_ruby_<%= slug(distribution[:name]) %>-<%= slug(ruby_package_version[:id]) %>-<%= slug(variant[:name]) %>.result != 'skipped'
306306
|| contains(inputs.necessary_jobs, ';Build Ruby [<%= distribution[:name] %>/<%= ruby_package_version[:id] %>/<%= variant[:name] %>];')))

.github/workflows/ci-cd-prepare.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,13 @@ jobs:
470470
### Sources ###
471471

472472

473-
download_ruby_source_4_0_0:
474-
name: Download Ruby source [4.0.0]
473+
download_ruby_source_4_0_2:
474+
name: Download Ruby source [4.0.2]
475475
runs-on: ubuntu-24.04
476476
permissions:
477477
id-token: write
478478
environment: test
479-
if: contains(inputs.necessary_jobs, ';Download Ruby source 4.0.0;')
479+
if: contains(inputs.necessary_jobs, ';Download Ruby source 4.0.2;')
480480
steps:
481481
- uses: actions/checkout@v4
482482
- uses: azure/login@v2
@@ -496,12 +496,12 @@ jobs:
496496
- name: Download
497497
run: ./internal-scripts/ci-cd/download-ruby-sources/download.sh
498498
env:
499-
RUBY_VERSION: 4.0.0
499+
RUBY_VERSION: 4.0.2
500500

501501
- name: Archive artifact
502502
run: ./internal-scripts/ci-cd/upload-artifact.sh
503503
env:
504-
ARTIFACT_NAME: ruby-src-4.0.0
504+
ARTIFACT_NAME: ruby-src-4.0.2
505505
ARTIFACT_PATH: output
506506
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
507507
download_ruby_source_3_4_8:
@@ -964,7 +964,7 @@ jobs:
964964
- build_docker_image_ubuntu_22_04
965965
- build_docker_image_ubuntu_24_04
966966
- build_docker_image_utility
967-
- download_ruby_source_4_0_0
967+
- download_ruby_source_4_0_2
968968
- download_ruby_source_3_4_8
969969
- download_ruby_source_3_3_10
970970
- download_ruby_source_3_2_9
@@ -1141,17 +1141,17 @@ jobs:
11411141
path: artifacts
11421142

11431143

1144-
- name: Download Ruby source artifact [4.0.0] from Google Cloud
1144+
- name: Download Ruby source artifact [4.0.2] from Google Cloud
11451145
run: ./internal-scripts/ci-cd/download-artifact.sh
11461146
env:
1147-
ARTIFACT_NAME: ruby-src-4.0.0
1147+
ARTIFACT_NAME: ruby-src-4.0.2
11481148
ARTIFACT_PATH: artifacts
11491149
CLEAR: true
11501150
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
1151-
- name: Archive Ruby source artifact [4.0.0] to Github
1151+
- name: Archive Ruby source artifact [4.0.2] to Github
11521152
uses: actions/upload-artifact@v4
11531153
with:
1154-
name: ruby-src-4.0.0
1154+
name: ruby-src-4.0.2
11551155
path: artifacts
11561156
compression-level: 0
11571157
- name: Download Ruby source artifact [3.4.8] from Google Cloud
@@ -1300,9 +1300,9 @@ jobs:
13001300
run: 'false'
13011301
if: |
13021302
false
1303-
|| (needs.download_ruby_source_4_0_0.result != 'success'
1304-
&& (needs.download_ruby_source_4_0_0.result != 'skipped'
1305-
|| contains(inputs.necessary_jobs, ';Download Ruby source 4.0.0;')))
1303+
|| (needs.download_ruby_source_4_0_2.result != 'success'
1304+
&& (needs.download_ruby_source_4_0_2.result != 'skipped'
1305+
|| contains(inputs.necessary_jobs, ';Download Ruby source 4.0.2;')))
13061306
|| (needs.download_ruby_source_3_4_8.result != 'success'
13071307
&& (needs.download_ruby_source_3_4_8.result != 'skipped'
13081308
|| contains(inputs.necessary_jobs, ';Download Ruby source 3.4.8;')))

0 commit comments

Comments
 (0)