mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a29871fe2 | ||
|
|
ae403e8ff4 | ||
|
|
3804ad4ff2 | ||
|
|
87ccb7599f | ||
|
|
19b31c7064 | ||
|
|
a1396b7d70 | ||
|
|
5ece9850ad | ||
|
|
6148f408d3 | ||
|
|
699560a00d | ||
|
|
8b5af312bd |
@@ -1,8 +1,6 @@
|
|||||||
name: Update the v1 branch when a release is published
|
name: Update the v1 branch when a release is published
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
permissions:
|
|
||||||
contents: write # for Git to git push
|
|
||||||
types: [published]
|
types: [published]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -10,6 +8,8 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # for git push
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
+23
-10
@@ -17,13 +17,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11, macos-12, windows-2019, windows-2022 ]
|
os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12, 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 ]
|
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:
|
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: mingw }
|
||||||
- { os: windows-2019, ruby: mswin }
|
- { os: windows-2019, ruby: mswin }
|
||||||
- { os: windows-2022, ruby: mingw }
|
- { os: windows-2022, ruby: mingw }
|
||||||
@@ -100,19 +96,36 @@ jobs:
|
|||||||
- run: bundle exec rake --version
|
- run: bundle exec rake --version
|
||||||
- run: bundle exec rake
|
- run: bundle exec rake
|
||||||
|
|
||||||
|
# Ensure the same bundle commands work in bash on Windows
|
||||||
|
- name: bundle install (bash)
|
||||||
|
run: bundle install
|
||||||
|
shell: bash
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
- name: bundle exec rake --version (bash)
|
||||||
|
run: bundle exec rake --version
|
||||||
|
shell: bash
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
- name: bundle exec rake (bash)
|
||||||
|
run: bundle exec rake
|
||||||
|
shell: bash
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
|
||||||
- name: Test `gem github:` in a Gemfile
|
- name: Test `gem github:` in a Gemfile
|
||||||
run: bundle install
|
run: bundle install
|
||||||
env:
|
env:
|
||||||
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile
|
||||||
|
|
||||||
- name: which ruby, rake
|
- name: which ruby, bundle
|
||||||
|
shell: bash
|
||||||
|
run: which -a ruby bundle
|
||||||
|
- name: which rake
|
||||||
|
run: which -a rake
|
||||||
if: "!startsWith(matrix.os, 'windows')"
|
if: "!startsWith(matrix.os, 'windows')"
|
||||||
run: which -a ruby rake
|
- name: where ruby, rake, bundle
|
||||||
- name: where ruby, rake
|
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Continue'
|
$ErrorActionPreference = 'Continue'
|
||||||
$where = 'ruby', 'rake'
|
$where = 'ruby', 'rake', 'bundle'
|
||||||
foreach ($e in $where) {
|
foreach ($e in $where) {
|
||||||
$rslt = where.exe $e 2>&1 | Out-String
|
$rslt = where.exe $e 2>&1 | Out-String
|
||||||
if ($rslt.contains($e)) { echo $rslt.Trim() }
|
if ($rslt.contains($e)) { echo $rslt.Trim() }
|
||||||
@@ -121,7 +134,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
- name: bash test
|
- name: bash test
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo ~
|
run: echo ~ && bundle install
|
||||||
- name: Windows JRuby
|
- name: Windows JRuby
|
||||||
if: startsWith(matrix.os, 'windows') && startsWith(matrix.ruby, 'jruby')
|
if: startsWith(matrix.os, 'windows') && startsWith(matrix.ruby, 'jruby')
|
||||||
run: gem install sassc
|
run: gem install sassc
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
|
|||||||
| Interpreter | Versions |
|
| Interpreter | Versions |
|
||||||
| ----------- | -------- |
|
| ----------- | -------- |
|
||||||
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.2.0-preview1, head, debug, mingw, mswin |
|
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.2.0-preview1, head, debug, mingw, mswin |
|
||||||
| `jruby` | 9.1.17.0 - 9.3.6.0, head |
|
| `jruby` | 9.1.17.0 - 9.3.7.0, head |
|
||||||
| `truffleruby` | 19.3.0 - 22.2.0, head |
|
| `truffleruby` | 19.3.0 - 22.2.0, head |
|
||||||
| `truffleruby+graalvm` | 21.2.0 - 22.2.0, head |
|
| `truffleruby+graalvm` | 21.2.0 - 22.2.0, head |
|
||||||
|
|
||||||
@@ -39,12 +39,10 @@ The action works on these [GitHub-hosted runners](https://help.github.com/en/act
|
|||||||
|
|
||||||
| Operating System | Recommended | Other Supported Versions |
|
| Operating System | Recommended | Other Supported Versions |
|
||||||
| ----------- | -------- | -------- |
|
| ----------- | -------- | -------- |
|
||||||
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04`, `ubuntu-22.04` (beta, only `ruby: 3.1 - head, truffleruby`) |
|
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04`, `ubuntu-22.04` |
|
||||||
| macOS | `macos-latest` (= `macos-11`) | `macos-10.15`, `macos-12` (beta) |
|
| macOS | `macos-latest` (= `macos-11`) | `macos-10.15`, `macos-12` (beta) |
|
||||||
| Windows | `windows-latest` (= `windows-2022`) | `windows-2019` |
|
| Windows | `windows-latest` (= `windows-2022`) | `windows-2019` |
|
||||||
|
|
||||||
On `ubuntu-22.04` (beta), only `ruby: 3.1 - head, truffleruby` 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)
|
The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)
|
||||||
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
|
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
|
||||||
`mingw` and `mswin` builds are generated by [ruby-loco](https://github.com/MSP-Greg/ruby-loco).
|
`mingw` and `mswin` builds are generated by [ruby-loco](https://github.com/MSP-Greg/ruby-loco).
|
||||||
|
|||||||
+8
-2
@@ -72,8 +72,14 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
|
|||||||
|
|
||||||
if (bundlerVersion === 'default') {
|
if (bundlerVersion === 'default') {
|
||||||
if (common.isBundler2dot2Default(engine, rubyVersion)) {
|
if (common.isBundler2dot2Default(engine, rubyVersion)) {
|
||||||
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
if (common.windows && engine === 'ruby' && (common.isStableVersion(rubyVersion) || rubyVersion === 'head')) {
|
||||||
return '2'
|
// https://github.com/ruby/setup-ruby/issues/371
|
||||||
|
console.log(`Installing latest Bundler for ${engine}-${rubyVersion} on Windows because bin/bundle does not work in bash otherwise`)
|
||||||
|
bundlerVersion = 'latest'
|
||||||
|
} else {
|
||||||
|
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
|
||||||
|
return '2'
|
||||||
|
}
|
||||||
} else if (common.hasBundlerDefaultGem(engine, rubyVersion)) {
|
} else if (common.hasBundlerDefaultGem(engine, rubyVersion)) {
|
||||||
// Those Rubies have a old Bundler default gem < 2.2 which does not work well for `gem 'foo', github: 'foo/foo'`:
|
// Those Rubies have a old Bundler default gem < 2.2 which does not work well for `gem 'foo', github: 'foo/foo'`:
|
||||||
// https://github.com/ruby/setup-ruby/issues/358#issuecomment-1195899304
|
// https://github.com/ruby/setup-ruby/issues/358#issuecomment-1195899304
|
||||||
|
|||||||
+2013
-1073
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
"homepage": "https://github.com/ruby/setup-ruby",
|
"homepage": "https://github.com/ruby/setup-ruby",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^2.0.2",
|
"@actions/cache": "^2.0.2",
|
||||||
"@actions/core": "^1.7.0",
|
"@actions/core": "^1.9.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/io": "^1.1.2",
|
"@actions/io": "^1.1.2",
|
||||||
"@actions/tool-cache": "^1.7.2",
|
"@actions/tool-cache": "^1.7.2",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"jruby": [
|
"jruby": [
|
||||||
"9.1.17.0",
|
"9.1.17.0",
|
||||||
"9.2.9.0", "9.2.10.0", "9.2.11.0", "9.2.11.1", "9.2.12.0", "9.2.13.0", "9.2.14.0", "9.2.15.0", "9.2.16.0", "9.2.17.0", "9.2.18.0", "9.2.19.0", "9.2.20.0", "9.2.20.1", "9.2.21.0",
|
"9.2.9.0", "9.2.10.0", "9.2.11.0", "9.2.11.1", "9.2.12.0", "9.2.13.0", "9.2.14.0", "9.2.15.0", "9.2.16.0", "9.2.17.0", "9.2.18.0", "9.2.19.0", "9.2.20.0", "9.2.20.1", "9.2.21.0",
|
||||||
"9.3.0.0", "9.3.1.0", "9.3.2.0", "9.3.3.0", "9.3.4.0", "9.3.6.0",
|
"9.3.0.0", "9.3.1.0", "9.3.2.0", "9.3.3.0", "9.3.4.0", "9.3.6.0", "9.3.7.0",
|
||||||
"head"
|
"head"
|
||||||
],
|
],
|
||||||
"truffleruby": [
|
"truffleruby": [
|
||||||
|
|||||||
@@ -17,13 +17,6 @@ export function getAvailableVersions(platform, engine) {
|
|||||||
throw new Error(`Unsupported platform ${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]
|
return rubyBuilderVersions[engine]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,13 @@
|
|||||||
semver "^6.1.0"
|
semver "^6.1.0"
|
||||||
uuid "^3.3.3"
|
uuid "^3.3.3"
|
||||||
|
|
||||||
"@actions/core@^1.2.6", "@actions/core@^1.7.0":
|
"@actions/core@^1.2.6", "@actions/core@^1.9.1":
|
||||||
version "1.7.0"
|
version "1.9.1"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.7.0.tgz#f179a5a0bf5c1102d89b8cf1712825e763feaee4"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.9.1.tgz#97c0201b1f9856df4f7c3a375cdcdb0c2a2f750b"
|
||||||
integrity sha512-7fPSS7yKOhTpgLMbw7lBLc1QJWvJBBAgyTX2PEhagWcKK8t0H8AKCoPMfnrHqIm5cRYH4QFPqD1/ruhuUE7YcQ==
|
integrity sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/http-client" "^1.0.11"
|
"@actions/http-client" "^2.0.1"
|
||||||
|
uuid "^8.3.2"
|
||||||
|
|
||||||
"@actions/exec@^1.0.0", "@actions/exec@^1.0.1", "@actions/exec@^1.1.1":
|
"@actions/exec@^1.0.0", "@actions/exec@^1.0.1", "@actions/exec@^1.1.1":
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
@@ -39,13 +40,20 @@
|
|||||||
"@actions/core" "^1.2.6"
|
"@actions/core" "^1.2.6"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
"@actions/http-client@^1.0.11", "@actions/http-client@^1.0.8", "@actions/http-client@^1.0.9":
|
"@actions/http-client@^1.0.8", "@actions/http-client@^1.0.9":
|
||||||
version "1.0.11"
|
version "1.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0"
|
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0"
|
||||||
integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==
|
integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==
|
||||||
dependencies:
|
dependencies:
|
||||||
tunnel "0.0.6"
|
tunnel "0.0.6"
|
||||||
|
|
||||||
|
"@actions/http-client@^2.0.1":
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
|
||||||
|
integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==
|
||||||
|
dependencies:
|
||||||
|
tunnel "^0.0.6"
|
||||||
|
|
||||||
"@actions/io@^1.0.1", "@actions/io@^1.1.1", "@actions/io@^1.1.2":
|
"@actions/io@^1.0.1", "@actions/io@^1.1.1", "@actions/io@^1.1.2":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.2.tgz#766ac09674a289ce0f1550ffe0a6eac9261a8ea9"
|
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.2.tgz#766ac09674a289ce0f1550ffe0a6eac9261a8ea9"
|
||||||
|
|||||||
Reference in New Issue
Block a user