|
| 1 | +name: Test Ruby GC Bug — Verify Fix |
| 2 | + |
| 3 | +# Builds Ruby from ioquatix/ruby fix/blocking-operation-wait-exception-safety |
| 4 | +# and runs the io-event test suite. The worker_pool.c logging will show the |
| 5 | +# exception path being exercised; the absence of a crash confirms the fix. |
| 6 | + |
| 7 | +on: [push, pull_request] |
| 8 | + |
| 9 | +jobs: |
| 10 | + verify-fix: |
| 11 | + name: "Verify fix on ruby/ruby fix/blocking-operation-wait-exception-safety" |
| 12 | + runs-on: ubuntu-24.04 |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Install build dependencies |
| 18 | + run: | |
| 19 | + sudo apt-get update -q |
| 20 | + sudo apt-get install -y --no-install-recommends \ |
| 21 | + ruby bison libyaml-dev libgdbm-dev libreadline-dev libncurses5-dev \ |
| 22 | + liburing-dev autoconf automake gcc make binutils |
| 23 | +
|
| 24 | + - name: Clone Ruby (ioquatix/ruby fix/blocking-operation-wait-exception-safety) |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + repository: ioquatix/ruby |
| 28 | + ref: fix/blocking-operation-wait-exception-safety |
| 29 | + path: ruby-src |
| 30 | + |
| 31 | + - name: Build + install Ruby |
| 32 | + working-directory: ruby-src |
| 33 | + run: | |
| 34 | + ./autogen.sh |
| 35 | + ./configure --prefix=$HOME/.rubies/ruby-fix --enable-shared \ |
| 36 | + --disable-install-doc cppflags="-DENABLE_PATH_CHECK=0" |
| 37 | + make -j$(nproc) && make install |
| 38 | + $HOME/.rubies/ruby-fix/bin/ruby --version |
| 39 | +
|
| 40 | + - name: Install gems + build io-event |
| 41 | + run: | |
| 42 | + export PATH=$HOME/.rubies/ruby-fix/bin:$PATH |
| 43 | + gem install bundler --no-document |
| 44 | + bundle install |
| 45 | + bundle exec rake build 2>/dev/null || \ |
| 46 | + (cd ext && ruby extconf.rb && make) |
| 47 | +
|
| 48 | + - name: Run io-event tests (capture worker_pool logs) |
| 49 | + run: | |
| 50 | + export PATH=$HOME/.rubies/ruby-fix/bin:$PATH |
| 51 | + bundle exec bake test 2>&1 | tee /tmp/test-output.txt |
| 52 | + echo "--- worker_pool log lines ---" |
| 53 | + grep '\[worker_pool\]' /tmp/test-output.txt || echo "(no worker_pool log lines)" |
| 54 | +
|
| 55 | + - name: Upload test output |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + if: always() |
| 58 | + with: |
| 59 | + name: test-output |
| 60 | + path: /tmp/test-output.txt |
0 commit comments