mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7da380d64e | ||
|
|
5f2df8a190 |
@@ -16,8 +16,6 @@ jobs:
|
|||||||
# Use various version syntaxes here for testing
|
# Use various version syntaxes here for testing
|
||||||
ruby: [ .ruby-version, 2.3, ruby-2.4, 2.5, ruby-2.6.5, 2.7.0, jruby, truffleruby ]
|
ruby: [ .ruby-version, 2.3, ruby-2.4, 2.5, ruby-2.6.5, 2.7.0, jruby, truffleruby ]
|
||||||
exclude:
|
exclude:
|
||||||
- os: windows-latest
|
|
||||||
ruby: 2.3
|
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
ruby: jruby
|
ruby: jruby
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
@@ -30,9 +28,10 @@ jobs:
|
|||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
- run: ruby --version
|
- run: ruby --version
|
||||||
- run: ridk version
|
- run: ridk version
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, '2.3')
|
||||||
- name: OpenSSL version
|
- name: OpenSSL version
|
||||||
run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'
|
run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
- name: OpenSSL test
|
- name: OpenSSL test
|
||||||
run: ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }'
|
run: ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }'
|
||||||
- name: C extension test
|
- name: C extension test
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
|
|||||||
| JRuby | 9.2.9.0 |
|
| JRuby | 9.2.9.0 |
|
||||||
| TruffleRuby | 19.3.0, 19.3.1 |
|
| TruffleRuby | 19.3.0, 19.3.1 |
|
||||||
|
|
||||||
See [versions.json](https://github.com/eregon/ruby-install-builder/blob/metadata/versions.json)
|
|
||||||
for the always up-to-date list of available Ruby versions.
|
|
||||||
|
|
||||||
Note that Ruby 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life,
|
Note that Ruby 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life,
|
||||||
which means Ruby 2.3 is unmaintained and considered insecure.
|
which means Ruby 2.3 is unmaintained and considered insecure.
|
||||||
On Windows, Ruby 2.4 uses OpenSSL 1.0.2, which is no longer maintained.
|
On Windows, Ruby 2.4 uses OpenSSL 1.0.2, which is no longer maintained.
|
||||||
@@ -32,10 +29,12 @@ The action works for all [GitHub-hosted runners](https://help.github.com/en/acti
|
|||||||
| macOS | `macos-latest` |
|
| macOS | `macos-latest` |
|
||||||
| Windows | `windows-latest` |
|
| Windows | `windows-latest` |
|
||||||
|
|
||||||
Ruby 2.3, JRuby and TruffleRuby are not yet supported on `windows-latest`.
|
JRuby and TruffleRuby are not yet supported on `windows-latest`.
|
||||||
|
|
||||||
The prebuilt rubies are generated by [eregon/ruby-install-builder](https://github.com/eregon/ruby-install-builder)
|
The prebuilt rubies are generated by [eregon/ruby-install-builder](https://github.com/eregon/ruby-install-builder)
|
||||||
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
|
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
|
||||||
|
The full list of available Ruby versions can be seen at [versions.json](https://github.com/eregon/ruby-install-builder/blob/metadata/versions.json)
|
||||||
|
for Ubuntu and macOS and at [ruby-installer-versions.js](https://github.com/eregon/use-ruby-action/blob/master/ruby-installer-versions.js) for Windows.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -5682,6 +5682,9 @@ function _evaluateVersions(versions, versionSpec) {
|
|||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "versions", function() { return versions; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "versions", function() { return versions; });
|
||||||
const versions = {
|
const versions = {
|
||||||
|
"2.3.0": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.0-x64-mingw32.7z",
|
||||||
|
"2.3.1": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.1-x64-mingw32.7z",
|
||||||
|
"2.3.3": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z",
|
||||||
"2.4.1": "https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-2/rubyinstaller-2.4.1-2-x64.7z",
|
"2.4.1": "https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-2/rubyinstaller-2.4.1-2-x64.7z",
|
||||||
"2.4.2": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.2-2/rubyinstaller-2.4.2-2-x64.7z",
|
"2.4.2": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.2-2/rubyinstaller-2.4.2-2-x64.7z",
|
||||||
"2.4.3": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.3-2/rubyinstaller-2.4.3-2-x64.7z",
|
"2.4.3": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.3-2/rubyinstaller-2.4.3-2-x64.7z",
|
||||||
@@ -7794,10 +7797,14 @@ async function install(platform, ruby) {
|
|||||||
await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`)
|
await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`)
|
||||||
const rubyPrefix = `C:\\${base}`
|
const rubyPrefix = `C:\\${base}`
|
||||||
|
|
||||||
const msys2 = await linkMSYS2()
|
const [hostedRuby, msys2] = await linkMSYS2()
|
||||||
const newPath = setupPath(msys2, rubyPrefix)
|
const newPath = setupPath(msys2, rubyPrefix)
|
||||||
core.exportVariable('PATH', newPath)
|
core.exportVariable('PATH', newPath)
|
||||||
|
|
||||||
|
if (version.startsWith('2.3')) {
|
||||||
|
core.exportVariable('SSL_CERT_FILE', `${hostedRuby}\\ssl\\cert.pem`)
|
||||||
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(`${rubyPrefix}\\bin\\bundle.cmd`)) {
|
if (!fs.existsSync(`${rubyPrefix}\\bin\\bundle.cmd`)) {
|
||||||
await exec.exec(`${rubyPrefix}\\bin\\gem install bundler -v "~> 1" --no-document`)
|
await exec.exec(`${rubyPrefix}\\bin\\gem install bundler -v "~> 1" --no-document`)
|
||||||
}
|
}
|
||||||
@@ -7817,7 +7824,7 @@ async function linkMSYS2() {
|
|||||||
const hostedMSYS2 = `${latestHostedRuby}\\msys64`
|
const hostedMSYS2 = `${latestHostedRuby}\\msys64`
|
||||||
const msys2 = 'C:\\msys64'
|
const msys2 = 'C:\\msys64'
|
||||||
await exec.exec(`cmd /c mklink /D ${msys2} ${hostedMSYS2}`)
|
await exec.exec(`cmd /c mklink /D ${msys2} ${hostedMSYS2}`)
|
||||||
return msys2
|
return [latestHostedRuby, msys2]
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupPath(msys2, rubyPrefix) {
|
function setupPath(msys2, rubyPrefix) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ versions = entries.select { |entry|
|
|||||||
}.sort_by { |version, entry|
|
}.sort_by { |version, entry|
|
||||||
version
|
version
|
||||||
}.select { |version, entry|
|
}.select { |version, entry|
|
||||||
version >= "2.4"
|
version >= "2.3"
|
||||||
}.map { |version, entry|
|
}.map { |version, entry|
|
||||||
[version, entry[:href]]
|
[version, entry[:href]]
|
||||||
}.to_h
|
}.to_h
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
export const versions = {
|
export const versions = {
|
||||||
|
"2.3.0": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.0-x64-mingw32.7z",
|
||||||
|
"2.3.1": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.1-x64-mingw32.7z",
|
||||||
|
"2.3.3": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z",
|
||||||
"2.4.1": "https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-2/rubyinstaller-2.4.1-2-x64.7z",
|
"2.4.1": "https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-2/rubyinstaller-2.4.1-2-x64.7z",
|
||||||
"2.4.2": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.2-2/rubyinstaller-2.4.2-2-x64.7z",
|
"2.4.2": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.2-2/rubyinstaller-2.4.2-2-x64.7z",
|
||||||
"2.4.3": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.3-2/rubyinstaller-2.4.3-2-x64.7z",
|
"2.4.3": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.3-2/rubyinstaller-2.4.3-2-x64.7z",
|
||||||
|
|||||||
+6
-2
@@ -29,10 +29,14 @@ export async function install(platform, ruby) {
|
|||||||
await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`)
|
await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`)
|
||||||
const rubyPrefix = `C:\\${base}`
|
const rubyPrefix = `C:\\${base}`
|
||||||
|
|
||||||
const msys2 = await linkMSYS2()
|
const [hostedRuby, msys2] = await linkMSYS2()
|
||||||
const newPath = setupPath(msys2, rubyPrefix)
|
const newPath = setupPath(msys2, rubyPrefix)
|
||||||
core.exportVariable('PATH', newPath)
|
core.exportVariable('PATH', newPath)
|
||||||
|
|
||||||
|
if (version.startsWith('2.3')) {
|
||||||
|
core.exportVariable('SSL_CERT_FILE', `${hostedRuby}\\ssl\\cert.pem`)
|
||||||
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(`${rubyPrefix}\\bin\\bundle.cmd`)) {
|
if (!fs.existsSync(`${rubyPrefix}\\bin\\bundle.cmd`)) {
|
||||||
await exec.exec(`${rubyPrefix}\\bin\\gem install bundler -v "~> 1" --no-document`)
|
await exec.exec(`${rubyPrefix}\\bin\\gem install bundler -v "~> 1" --no-document`)
|
||||||
}
|
}
|
||||||
@@ -52,7 +56,7 @@ async function linkMSYS2() {
|
|||||||
const hostedMSYS2 = `${latestHostedRuby}\\msys64`
|
const hostedMSYS2 = `${latestHostedRuby}\\msys64`
|
||||||
const msys2 = 'C:\\msys64'
|
const msys2 = 'C:\\msys64'
|
||||||
await exec.exec(`cmd /c mklink /D ${msys2} ${hostedMSYS2}`)
|
await exec.exec(`cmd /c mklink /D ${msys2} ${hostedMSYS2}`)
|
||||||
return msys2
|
return [latestHostedRuby, msys2]
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupPath(msys2, rubyPrefix) {
|
function setupPath(msys2, rubyPrefix) {
|
||||||
|
|||||||
Reference in New Issue
Block a user