Re-use tarball-test workflows on ruby/ruby repository#125
Open
hsbt wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the draft release packaging workflow to reuse the tarball-* reusable workflows from ruby/ruby, aiming to centralize and reduce duplication of build/test steps across repositories.
Changes:
- Introduce an
infojob to deriveTARGET_VERSION,archname, and the correspondingruby/rubybranch. - Split out tarball creation/upload into a dedicated
tarballjob and adjust naming to usearchname. - Replace inline per-OS build/test matrices with per-branch reusable workflow calls to
ruby/ruby/.github/workflows/tarball-{ubuntu,macos,windows}.yml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
72
to
76
| if ruby -e "major = Integer('${TARGET_VERSION}'.split('.', 2).first); exit(major>=4)"; then | ||
| GITHUB_REF_RUBY_RUBY="refs/tags/v${TARGET_VERSION}" | ||
| FETCH_REF="refs/tags/v${TARGET_VERSION}" | ||
| else | ||
| GITHUB_REF_RUBY_RUBY="refs/tags/v$(echo $TARGET_VERSION | sed 'y/.-/__/')" | ||
| FETCH_REF="refs/tags/v$(echo $TARGET_VERSION | sed 'y/.-/__/')" | ||
| fi |
| MINOR=$(echo "$TARGET_VERSION" | cut -d. -f2) | ||
| BRANCH="ruby_${MAJOR}_${MINOR}" | ||
| ;; | ||
| esac |
Comment on lines
+131
to
+141
| ubuntu-master: | ||
| needs: [info, tarball] | ||
| if: needs.info.outputs.branch == 'master' | ||
| uses: ruby/ruby/.github/workflows/tarball-ubuntu.yml@master | ||
| with: | ||
| archname: ${{ needs.info.outputs.archname }} | ||
| allow-failures: power_assert | ||
| remove-gnupg: true | ||
| notify-ruby-sha: true | ||
| branch-label: master | ||
| secrets: inherit |
The per-OS test bodies that were inlined in draft-release move to
ruby/ruby/.github/workflows/tarball-{ubuntu,macos,windows}.yml,
matching the daily snapshot pipeline. The info logic is split out
into its own job so every downstream job can read the derived
TARGET_VERSION, archname, branch, and fetch_ref via
needs.info.outputs.
The tarball job keeps using ruby/ruby's make-snapshot composite
action (from #126) and passes fetch_ref through fetch-branch — the
composite's `git fetch +X:X` handles tag refspecs as well as branch
names.
GitHub Actions cannot interpolate the ref in uses: org/repo/path@ref,
so the per-OS tests are enumerated as job blocks grouped by branch
(master / ruby_4_0 / ruby_3_4 / ruby_3_3) and gated by
needs.info.outputs.branch. Add or drop a whole branch as one block.
Preview tags route to master.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
I will merge this after confirming to work with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current
draft-release.ymlworkflow has inline build and test steps. If we changed build or test step at ruby/ruby repository, we need to sync that step to this repository.This change uses the same step provided by ruby/ruby repository by re-using feature. It makes to consolidate our build and test steps in one repository.