Skip to content

Commit 6b28b1a

Browse files
ci: bypass cross-gem action to pin rb-sys/rb-sys-dock versions
1 parent 0c2e268 commit 6b28b1a

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/build-gems.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,23 @@ jobs:
5656
fi
5757
echo "version=$version" >> "$GITHUB_OUTPUT"
5858
59-
- uses: oxidize-rb/actions/cross-gem@v1
59+
- name: Build native gem with rb-sys-dock
6060
id: cross-gem
61-
with:
62-
platform: ${{ matrix.ruby-platform }}
63-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
64-
tag: ${{ steps.rb-sys.outputs.version }}
61+
env:
62+
PLATFORM: ${{ matrix.ruby-platform }}
63+
RUBY_VERSIONS: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
64+
RB_SYS_VERSION: ${{ steps.rb-sys.outputs.version }}
65+
run: |
66+
gem install rb_sys -v "$RB_SYS_VERSION"
67+
rb-sys-dock --platform "$PLATFORM" --directory . --ruby-versions "$RUBY_VERSIONS" --tag "$RB_SYS_VERSION" --build
68+
69+
gem_path="$(find ./pkg -name "*-${PLATFORM}.gem" | head -n1)"
70+
if [ -z "$gem_path" ]; then
71+
echo "Failed to find built gem for ${PLATFORM}" >&2
72+
ls -la ./pkg || true
73+
exit 1
74+
fi
75+
echo "gem-path=$gem_path" >> "$GITHUB_OUTPUT"
6576
6677
- uses: actions/upload-artifact@v7
6778
with:

0 commit comments

Comments
 (0)