From 633a692aa4bee8fbec156176ce965240427cf9eb Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 09:49:44 +0900 Subject: [PATCH 01/17] Drop unused patch-url input from tarball-* reusables No caller passes patch-url: tarball-test.yml never set it, and ruby/actions draft-release.yml stopped forwarding it once it started calling these workflows by ref. Remove the input and the Apply patch step from the ubuntu, macos, and windows reusables. --- .github/workflows/tarball-macos.yml | 15 --------------- .github/workflows/tarball-ubuntu.yml | 15 --------------- .github/workflows/tarball-windows.yml | 17 ----------------- 3 files changed, 47 deletions(-) diff --git a/.github/workflows/tarball-macos.yml b/.github/workflows/tarball-macos.yml index 02d04ac66b5d7d..a0716df9a952a9 100644 --- a/.github/workflows/tarball-macos.yml +++ b/.github/workflows/tarball-macos.yml @@ -12,11 +12,6 @@ on: required: false type: string default: '' - patch-url: - description: 'Patch URL forwarded from workflow_dispatch' - required: false - type: string - default: '' rebuild-homebrew-ruby: description: 'Uninstall and reinstall Homebrew Ruby on macos-15-intel' required: false @@ -44,16 +39,6 @@ jobs: path: pkg - name: Extract run: tar xf pkg/*.tar.xz - - name: Apply patch - run: | - set -x - curl -sSL "${RUBY_PATCH_URL}" -o ruby.patch - cd "$ARCHNAME/" - git apply ../ruby.patch - shell: bash - env: - RUBY_PATCH_URL: ${{ inputs.patch-url }} - if: inputs.patch-url != '' - name: Install libraries run: | with_retry () { diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 3ab0dc407960c7..4b752c553e8366 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -12,11 +12,6 @@ on: required: false type: string default: '' - patch-url: - description: 'Patch URL forwarded from workflow_dispatch' - required: false - type: string - default: '' apt-mode: description: '"none" | "git-only" | "ruby-and-git" — controls per-test_task apt install handling' required: false @@ -71,16 +66,6 @@ jobs: path: pkg - name: Extract run: tar xf pkg/*.tar.xz - - name: Apply patch - run: | - set -x - curl -sSL "${RUBY_PATCH_URL}" -o ruby.patch - cd "$ARCHNAME/" - git apply ../ruby.patch - shell: bash - env: - RUBY_PATCH_URL: ${{ inputs.patch-url }} - if: inputs.patch-url != '' - name: Install libraries (apt-mode=none) run: | set -x diff --git a/.github/workflows/tarball-windows.yml b/.github/workflows/tarball-windows.yml index 52a28f006e6447..2cb097130e2939 100644 --- a/.github/workflows/tarball-windows.yml +++ b/.github/workflows/tarball-windows.yml @@ -7,11 +7,6 @@ on: description: 'archname (e.g. snapshot-master)' required: true type: string - patch-url: - description: 'Patch URL forwarded from workflow_dispatch' - required: false - type: string - default: '' jobs: windows: @@ -73,18 +68,6 @@ jobs: - name: Extract run: 7z x pkg/*.zip working-directory: - - name: Apply patch - run: | - set -x - curl -sSL "${RUBY_PATCH_URL}" -o ruby.patch - cd "$ARCHNAME" - git apply ../ruby.patch - shell: bash - env: - RUBY_PATCH_URL: ${{ inputs.patch-url }} - ARCHNAME: ${{ inputs.archname }} - if: inputs.patch-url != '' - working-directory: - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: From a2cff6ac358bb2983b844ad15df7b5ce36aafca4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:00:22 +0900 Subject: [PATCH 02/17] Drop rebuild-homebrew-ruby input from tarball-macos The Homebrew Ruby uninstall/reinstall dance was only enabled on ruby_3_3 to work around macos-15-intel quirks, and the reinstall step never fired because macos-15-intel only runs the check task. Drop both steps and the input. --- .github/workflows/tarball-macos.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/tarball-macos.yml b/.github/workflows/tarball-macos.yml index a0716df9a952a9..085e1a50def4b1 100644 --- a/.github/workflows/tarball-macos.yml +++ b/.github/workflows/tarball-macos.yml @@ -12,11 +12,6 @@ on: required: false type: string default: '' - rebuild-homebrew-ruby: - description: 'Uninstall and reinstall Homebrew Ruby on macos-15-intel' - required: false - type: boolean - default: false jobs: macos: @@ -46,13 +41,6 @@ jobs: } set -x with_retry brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline libyaml - - name: Uninstall Homebrew Ruby - run: | - for formula in $(brew list 2>/dev/null | grep '^ruby'); do - brew uninstall --force "$formula" - done - sudo rm -rf /usr/local/lib/ruby - if: inputs.rebuild-homebrew-ruby && matrix.os == 'macos-15-intel' - name: Set ENV run: | echo "JOBS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV @@ -60,9 +48,6 @@ jobs: run: cd "$ARCHNAME/" && ./configure --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml) - name: make run: cd "$ARCHNAME/" && make $JOBS - - name: Reinstall Homebrew Ruby - run: brew install ruby - if: inputs.rebuild-homebrew-ruby && matrix.os == 'macos-15-intel' && (matrix.test_task == 'test-bundled-gems' || matrix.test_task == 'test-bundler-parallel') - name: Tests run: cd "$ARCHNAME/" && make $JOBS -s ${{ matrix.test_task }} env: From 1d76e0fc18090c68586b361eaf2116c7fa5419c2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:11:50 +0900 Subject: [PATCH 03/17] Drop allow-failures input from tarball-* reusables power_assert was allowed to fail on master/4_0 by passing it through this input. The allow-list belongs in tool/test-bundled-gems.rb now that the tool ships in the same repo as the workflow. --- .github/workflows/tarball-macos.yml | 6 ------ .github/workflows/tarball-test.yml | 2 -- .github/workflows/tarball-ubuntu.yml | 6 ------ 3 files changed, 14 deletions(-) diff --git a/.github/workflows/tarball-macos.yml b/.github/workflows/tarball-macos.yml index 085e1a50def4b1..eeed89366120a1 100644 --- a/.github/workflows/tarball-macos.yml +++ b/.github/workflows/tarball-macos.yml @@ -7,11 +7,6 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string - allow-failures: - description: 'TEST_BUNDLED_GEMS_ALLOW_FAILURES value' - required: false - type: string - default: '' jobs: macos: @@ -26,7 +21,6 @@ jobs: runs-on: ${{ matrix.os }} env: ARCHNAME: ${{ inputs.archname }} - TEST_BUNDLED_GEMS_ALLOW_FAILURES: ${{ inputs.allow-failures }} steps: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: diff --git a/.github/workflows/tarball-test.yml b/.github/workflows/tarball-test.yml index 5b06b466fe0a90..c5ef60fa5cb2cd 100644 --- a/.github/workflows/tarball-test.yml +++ b/.github/workflows/tarball-test.yml @@ -53,7 +53,6 @@ jobs: uses: ./.github/workflows/tarball-ubuntu.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - allow-failures: power_assert remove-gnupg: true notify-ruby-sha: true branch-label: ${{ needs.tarball.outputs.branch }} @@ -64,7 +63,6 @@ jobs: uses: ./.github/workflows/tarball-macos.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - allow-failures: power_assert secrets: inherit windows: diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 4b752c553e8366..d8a80c695c08bc 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -7,11 +7,6 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string - allow-failures: - description: 'TEST_BUNDLED_GEMS_ALLOW_FAILURES value' - required: false - type: string - default: '' apt-mode: description: '"none" | "git-only" | "ruby-and-git" — controls per-test_task apt install handling' required: false @@ -58,7 +53,6 @@ jobs: runs-on: ${{ matrix.os }} env: ARCHNAME: ${{ inputs.archname }} - TEST_BUNDLED_GEMS_ALLOW_FAILURES: ${{ inputs.allow-failures }} steps: - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: From 1fa99b488cd5bcf92bd4a65881f51e31476c1061 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:23:25 +0900 Subject: [PATCH 04/17] Drop remove-gnupg from tarball-ubuntu The step force-removed $HOME/.gnupg between Tests and Diff stats of HOME, but the original cause for the directory persisting was never identified. Remove it and observe whether the HOME diff still passes. --- .github/workflows/tarball-test.yml | 1 - .github/workflows/tarball-ubuntu.yml | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/.github/workflows/tarball-test.yml b/.github/workflows/tarball-test.yml index c5ef60fa5cb2cd..0a6744175c5b1a 100644 --- a/.github/workflows/tarball-test.yml +++ b/.github/workflows/tarball-test.yml @@ -53,7 +53,6 @@ jobs: uses: ./.github/workflows/tarball-ubuntu.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - remove-gnupg: true notify-ruby-sha: true branch-label: ${{ needs.tarball.outputs.branch }} secrets: inherit diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index d8a80c695c08bc..32272d1dbf1609 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -17,11 +17,6 @@ on: required: false type: boolean default: true - remove-gnupg: - description: 'Forcibly remove ~/.gnupg after tests' - required: false - type: boolean - default: false fixed-dirs-extra: description: 'Create $HOME/.local/share, $HOME/.ssh on top of minimal fixed dirs' required: false @@ -170,11 +165,6 @@ jobs: run: cd "$ARCHNAME/" && make $JOBS -s ${{ matrix.test_task }} env: RUBY_TESTOPTS: "-q --tty=no" - # not sure why ~/.gnupg is remained - # see tool/test/test_sync_default_gems.rb - - name: Forcibly remove test directory - run: rm -rf $HOME/.gnupg - if: inputs.remove-gnupg - name: Diff stats of HOME run: | set -euxo pipefail From 53c39788d26b6315941a79bfe18bda6282657e11 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:26:00 +0900 Subject: [PATCH 05/17] Drop setup-host-ruby from tarball-ubuntu Always install Ruby 3.2 via ruby/setup-ruby for test-bundled-gems. ruby_3_3 will follow once it stops relying on the apt-installed ruby for its host. --- .github/workflows/tarball-ubuntu.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 32272d1dbf1609..cb4fc2d89e0c5c 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -12,11 +12,6 @@ on: required: false type: string default: 'none' - setup-host-ruby: - description: 'Install Ruby 3.2 via ruby/setup-ruby for test-bundled-gems' - required: false - type: boolean - default: true fixed-dirs-extra: description: 'Create $HOME/.local/share, $HOME/.ssh on top of minimal fixed dirs' required: false @@ -108,7 +103,7 @@ jobs: with: ruby-version: 3.2 # test-bundled-gems requires executable host ruby - if: inputs.setup-host-ruby && matrix.test_task == 'test-bundled-gems' + if: matrix.test_task == 'test-bundled-gems' - name: Fixed world writable dirs run: | mkdir -p $HOME/.local From 2c3c4f20f8a83530830b881ec9019fe7a439ec3d Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:29:04 +0900 Subject: [PATCH 06/17] Drop apt-mode from tarball-ubuntu The three apt-mode variants existed to selectively uninstall git (and sometimes ruby) per test_task. ruby-and-git on ruby_3_3 also pinned an apt-installed host ruby. With ruby/setup-ruby covering the host ruby unconditionally and git always shipping on the runner image, the matrix collapses to the single 'none' install step. --- .github/workflows/tarball-ubuntu.yml | 51 +--------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index cb4fc2d89e0c5c..152279fd8d04c9 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -7,11 +7,6 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string - apt-mode: - description: '"none" | "git-only" | "ruby-and-git" — controls per-test_task apt install handling' - required: false - type: string - default: 'none' fixed-dirs-extra: description: 'Create $HOME/.local/share, $HOME/.ssh on top of minimal fixed dirs' required: false @@ -50,55 +45,11 @@ jobs: path: pkg - name: Extract run: tar xf pkg/*.tar.xz - - name: Install libraries (apt-mode=none) + - name: Install libraries run: | set -x sudo apt-get update -q sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison- autoconf- - if: inputs.apt-mode == 'none' - - name: Install libraries (apt-mode=git-only) - run: | - set -x - sudo apt-get update -q || : - # postfix `-` means `uninstall` - APT_INSTALL_GIT=git- - case "${{ matrix.test_task }}" in - test-bundled-gems) - # test-bundled-gems-fetch requires git - unset APT_INSTALL_GIT - ;; - test-bundler*) - # avoid Bundler::Source::Git::GitNotInstalledError - unset APT_INSTALL_GIT - ;; - *) - ;; - esac - sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison- autoconf- $APT_INSTALL_GIT - if: inputs.apt-mode == 'git-only' - - name: Install libraries (apt-mode=ruby-and-git) - run: | - set -x - sudo apt-get update -q || : - # postfix `-` means `uninstall` - APT_INSTALL_RUBY=ruby- - APT_INSTALL_GIT=git- - case "${{ matrix.test_task }}" in - test-bundled-gems) - # test-bundled-gems requires executable host ruby - APT_INSTALL_RUBY=ruby - # test-bundled-gems-fetch requires git - unset APT_INSTALL_GIT - ;; - test-bundler*) - # avoid Bundler::Source::Git::GitNotInstalledError - unset APT_INSTALL_GIT - ;; - *) - ;; - esac - sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison- autoconf- $APT_INSTALL_RUBY $APT_INSTALL_GIT - if: inputs.apt-mode == 'ruby-and-git' - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: ruby-version: 3.2 From 85e95675d142f7fa8637484aba59b4e07ad8f2fe Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:48:03 +0900 Subject: [PATCH 07/17] Drop ruby-bin from tarball-ubuntu Hardcode the post-install smoke test to /usr/local/bin/ruby, matching the configure default prefix used on master/4_0/3_4. ruby_3_3's `ruby` override falls away when it aligns with the same install layout. --- .github/workflows/tarball-ubuntu.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 152279fd8d04c9..ad0625478c57f3 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -12,11 +12,6 @@ on: required: false type: boolean default: true - ruby-bin: - description: 'Path to ruby for post-install version check' - required: false - type: string - default: '/usr/local/bin/ruby' notify-ruby-sha: description: 'Post ruby SHA failure notification to SIMPLER_ALERTS_URL' required: false @@ -152,9 +147,7 @@ jobs: run: cd "$ARCHNAME/" && sudo make $JOBS install if: matrix.test_task == 'check' - name: ruby -v - env: - RUBY_BIN: ${{ inputs.ruby-bin }} - run: '"$RUBY_BIN" -v' + run: /usr/local/bin/ruby -v if: matrix.test_task == 'check' - name: Show .local run: find $HOME/.local -ls From d9b727c5307487c6c2f1d5fed425d0eb5d2c67c4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:49:24 +0900 Subject: [PATCH 08/17] Verify gem and bundle alongside ruby after make install Confirms the snapshot tarball ships a working RubyGems and Bundler in addition to the ruby binary. --- .github/workflows/tarball-ubuntu.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index ad0625478c57f3..228cda3f4c0d76 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -146,8 +146,11 @@ jobs: - name: make install run: cd "$ARCHNAME/" && sudo make $JOBS install if: matrix.test_task == 'check' - - name: ruby -v - run: /usr/local/bin/ruby -v + - name: Verify installed binaries + run: | + /usr/local/bin/ruby -v + /usr/local/bin/gem -v + /usr/local/bin/bundle -v if: matrix.test_task == 'check' - name: Show .local run: find $HOME/.local -ls From aa04c2c4784a5c265689e3147bfc9128d573aded Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:50:42 +0900 Subject: [PATCH 09/17] Drop fixed-dirs-extra and fold its dirs into the main step ruby_3_3 was the only caller that disabled the extra mkdir step. Always create $HOME/.local/share and $HOME/.ssh in the main Fixed world writable dirs step. mkdir -p $HOME/.local/share also covers $HOME/.local, so the bare mkdir for it goes away. --- .github/workflows/tarball-ubuntu.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 228cda3f4c0d76..b0b4d5ad70b5ca 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -7,11 +7,6 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string - fixed-dirs-extra: - description: 'Create $HOME/.local/share, $HOME/.ssh on top of minimal fixed dirs' - required: false - type: boolean - default: true notify-ruby-sha: description: 'Post ruby SHA failure notification to SIMPLER_ALERTS_URL' required: false @@ -52,20 +47,16 @@ jobs: if: matrix.test_task == 'test-bundled-gems' - name: Fixed world writable dirs run: | - mkdir -p $HOME/.local + mkdir -p $HOME/.local/share mkdir -p $HOME/.cache/gem/specs mkdir -p $HOME/.bundle/cache + mkdir -p $HOME/.ssh chmod a-w $HOME/.bundle # chmod a-w $HOME # allow to write $HOME and check stats of HOME around tests (see below) chmod -v a-w $HOME/.config sudo chmod -R a-w /usr/share sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v a-w $d; done' || : - - name: Fixed world writable dirs (extra) - run: | - mkdir -p $HOME/.local/share - mkdir -p $HOME/.ssh - if: inputs.fixed-dirs-extra - name: Set ENV run: | echo "JOBS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV From 07b258bd1c9a8de686c6de04a20a5c6a05295b91 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 10:53:21 +0900 Subject: [PATCH 10/17] Verify gem and bundle in tarball-macos and tarball-windows Match the smoke test added to tarball-ubuntu. macos checks the installed /usr/local/bin/{ruby,gem,bundle}; windows runs the build-tree ruby against bin/{gem,bundle} from the extracted tarball because the workflow has no install step. --- .github/workflows/tarball-macos.yml | 7 +++++-- .github/workflows/tarball-windows.yml | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tarball-macos.yml b/.github/workflows/tarball-macos.yml index eeed89366120a1..5496090924bcab 100644 --- a/.github/workflows/tarball-macos.yml +++ b/.github/workflows/tarball-macos.yml @@ -57,8 +57,11 @@ jobs: - name: make install run: cd "$ARCHNAME/" && sudo make $JOBS install if: matrix.test_task == 'check' - - name: ruby -v - run: /usr/local/bin/ruby -v + - name: Verify installed binaries + run: | + /usr/local/bin/ruby -v + /usr/local/bin/gem -v + /usr/local/bin/bundle -v if: matrix.test_task == 'check' - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 with: diff --git a/.github/workflows/tarball-windows.yml b/.github/workflows/tarball-windows.yml index 2cb097130e2939..61959cbd76efaf 100644 --- a/.github/workflows/tarball-windows.yml +++ b/.github/workflows/tarball-windows.yml @@ -113,9 +113,13 @@ jobs: env: YACC: win_bison - - name: ruby -v + - name: Verify built binaries + env: + ARCHNAME: ${{ inputs.archname }} run: | .\ruby -v + .\ruby ..\%ARCHNAME%\bin\gem -v + .\ruby ..\%ARCHNAME%\bin\bundle -v - run: nmake test timeout-minutes: 5 From 187a056e78dcea0dd69645955b0994485e05d0fc Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 11:14:08 +0900 Subject: [PATCH 11/17] Route tarball-test failure notifications to two Slack channels SIMPLER_ALERTS_URL always fires on failure so developer-facing CI (PR, push, merge_group, manual dispatch) surfaces breakage in the ruby-core channel. notify-release-channel additionally routes to SNAPSHOT_SLACK_WEBHOOK_URL for the daily snapshot dispatcher and future draft-release callers, with the same payload schema as before except commit now comes from github.sha. --- .github/workflows/tarball-macos.yml | 20 ++++++++++- .github/workflows/tarball-test-schedule.yml | 2 +- .github/workflows/tarball-test.yml | 10 ++++-- .github/workflows/tarball-ubuntu.yml | 39 ++++++++------------- .github/workflows/tarball-windows.yml | 20 ++++++++++- 5 files changed, 62 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tarball-macos.yml b/.github/workflows/tarball-macos.yml index 5496090924bcab..e1d4d4ba2a8665 100644 --- a/.github/workflows/tarball-macos.yml +++ b/.github/workflows/tarball-macos.yml @@ -7,6 +7,11 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string + notify-release-channel: + description: 'Also send failure notifications to SNAPSHOT_SLACK_WEBHOOK_URL (schedule/release builds).' + required: false + type: boolean + default: false jobs: macos: @@ -63,6 +68,19 @@ jobs: /usr/local/bin/gem -v /usr/local/bin/bundle -v if: matrix.test_task == 'check' + - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 + with: + payload: | + { + "ci": "GitHub Actions", + "env": "snapshot: ${{ matrix.os }} / ${{ matrix.test_task }}", + "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "commit": "${{ github.sha }}", + "branch": "${{ github.ref_name }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + if: failure() - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 with: payload: | @@ -74,4 +92,4 @@ jobs: } env: SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'schedule' + if: failure() && inputs.notify-release-channel diff --git a/.github/workflows/tarball-test-schedule.yml b/.github/workflows/tarball-test-schedule.yml index 225aeed633e9eb..abf80edf81ebe4 100644 --- a/.github/workflows/tarball-test-schedule.yml +++ b/.github/workflows/tarball-test-schedule.yml @@ -19,7 +19,7 @@ jobs: - ruby_3_3 steps: - name: Trigger tarball-test on ${{ matrix.branch }} - run: gh workflow run tarball-test.yml --ref "$BRANCH" --repo "$GITHUB_REPOSITORY" + run: gh workflow run tarball-test.yml --ref "$BRANCH" --repo "$GITHUB_REPOSITORY" -f notify-release-channel=true env: BRANCH: ${{ matrix.branch }} GH_TOKEN: ${{ secrets.MATZBOT_GITHUB_ACTION_TOKEN }} diff --git a/.github/workflows/tarball-test.yml b/.github/workflows/tarball-test.yml index 0a6744175c5b1a..308f090ccd0b4d 100644 --- a/.github/workflows/tarball-test.yml +++ b/.github/workflows/tarball-test.yml @@ -13,6 +13,11 @@ on: # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks merge_group: workflow_dispatch: + inputs: + notify-release-channel: + description: 'Also send failure notifications to SNAPSHOT_SLACK_WEBHOOK_URL (set by tarball-test-schedule).' + type: boolean + default: false concurrency: group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} @@ -53,8 +58,7 @@ jobs: uses: ./.github/workflows/tarball-ubuntu.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - notify-ruby-sha: true - branch-label: ${{ needs.tarball.outputs.branch }} + notify-release-channel: ${{ inputs.notify-release-channel || false }} secrets: inherit macos: @@ -62,6 +66,7 @@ jobs: uses: ./.github/workflows/tarball-macos.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} + notify-release-channel: ${{ inputs.notify-release-channel || false }} secrets: inherit windows: @@ -69,6 +74,7 @@ jobs: uses: ./.github/workflows/tarball-windows.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} + notify-release-channel: ${{ inputs.notify-release-channel || false }} secrets: inherit non_development: diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index b0b4d5ad70b5ca..3ebe0dc91b5d7a 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -7,16 +7,11 @@ on: description: 'archname (e.g. snapshot-master, snapshot-ruby_3_3)' required: true type: string - notify-ruby-sha: - description: 'Post ruby SHA failure notification to SIMPLER_ALERTS_URL' + notify-release-channel: + description: 'Also send failure notifications to SNAPSHOT_SLACK_WEBHOOK_URL (schedule/release builds).' required: false type: boolean default: false - branch-label: - description: 'Branch label for SIMPLER_ALERTS_URL notification. Defaults to "master".' - required: false - type: string - default: 'master' jobs: ubuntu: @@ -149,28 +144,24 @@ jobs: with: payload: | { - "attachments": [{ - "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} ", - "color": "danger" - }] + "ci": "GitHub Actions", + "env": "snapshot: ${{ matrix.os }} / ${{ matrix.test_task }}", + "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "commit": "${{ github.sha }}", + "branch": "${{ github.ref_name }}" } env: - SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'schedule' - - name: Get ruby/ruby sha - id: ruby_sha - run: cd "$ARCHNAME/" && ./ruby -e 'puts "sha=#{RUBY_REVISION}"' >> $GITHUB_OUTPUT - if: failure() && inputs.notify-ruby-sha && github.event_name == 'schedule' + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + if: failure() - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 with: payload: | { - "ci": "GitHub Actions", - "env": "snapshot: ${{ matrix.os }} / ${{ matrix.test_task }}", - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ steps.ruby_sha.outputs.sha }}", - "branch": "${{ inputs.branch-label }}" + "attachments": [{ + "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} ", + "color": "danger" + }] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} - if: failure() && inputs.notify-ruby-sha && github.event_name == 'schedule' + SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} + if: failure() && inputs.notify-release-channel diff --git a/.github/workflows/tarball-windows.yml b/.github/workflows/tarball-windows.yml index 61959cbd76efaf..5625c6facf0442 100644 --- a/.github/workflows/tarball-windows.yml +++ b/.github/workflows/tarball-windows.yml @@ -7,6 +7,11 @@ on: description: 'archname (e.g. snapshot-master)' required: true type: string + notify-release-channel: + description: 'Also send failure notifications to SNAPSHOT_SLACK_WEBHOOK_URL (schedule/release builds).' + required: false + type: boolean + default: false jobs: windows: @@ -130,6 +135,19 @@ jobs: timeout-minutes: 70 continue-on-error: ${{ matrix.continue-on-error || false }} + - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 + with: + payload: | + { + "ci": "GitHub Actions", + "env": "snapshot: ${{ env.OS_VER }} / ${{ matrix.test_task }}", + "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "commit": "${{ github.sha }}", + "branch": "${{ github.ref_name }}" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + if: failure() - uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2 with: payload: | @@ -141,4 +159,4 @@ jobs: } env: SLACK_WEBHOOK_URL: ${{ secrets.SNAPSHOT_SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'schedule' + if: failure() && inputs.notify-release-channel From 32aad3f7f37b3e0758ae563e0a37cc96159ddb21 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 11:27:52 +0900 Subject: [PATCH 12/17] Add upload-artifact input to make-snapshot composite action Lets callers opt out of the Packages and Info uploads. tarball-test keeps the default true so per-OS reusables can download them, while upload-tarball in ruby/actions can pass false once it runs the same composite in a matrix across four release branches without colliding on artifact names. --- .github/actions/make-snapshot/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/make-snapshot/action.yml b/.github/actions/make-snapshot/action.yml index f8d26dd989f0d0..4552f0e0677909 100644 --- a/.github/actions/make-snapshot/action.yml +++ b/.github/actions/make-snapshot/action.yml @@ -18,6 +18,10 @@ inputs: description: 'srcdir for tool/make-snapshot. Empty = clone ruby/ruby into ./ruby.' required: false default: '' + upload-artifact: + description: 'Upload Packages and Info as workflow artifacts. Pass "false" when callers run in a matrix that would collide on artifact names.' + required: false + default: 'true' runs: using: "composite" @@ -65,7 +69,9 @@ runs: with: name: Packages path: pkg + if: ${{ inputs.upload-artifact == 'true' }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: Info path: pkg/info + if: ${{ inputs.upload-artifact == 'true' }} From ee7c8df543998f8a7da528e9d73088d4bc9293f4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 12:20:51 +0900 Subject: [PATCH 13/17] Guard inputs.notify-release-channel behind workflow_dispatch check The inputs context is only populated for workflow_dispatch and workflow_call, so referencing it on push, pull_request, or merge_group relies on undefined behaviour. Short-circuit on github.event_name so non-dispatch runs always pass false to the reusables. --- .github/workflows/tarball-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tarball-test.yml b/.github/workflows/tarball-test.yml index 308f090ccd0b4d..db49977cbff285 100644 --- a/.github/workflows/tarball-test.yml +++ b/.github/workflows/tarball-test.yml @@ -58,7 +58,7 @@ jobs: uses: ./.github/workflows/tarball-ubuntu.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - notify-release-channel: ${{ inputs.notify-release-channel || false }} + notify-release-channel: ${{ github.event_name == 'workflow_dispatch' && inputs.notify-release-channel || false }} secrets: inherit macos: @@ -66,7 +66,7 @@ jobs: uses: ./.github/workflows/tarball-macos.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - notify-release-channel: ${{ inputs.notify-release-channel || false }} + notify-release-channel: ${{ github.event_name == 'workflow_dispatch' && inputs.notify-release-channel || false }} secrets: inherit windows: @@ -74,7 +74,7 @@ jobs: uses: ./.github/workflows/tarball-windows.yml with: archname: snapshot-${{ needs.tarball.outputs.branch }} - notify-release-channel: ${{ inputs.notify-release-channel || false }} + notify-release-channel: ${{ github.event_name == 'workflow_dispatch' && inputs.notify-release-channel || false }} secrets: inherit non_development: From 8e9b2b839cf10329786a7a8b97b8a6c4f377c463 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 12:39:12 +0900 Subject: [PATCH 14/17] Re-add unconditional rm -rf \$HOME/.gnupg before HOME diff Without the workaround the snapshot-tarball run leaves ~/.gnupg/{crls.d,private-keys-v1.d,public-keys.d} behind after test_sync_default_gems, which trips Diff stats of HOME. GPG 2.x's agent processes ignore GNUPGHOME for these directories on first launch, so always sweep the leftovers regardless of which branch the reusable was called from. --- .github/workflows/tarball-ubuntu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tarball-ubuntu.yml b/.github/workflows/tarball-ubuntu.yml index 3ebe0dc91b5d7a..4e4b2cf6d08d00 100644 --- a/.github/workflows/tarball-ubuntu.yml +++ b/.github/workflows/tarball-ubuntu.yml @@ -92,6 +92,10 @@ jobs: run: cd "$ARCHNAME/" && make $JOBS -s ${{ matrix.test_task }} env: RUBY_TESTOPTS: "-q --tty=no" + # test_sync_default_gems triggers gpg, whose agent processes leave + # $HOME/.gnupg around even when GNUPGHOME points elsewhere. + - name: Forcibly remove ~/.gnupg + run: rm -rf $HOME/.gnupg - name: Diff stats of HOME run: | set -euxo pipefail From 6759ef4b663e51eeba5acee96b3ea2fc00b1c6fd Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 21 May 2026 12:40:40 +0900 Subject: [PATCH 15/17] Drop gem and bundle smoke test from tarball-windows The bin/gem and bin/bundle scripts in the source tree do not run cleanly without an install step on Windows. Keep ruby -v only. --- .github/workflows/tarball-windows.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tarball-windows.yml b/.github/workflows/tarball-windows.yml index 5625c6facf0442..fb29253eae0582 100644 --- a/.github/workflows/tarball-windows.yml +++ b/.github/workflows/tarball-windows.yml @@ -118,13 +118,8 @@ jobs: env: YACC: win_bison - - name: Verify built binaries - env: - ARCHNAME: ${{ inputs.archname }} - run: | - .\ruby -v - .\ruby ..\%ARCHNAME%\bin\gem -v - .\ruby ..\%ARCHNAME%\bin\bundle -v + - name: ruby -v + run: .\ruby -v - run: nmake test timeout-minutes: 5 From 43f17f167266ef951fa0c1d77810a655e3eb9a23 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 21 May 2026 12:40:36 +0900 Subject: [PATCH 16/17] Add `--with-ext` and `--without-ext` options to configure-ext.mk --- template/configure-ext.mk.tmpl | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/template/configure-ext.mk.tmpl b/template/configure-ext.mk.tmpl index fff75b1f2e16a6..b4e999fe8efdbb 100644 --- a/template/configure-ext.mk.tmpl +++ b/template/configure-ext.mk.tmpl @@ -7,24 +7,34 @@ ECHO = $(ECHO1:0=@echo) <% srcdir = miniruby = script_args = nil +with_exts = [] +without_exts = [] opt = OptionParser.new do |o| o.on('--srcdir=SRCDIR') {|v| srcdir = v} o.on('--miniruby=MINIRUBY') {|v| miniruby = v} o.on('--script-args=MINIRUBY') {|v| script_args = v} + o.on('--with-ext=ext[,...]', Array) {|v| with_exts.concat(v)} + o.on('--without-ext=ext[,...]', Array) {|v| without_exts.concat(v)} o.order!(ARGV) end srcdir ||= File.dirname(File.dirname(__FILE__)) +script_args ||= "" + +filter = proc do |ext| + next false unless with_exts.empty? or !with_exts.any? {|w| File.fnmatch?(w, ext)} + without_exts.empty? or !without_exts.any? {|w| File.fnmatch?(w, ext)} +end exts = { exts: [ "--extstatic $(EXTSTATIC)", - Dir.glob("ext/**/extconf.rb", base: srcdir).map do |d| - d[%r[\Aext/[^/]+]] + Dir.glob("ext/**/extconf.rb", base: srcdir).filter_map do |d| + d if filter[File.basename(d = d[%r[\Aext/[^/]+]])] end.uniq ], gems: [ "--no-extstatic", - Dir.glob(".bundle/gems/**/extconf.rb", base: srcdir).grep_v(/test/) do |d| - d[%r[\A\.bundle/gems/[^/]+]] + Dir.glob(".bundle/gems/**/extconf.rb", base: srcdir).grep_v(/test/).filter_map do |d| + d if filter[File.basename(d = d[%r[\A\.bundle/gems/[^/]+]])] end.uniq ], } @@ -32,7 +42,14 @@ exts = { MINIRUBY = <%=miniruby%> SCRIPT_ARGS = <%=script_args.gsub("#", "\\#").gsub(/\A|[\s"']\K--jobserver-auth=[^\s'"]*/, "")%> EXTMK_ARGS = $(SCRIPT_ARGS) --gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \ - --make-flags="MINIRUBY='$(MINIRUBY)'" + --make-flags="MINIRUBY='$(MINIRUBY)'" \ +<% unless with_exts.empty? -%> + --with-ext=<%= with_exts.join(',') %> \ +<% end -%> +<% unless without_exts.empty? -%> + --without-ext=<%= without_exts.join(',') %> \ +<% end -%> + # EXTMK_ARGS all: exts gems exts: From 5de4b1188f3355bb09123a064e19d30ca9a9f247 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 21 May 2026 12:40:47 +0900 Subject: [PATCH 17/17] Exclude the extensions for tests when cross-compiling --- common.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 80b6547de10527..916484a6fec391 100644 --- a/common.mk +++ b/common.mk @@ -69,6 +69,7 @@ LIBRUBY_EXTS = ./.libruby-with-ext.time REVISION_H = ./.revision.time PLATFORM_D = $(TIMESTAMPDIR)/.$(PLATFORM_DIR).time ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time +yes_cross_compiling = $(CROSS_COMPILING:no=) X_$(CROSS_COMPILING:yes=)BASERUBY = $(BASERUBY) X_$(CROSS_COMPILING:no=)BASERUBY = $(XRUBY) RDOC = $(X_BASERUBY) --enable-gems "$(tooldir)/rdoc-srcdir" @@ -352,7 +353,8 @@ ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RBCONFIG) $(LIBRUBY) \ $(Q)$(MAKEDIRS) $(@D) $(Q)$(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ -c \ $(srcdir)/template/$(@F).tmpl --srcdir="$(srcdir)" \ - --miniruby="$(MINIRUBY)" --script-args='$(SCRIPT_ARGS)' + --miniruby="$(MINIRUBY)" --script-args='$(SCRIPT_ARGS)' \ + $(yes_cross_compiling:yes=--without-ext=-test-) configure-ext: $(EXTS_MK)