Skip to content

Commit

Permalink
Merge pull request #569 from ruby/katei/fix-ci
Browse files Browse the repository at this point in the history
Use Ruby 3.4.1 in CI instead of master
  • Loading branch information
kateinoigakukun authored Jan 23, 2025
2 parents 218332f + ca5547f commit 1998b72
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 27 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
cargo-cache: true
cargo-vendor: true
cache-version: v2-${{ matrix.ruby-platform }}
ruby-version: "3.4"

- name: Set vars
id: vars
run: |
echo "rb-sys-version=$(bundle exec ruby -rrb_sys -e 'puts RbSys::VERSION')" >> $GITHUB_OUTPUT
- uses: oxidize-rb/cross-gem-action@main
- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
version: ${{ steps.vars.outputs.rb-sys-version }}
platform: ${{ matrix.ruby-platform }}
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}

- uses: actions/upload-artifact@v4
with:
name: cross-gem-${{ matrix.ruby-platform }}
path: ${{ steps.cross-gem.outputs.gem-path }}
if-no-files-found: error
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: "head"
ruby-version: "3.4.1"
bundler-cache: true
- run: ./bin/setup
- run: bundle exec rake check:type
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "head"
ruby-version: "3.4.1"
bundler-cache: true
- run: ./bin/setup
- run: rake ci:pin_build_manifest
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
- uses: ruby/setup-ruby@v1
if: ${{ matrix.entry.test != '' }}
with:
ruby-version: "head"
ruby-version: "3.4.1"
bundler-cache: false
- name: rake ${{ matrix.entry.test }}
run: |
Expand All @@ -176,7 +176,7 @@ jobs:
registry-url: https://registry.npmjs.org/
- uses: ruby/setup-ruby@v1
with:
ruby-version: "head"
ruby-version: "3.4.1"
bundler-cache: true
- run: ./bin/setup
- run: echo "PREREL_NAME=${{ inputs.prerel_name }}" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gemspec
group :development do
gem "rake"
gem "rake-compiler"
gem "rb_sys", "0.9.97"
gem "rb_sys", "0.9.108"
end

group :check do
Expand Down
6 changes: 4 additions & 2 deletions builders/wasm32-unknown-wasip2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ RUN set -eux pipefail; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME

# Install the latest Ruby to use the latest Bundler for cross-building C extension gems.
ADD --keep-git-dir=true https://github.com/ruby/ruby.git /buildruby
ADD https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.1.tar.gz /buildruby.tar.gz
RUN set -eux; \
mkdir /buildruby; \
tar -xf /buildruby.tar.gz -C /buildruby --strip-components=1; \
rm /buildruby.tar.gz; \
cd /buildruby; \
./autogen.sh; \
mkdir -p /opt/ruby; \
./configure --prefix=/opt/ruby --disable-install-doc; \
make -j$(nproc); \
Expand Down
10 changes: 7 additions & 3 deletions lib/ruby_wasm/build/product/crossruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ def do_legacy_extconf(executor, crossruby)
# HACK: extout is required to find config.h
"-e",
%Q($extout=ENV["extout"]="#{crossruby.build_dir}/.ext"),
*(@features.support_component_model? ? [] : [
]
unless @features.support_component_model?
extconf_args.concat([
# HACK: skip have_devel check since ruby is not installed yet
"-e",
"$have_devel = true",
]),
])
end
extconf_args.concat([
# HACK: force static ext build by imitating extmk
"-e",
"$static = true; trace_var(:$static) {|v| $static = true }",
Expand All @@ -115,7 +119,7 @@ def do_legacy_extconf(executor, crossruby)
%Q(require "json"; File.write("#{metadata_json(crossruby)}", JSON.dump({target: $target}))),
"-I#{crossruby.build_dir}",
"--",
]
])
extconf_args << "--disable-component-model" unless @features.support_component_model?
# Clear RUBYOPT to avoid loading unrelated bundle setup
executor.system crossruby.baseruby_path,
Expand Down

0 comments on commit 1998b72

Please sign in to comment.