Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use oxidize-rb/actions/cross-gem@v1 instead of oxidize-rb/cross-gem-action@main #220

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented Jan 16, 2025

https://github.com/oxidize-rb/cross-gem-action has been archived in favor of https://github.com/oxidize-rb/actions/tree/main/cross-gem.

This commit also:

  1. Drops x64-mingw32 from a precompiled build. As https://github.com/rake-compiler/rake-compiler-dock says:

x64-mingw-ucrt should be used for Ruby 3.1 and later on windows. x64-mingw32 should be used for Ruby 3.0 and earlier. This is to match the changed platform of RubyInstaller-3.1.

  1. Use RakeCompilerDock.ruby_cc_version to set RUBY_CC_VERSION so we don't have to worry about which patch versions can build.

  2. Update rb-sys to v0.9.110 to fix build issues with GNU and musl builds. While we're at it, update all Cargo dependencies.

@stanhu stanhu force-pushed the sh-gem-release-port-gem-action branch from 928bd49 to 30d0c58 Compare January 16, 2025 16:46
@stanhu
Copy link
Contributor Author

stanhu commented Jan 16, 2025

I think we need oxidize-rb/rb-sys#493 for this to work.

@stanhu
Copy link
Contributor Author

stanhu commented Jan 31, 2025

Now we need a release of rb-sys for this to work.

…ction@main

https://github.com/oxidize-rb/cross-gem-action has been archived in
favor of https://github.com/oxidize-rb/actions/tree/main/cross-gem.

This commit also:

1. Drops `x64-mingw32` from a precompiled build. As
https://github.com/rake-compiler/rake-compiler-dock says:

> x64-mingw-ucrt should be used for Ruby 3.1 and later on
  windows. x64-mingw32 should be used for Ruby 3.0 and earlier. This
  is to match the changed platform of RubyInstaller-3.1.

2. Use `RakeCompilerDock.ruby_cc_version` to set `RUBY_CC_VERSION`
so we don't have to worry about which patch versions can build.

3. Update rb-sys to v0.9.110 to fix build issues with GNU and musl
builds. While we're at it, update all Cargo dependencies.
@stanhu stanhu force-pushed the sh-gem-release-port-gem-action branch from 30d0c58 to 8ebcf17 Compare February 1, 2025 05:08
@stanhu stanhu marked this pull request as ready for review February 1, 2025 05:08
@stanhu
Copy link
Contributor Author

stanhu commented Feb 1, 2025

@eliias This is finally ready! I tested the build and release workflow: https://github.com/y-crdt/yrb/actions/runs/13085400141


spec.add_development_dependency "base64"
spec.add_development_dependency "rake-compiler", "~> 1.2.1"
spec.add_development_dependency "rake-compiler-dock", "~> 1.9.1"
Copy link
Contributor Author

@stanhu stanhu Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rb_sys now depends on a specific version of rake-compiler-dock, so let's just use that as the hard dependency.

require "rake/testtask"
require "rake/extensiontask"
require "rb_sys"

cross_rubies = %w[3.4.0 3.3.5 3.2.0 3.1.0]
ruby_cc_version = RakeCompilerDock.ruby_cc_version([">= 3.1", "< 3.5"])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rake-compiler-dock now needs exact patch versions, so this method abstracts those details.

@stanhu
Copy link
Contributor Author

stanhu commented Feb 4, 2025

@eliias I think the build and release workflow is broken until this is merged. Latest main: https://github.com/y-crdt/yrb/actions/runs/13114877373

@eliias eliias merged commit fb7250d into y-crdt:main Feb 5, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants