Skip to content

Commit 4d8d2a8

Browse files
Use the head version of Ruby as buildruby
1 parent 19fdf2c commit 4d8d2a8

File tree

7 files changed

+11
-29
lines changed

7 files changed

+11
-29
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
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: "3.3"
34+
ruby-version: "head"
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: "3.3"
80+
ruby-version: "head"
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: "3.3"
153+
ruby-version: "head"
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: "3.3"
179+
ruby-version: "head"
180180
bundler-cache: true
181181
- run: ./bin/setup
182182
- run: echo "PREREL_NAME=${{ inputs.prerel_name }}" >> $GITHUB_ENV

bin/setup

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,6 @@ set -vx
66
root="$(cd "$(dirname "$0")/.." && pwd)"
77

88
env BUNDLE_GEMFILE="$root/Gemfile" bundle install
9-
for gemfile in $root/packages/npm-packages/*/Gemfile; do
10-
# Skip ruby-head-wasm-wasi's Gemfile because it does not need to be installed here
11-
if [[ "$gemfile" == *"/ruby-head-wasm-wasi/Gemfile" ]]; then
12-
continue
13-
fi
14-
15-
# FIXME: This is a workaround for the following issue:
16-
# 1. `bundle install` does not support auto-self-upgrade for pre-release bundler versions suffixed with ".dev"
17-
# 2. ruby-head-wasm-wasi's component build depends on 2.6.0.dev, which added --target-rbconfig support
18-
# 3. If the "bundle" command here is earlier than 2.6.0.dev, "bundle install" does *not* self-upgrade to
19-
# the specified pre-release version, and it overwrites the Gemfile.lock with the earlier command version.
20-
# 4. Overwritten Gemfile.lock with the earlier bundler version causes auto-self-downgrade when running
21-
# "bundle install --target-rbconfig" inside "rbwasm build" command, then it fails because the earlier
22-
# bundler version does not support --target-rbconfig.
23-
#
24-
# Thus, we temporarily discard the Gemfile.lock changes here to prevent the auto-self-downgrade issue.
25-
# This workaround should be removed once we drop static Ruby builds from ruby-head-wasm-wasi or
26-
# a stable bundler version is released with --target-rbconfig support.
27-
cp "$gemfile.lock" "$gemfile.lock.orig"
28-
env BUNDLE_GEMFILE="$gemfile" bundle install
29-
mv "$gemfile.lock.orig" "$gemfile.lock"
30-
done
319

3210
# Build vendored jco if Rust toolchain is available and submodule is checked out
3311
if command -v rustc && [ -f vendor/jco/package.json ]; then
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.tgz
2+
/tmp
23
/bundle
4+
/vendor

packages/npm-packages/ruby-3.2-wasm-wasi/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ DEPENDENCIES
2626
test-unit
2727

2828
BUNDLED WITH
29-
2.5.9
29+
2.6.0.dev
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.tgz
2+
/tmp
23
/bundle
4+
/vendor

packages/npm-packages/ruby-3.3-wasm-wasi/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ DEPENDENCIES
2626
test-unit
2727

2828
BUNDLED WITH
29-
2.5.9
29+
2.6.0.dev

packages/npm-packages/ruby-head-wasm-wasi/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GEM
1313

1414
PLATFORMS
1515
ruby
16-
wasm32-wasi
16+
x86_64-linux
1717

1818
DEPENDENCIES
1919
js (= 2.6.2.dev)

0 commit comments

Comments
 (0)