Skip to content

Commit 1998b72

Browse files
Merge pull request #569 from ruby/katei/fix-ci
Use Ruby 3.4.1 in CI instead of master
2 parents 218332f + ca5547f commit 1998b72

File tree

6 files changed

+31
-27
lines changed

6 files changed

+31
-27
lines changed

.github/workflows/build-gems.yml

+11-13
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,18 @@ jobs:
3333
steps:
3434
- uses: actions/checkout@v4
3535

36-
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
36+
- uses: ruby/setup-ruby@v1
3737
with:
38-
ruby-version: "3.3"
39-
bundler-cache: true
40-
cargo-cache: true
41-
cargo-vendor: true
42-
cache-version: v2-${{ matrix.ruby-platform }}
38+
ruby-version: "3.4"
4339

44-
- name: Set vars
45-
id: vars
46-
run: |
47-
echo "rb-sys-version=$(bundle exec ruby -rrb_sys -e 'puts RbSys::VERSION')" >> $GITHUB_OUTPUT
48-
- uses: oxidize-rb/cross-gem-action@main
40+
- uses: oxidize-rb/actions/cross-gem@v1
41+
id: cross-gem
4942
with:
50-
version: ${{ steps.vars.outputs.rb-sys-version }}
5143
platform: ${{ matrix.ruby-platform }}
52-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
44+
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: cross-gem-${{ matrix.ruby-platform }}
49+
path: ${{ steps.cross-gem.outputs.gem-path }}
50+
if-no-files-found: error

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
fetch-depth: 0
3232
- uses: ruby/setup-ruby@v1
3333
with:
34-
ruby-version: "head"
34+
ruby-version: "3.4.1"
3535
bundler-cache: true
3636
- run: ./bin/setup
3737
- run: bundle exec rake check:type
@@ -77,7 +77,7 @@ jobs:
7777
- uses: actions/checkout@v4
7878
- uses: ruby/setup-ruby@v1
7979
with:
80-
ruby-version: "head"
80+
ruby-version: "3.4.1"
8181
bundler-cache: true
8282
- run: ./bin/setup
8383
- run: rake ci:pin_build_manifest
@@ -150,7 +150,7 @@ jobs:
150150
- uses: ruby/setup-ruby@v1
151151
if: ${{ matrix.entry.test != '' }}
152152
with:
153-
ruby-version: "head"
153+
ruby-version: "3.4.1"
154154
bundler-cache: false
155155
- name: rake ${{ matrix.entry.test }}
156156
run: |
@@ -176,7 +176,7 @@ jobs:
176176
registry-url: https://registry.npmjs.org/
177177
- uses: ruby/setup-ruby@v1
178178
with:
179-
ruby-version: "head"
179+
ruby-version: "3.4.1"
180180
bundler-cache: true
181181
- run: ./bin/setup
182182
- run: echo "PREREL_NAME=${{ inputs.prerel_name }}" >> $GITHUB_ENV

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gemspec
77
group :development do
88
gem "rake"
99
gem "rake-compiler"
10-
gem "rb_sys", "0.9.97"
10+
gem "rb_sys", "0.9.108"
1111
end
1212

1313
group :check do

builders/wasm32-unknown-wasip2/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ RUN set -eux pipefail; \
3535
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
3636

3737
# Install the latest Ruby to use the latest Bundler for cross-building C extension gems.
38-
ADD --keep-git-dir=true https://github.com/ruby/ruby.git /buildruby
38+
ADD https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.1.tar.gz /buildruby.tar.gz
3939
RUN set -eux; \
40+
mkdir /buildruby; \
41+
tar -xf /buildruby.tar.gz -C /buildruby --strip-components=1; \
42+
rm /buildruby.tar.gz; \
4043
cd /buildruby; \
41-
./autogen.sh; \
4244
mkdir -p /opt/ruby; \
4345
./configure --prefix=/opt/ruby --disable-install-doc; \
4446
make -j$(nproc); \

lib/ruby_wasm/build/product/crossruby.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,15 @@ def do_legacy_extconf(executor, crossruby)
9494
# HACK: extout is required to find config.h
9595
"-e",
9696
%Q($extout=ENV["extout"]="#{crossruby.build_dir}/.ext"),
97-
*(@features.support_component_model? ? [] : [
97+
]
98+
unless @features.support_component_model?
99+
extconf_args.concat([
98100
# HACK: skip have_devel check since ruby is not installed yet
99101
"-e",
100102
"$have_devel = true",
101-
]),
103+
])
104+
end
105+
extconf_args.concat([
102106
# HACK: force static ext build by imitating extmk
103107
"-e",
104108
"$static = true; trace_var(:$static) {|v| $static = true }",
@@ -115,7 +119,7 @@ def do_legacy_extconf(executor, crossruby)
115119
%Q(require "json"; File.write("#{metadata_json(crossruby)}", JSON.dump({target: $target}))),
116120
"-I#{crossruby.build_dir}",
117121
"--",
118-
]
122+
])
119123
extconf_args << "--disable-component-model" unless @features.support_component_model?
120124
# Clear RUBYOPT to avoid loading unrelated bundle setup
121125
executor.system crossruby.baseruby_path,

0 commit comments

Comments
 (0)