Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions .github/workflows/nokogiri-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@ name: nokogiri patch compatibility
# system-libraries `--use-system-libraries`: the extension is rebuilt
# with the recorded build arguments, and a patch to the
# vendored libxml2, which such a build does not compile, is
# written and not attested: its build reads nothing of the
# patch, and `apply` says so.
# written and incomplete: its build reads nothing of the
# patch, so `apply` exits 1 and says so, and nothing
# attests it.
# The `legacy setting` leg is a precompiled install
# in a project that still carries that Bundler setting from
# the years before precompiled gems: its rebuild must keep
# the libxml2 the gem ships, not link the system's.
# unavailable a precompiled install on a machine with no compiler: the
# patch must fail, name what is missing and change nothing.
# java JRuby loads no C extension: a C record is refused.
# java JRuby installs the `java` platform gem, which runs jars:
# no C extension, no libxml2, nothing to build. It takes of
# a record what is part of that build. The Ruby record is
# applied; the C record's file is written, since the gem
# ships the C sources too, and the patch is in sync and
# attested with the same jars loaded; the libxml2 record
# has no file in that gem, so `apply` exits 0, writes
# nothing and says so, and the install is attested. 9.4 is
# the Ruby 3.1 line, 10.1 the newest (Ruby 4.0).
#
# The `native` legs run on the runner with setup-ruby. The `container` legs
# run the same script inside an official Ruby image, where the gems land in
Expand Down Expand Up @@ -143,8 +152,10 @@ jobs:
- {os: ubuntu-latest, ruby: '3.4', nokogiri: '1.18.10', install: precompiled, system-libxml2: true, args: '--bundle-setting BUNDLE_BUILD__NOKOGIRI=--use-system-libraries', note: legacy setting}
# No compiler on PATH: nothing may change.
- {os: ubuntu-latest, ruby: '3.4', nokogiri: '1.18.10', install: precompiled, build: unavailable, args: '--hide-toolchain', note: no toolchain}
# JRuby: the Ruby-only record applies, a C record is refused.
- {os: ubuntu-latest, ruby: 'jruby-9.4', nokogiri: '1.18.10', install: java, build: refused}
# JRuby: the `java` gem takes the files of a record that are part
# of it, and nothing is built.
- {os: ubuntu-latest, ruby: 'jruby-9.4', nokogiri: '1.18.10', install: java}
- {os: ubuntu-latest, ruby: 'jruby-10.1', nokogiri: '1.18.10', install: java}
# The other platform gems.
- {os: ubuntu-24.04-arm, ruby: '3.4', nokogiri: '1.18.10', install: precompiled, cli: build}
- {os: macos-latest, ruby: '3.4', nokogiri: '1.18.10', install: precompiled, cli: build}
Expand Down Expand Up @@ -197,18 +208,26 @@ jobs:
run: |
chmod +x static-cli/socket-patch
echo "SOCKET_PATCH_BIN=static-cli/socket-patch" >> "$GITHUB_ENV"
- name: Setup Java 21 (JRuby legs)
# JRuby 10 runs on Java 21 or newer, and 9.4 on it as well. With
# this, the leg does not depend on which JDKs the runner image has.
if: startsWith(matrix.ruby, 'jruby')
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: '21'
- name: Setup Ruby (attempt 1)
# setup-ruby downloads the prebuilt Ruby from a github.com release
# asset; a CDN blip there is not a result. Try once more.
id: setup-ruby
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
continue-on-error: true
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ matrix.bundler || 'default' }}
- name: Setup Ruby (attempt 2)
if: steps.setup-ruby.outcome != 'success'
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1.295.0
uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ matrix.bundler || 'default' }}
Expand Down
181 changes: 156 additions & 25 deletions crates/socket-patch-cli/CLI_CONTRACT.md

Large diffs are not rendered by default.

Loading
Loading