From 58f04c4129a1e7173842e26472378a609a16cca8 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 23 Mar 2025 19:15:04 +0000 Subject: [PATCH 1/2] Workaround `build` task issue in Ruby core CI The issue is described in https://github.com/rubygems/rubygems/issues/8477 The issue fails the workflow whenever RDoc's version is bumped as there will then be a mismatch between the target file name and the version that's actually built. For example: ``` rdoc 6.13.0 built to pkg/rdoc-6.12.0.gem. ``` This commit works around the issue by manually building the gem and installing it locally so the latest installed version will match the version contained in the gemspec file. --- .github/workflows/ruby-core.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index d4d0827925..9f19e93c21 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -50,8 +50,13 @@ jobs: with: path: ruby/rdoc - name: Build RDoc locally + # The `build` task provided by `require 'bundler/gem_tasks'` seems to have a bug + # as described in https://github.com/rubygems/rubygems/issues/8477 + # The manual `gem build` and `gem install` are used to work around this issue. run: | bundle install + gem build rdoc.gemspec + gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc - name: Generate Documentation with RDoc From 5a0710acf81170092290f3698c5a9bf70c913e55 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Mon, 24 Mar 2025 16:58:42 +0000 Subject: [PATCH 2/2] Update .github/workflows/ruby-core.yml Co-authored-by: Sutou Kouhei --- .github/workflows/ruby-core.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 9f19e93c21..3fe8ded5f9 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -56,6 +56,8 @@ jobs: run: | bundle install gem build rdoc.gemspec + # This gem isn't used for generating Ruby documentation. + # This is just for fixing `pkg/rdoc-X.Y.Z.gem` path. gem install rdoc-*.gem bundle exec rake build:local_ruby working-directory: ruby/rdoc