Compare commits

...
6 Commits
Author SHA1 Message Date
Benoit Daloze 57a3395c80 Support some Rubies on ubuntu-22.04 2022-05-15 13:05:40 +02:00
Benoit Daloze 296bf7f67a Use an explicit list of supported platforms for nicer error messages 2022-05-15 12:21:30 +02:00
Yutaka Kamei e92b7971f0 Update Node.js from v12 to v16
According to the release policy of Node.js,
Node.js v12 reached EOL (end-of-life).

https://nodejs.org/en/about/releases/

I think ruby/setup-ruby is ready to update Node.js to v16
because GitHub Actions runners support v16.

https://github.com/actions/runner/issues/772
2022-05-10 11:19:53 +02:00
Hiroshi SHIBATA b2e1b33839 Merge pull request #329 from jwillemsen/patch-1
Updated README.md
2022-05-07 16:47:06 +09:00
Johnny Willemsen 645077fe5e Updated README.md
windows-latest is now windows-2022
2022-05-07 09:02:14 +02:00
Benoit Daloze 301d3e0984 Make it clear what is supported 2022-05-04 18:11:45 +02:00
9 changed files with 65 additions and 8 deletions
+4
View File
@@ -18,6 +18,10 @@ jobs:
os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0, windows-2019, windows-2022 ]
ruby: [ 1.9, '2.0', 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, ruby-head, jruby, jruby-head, truffleruby, truffleruby-head, truffleruby+graalvm, truffleruby+graalvm-head ]
include:
- { os: ubuntu-22.04, ruby: 3.1.0 }
- { os: ubuntu-22.04, ruby: 3.1 }
- { os: ubuntu-22.04, ruby: 3.2.0-preview1 }
- { os: ubuntu-22.04, ruby: ruby-head }
- { os: windows-2019, ruby: mingw }
- { os: windows-2019, ruby: mswin }
- { os: windows-2022, ruby: mingw }
+1 -1
View File
@@ -1,2 +1,2 @@
nodejs 12.0.0
nodejs 16.0.0
ruby 2.7.0
+4 -2
View File
@@ -35,13 +35,15 @@ which means Ruby ≤ 2.4 is unmaintained and considered insecure.
### Supported Platforms
The action works for all [GitHub-hosted runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners).
The action works on these [GitHub-hosted runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners) virtual environments. Virtual environments not listed below are unsupported.
| Operating System | Recommended | Other Supported Versions |
| ----------- | -------- | -------- |
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04` |
| macOS | `macos-latest` (= `macos-10.15`) | `macos-11.0` |
| Windows | `windows-latest` (= `windows-2019`) | `windows-2022` |
| Windows | `windows-latest` (= `windows-2022`) | `windows-2019` |
On `ubuntu-22.04` (beta), only `ruby: 3.1 - head` are supported, due to Ubuntu 22.04 only supporting OpenSSL 3.
The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
+1 -1
View File
@@ -32,5 +32,5 @@ outputs:
ruby-prefix:
description: 'The prefix of the installed ruby'
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'
+10
View File
@@ -98,6 +98,16 @@ function getImageOS() {
return imageOS
}
export const supportedPlatforms = [
'ubuntu-18.04',
'ubuntu-20.04',
'ubuntu-22.04',
'macos-10.15',
'macos-11.0',
'windows-2019',
'windows-2022',
]
export function getVirtualEnvironmentName() {
const imageOS = getImageOS()
Generated Vendored
+28 -2
View File
@@ -259,6 +259,7 @@ __nccwpck_require__.r(__webpack_exports__);
/* harmony export */ "isBundler2Default": () => (/* binding */ isBundler2Default),
/* harmony export */ "floatVersion": () => (/* binding */ floatVersion),
/* harmony export */ "hashFile": () => (/* binding */ hashFile),
/* harmony export */ "supportedPlatforms": () => (/* binding */ supportedPlatforms),
/* harmony export */ "getVirtualEnvironmentName": () => (/* binding */ getVirtualEnvironmentName),
/* harmony export */ "shouldUseToolCache": () => (/* binding */ shouldUseToolCache),
/* harmony export */ "getToolCacheRubyPrefix": () => (/* binding */ getToolCacheRubyPrefix),
@@ -366,6 +367,16 @@ function getImageOS() {
return imageOS
}
const supportedPlatforms = [
'ubuntu-18.04',
'ubuntu-20.04',
'ubuntu-22.04',
'macos-10.15',
'macos-11.0',
'windows-2019',
'windows-2022',
]
function getVirtualEnvironmentName() {
const imageOS = getImageOS()
@@ -59565,6 +59576,17 @@ const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
const windows = common.windows
function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (platform === 'ubuntu-22.04') {
const rubyVersions = rubyBuilderVersions['ruby']
return {
ruby: rubyVersions.slice(rubyVersions.indexOf('3.1.0')),
}[engine]
}
return rubyBuilderVersions[engine]
}
@@ -59747,6 +59769,10 @@ const msysPathEntries = [`${msys1}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys1}\\
const virtualEnv = common.getVirtualEnvironmentName()
function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions)
} else {
@@ -60315,7 +60341,7 @@ async function setupRuby(options = {}) {
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
let installer
if (platform.startsWith('windows-') && engine !== 'jruby') {
if (platform.startsWith('windows-') && engine === 'ruby') {
installer = __nccwpck_require__(3216)
} else {
installer = __nccwpck_require__(9974)
@@ -60424,7 +60450,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform}
available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}
Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1
File an issue at https://github.com/ruby/setup-ruby/issues if would like support for a new version`)
File an issue at https://github.com/ruby/setup-ruby/issues if you would like support for a new version`)
}
}
+2 -2
View File
@@ -42,7 +42,7 @@ export async function setupRuby(options = {}) {
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
let installer
if (platform.startsWith('windows-') && engine !== 'jruby') {
if (platform.startsWith('windows-') && engine === 'ruby') {
installer = require('./windows')
} else {
installer = require('./ruby-builder')
@@ -151,7 +151,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform}
available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}
Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1
File an issue at https://github.com/ruby/setup-ruby/issues if would like support for a new version`)
File an issue at https://github.com/ruby/setup-ruby/issues if you would like support for a new version`)
}
}
+11
View File
@@ -13,6 +13,17 @@ const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
const windows = common.windows
export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (platform === 'ubuntu-22.04') {
const rubyVersions = rubyBuilderVersions['ruby']
return {
ruby: rubyVersions.slice(rubyVersions.indexOf('3.1.0')),
}[engine]
}
return rubyBuilderVersions[engine]
}
+4
View File
@@ -25,6 +25,10 @@ const msysPathEntries = [`${msys1}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys1}\\
const virtualEnv = common.getVirtualEnvironmentName()
export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions)
} else {