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

No "available interpreter-os association" is visible on the action? #650

Closed
stdedos opened this issue Oct 1, 2024 · 3 comments · Fixed by #651
Closed

No "available interpreter-os association" is visible on the action? #650

stdedos opened this issue Oct 1, 2024 · 3 comments · Fixed by #651

Comments

@stdedos
Copy link
Contributor

stdedos commented Oct 1, 2024

i.e. on https://github.com/ruby/setup-ruby/blob/f321cf5a4d1533575411f8752cf25b86478b0442/ruby-builder-versions.json I don't see which interpreter is available on which OS.

e.g. even though truffleruby+graalvm-21 supposedly exists, it does not work in my action (https://github.com/stdedos/interception/actions/runs/11123894333/job/30908313355)

@eregon
Copy link
Member

eregon commented Oct 1, 2024

In general it's every version is available on all platforms on which it can be built.
The full list is at https://github.com/ruby/ruby-builder/releases/tag/toolcache FWIW.
There are some known version-platform combinations which do not work:

setup-ruby/index.js

Lines 173 to 195 in c04af2b

// Well known version-platform combinations which do not work:
if (engine === 'ruby' && platform.startsWith('macos') && os.arch() === 'arm64' && common.floatVersion(version) < 2.6) {
throw new Error(`CRuby < 2.6 does not support macos-arm64.
Either use a newer Ruby version or use a macOS image running on amd64, e.g., macos-13 or macos-12.
Note that GitHub changed the meaning of macos-latest from macos-12 (amd64) to macos-14 (arm64):
https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/
If you are using a matrix of Ruby versions, a good solution is to run only < 2.6 on amd64, like so:
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
os: [ ubuntu-latest, macos-latest ]
# CRuby < 2.6 does not support macos-arm64, so test those on amd64 instead
exclude:
- { os: macos-latest, ruby: '2.4' }
- { os: macos-latest, ruby: '2.5' }
include:
- { os: macos-13, ruby: '2.4' }
- { os: macos-13, ruby: '2.5' }
But of course you should consider dropping support for these long-EOL Rubies, which cannot even be built on recent macOS machines.`)
} else if (engine === 'truffleruby' && platform.startsWith('windows')) {
throw new Error('TruffleRuby does not currently support Windows.')
}

Regarding truffleruby+graalvm-21 that's just really old and I didn't build it on newer runners.
I would suggest to only test the latest release of truffleruby (with just ruby-version: truffleruby).
truffleruby+graalvm is basically redundant in CI (unless you need interop with Java or other languages).

Maintaining a matrix would be too high overhead.

@eregon eregon closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
@stdedos
Copy link
Contributor Author

stdedos commented Oct 1, 2024

The full list is at ruby/ruby-builder@toolcache (release) FWIW.

That is amazing already 😁

Would you consider mentioning it here?

setup-ruby/README.md

Lines 39 to 57 in c04af2b

### Supported Platforms
The action works on these [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) images. Runner images not listed below are not supported yet. `$OS-latest` just alias to one of these images.
| Operating System | Supported |
| ---------------- | --------- |
| Ubuntu | `ubuntu-20.04`, `ubuntu-22.04`, `ubuntu-24.04` |
| macOS | `macos-12`, `macos-13`, `macos-14` |
| Windows | `windows-2019`, `windows-2022` |
The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
The `mingw`, `ucrt` and `mswin` builds are generated by [ruby-loco](https://github.com/MSP-Greg/ruby-loco).
`ruby-head` is generated by [ruby-dev-builder](https://github.com/ruby/ruby-dev-builder),
`jruby-head` is generated by [jruby-dev-builder](https://github.com/ruby/jruby-dev-builder),
`truffleruby-head` is generated by [truffleruby-dev-builder](https://github.com/ruby/truffleruby-dev-builder)
and `truffleruby+graalvm` is generated by [graalvm-ce-dev-builds](https://github.com/graalvm/graalvm-ce-dev-builds).
The full list of available Ruby versions can be seen in [ruby-builder-versions.json](ruby-builder-versions.json)
for Ubuntu and macOS and in [windows-versions.json](windows-versions.json) for Windows.

The combinations of the available versions and runners can be seen here: https://github.com/ruby/ruby-builder/releases/tag/toolcache

(tl;dr that's what I'm asking here)

@eregon
Copy link
Member

eregon commented Oct 1, 2024

Ah yes, sure, PR welcome

@eregon eregon reopened this Oct 1, 2024
stdedos added a commit to stdedos/setup-ruby that referenced this issue Oct 2, 2024
…d runners

Fixes ruby#650

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
eregon pushed a commit to stdedos/setup-ruby that referenced this issue Oct 2, 2024
…d runners

Fixes ruby#650

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
@eregon eregon closed this as completed in 79c01b8 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants