mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7439cf424 | ||
|
|
b9675e15ad |
+17
-17
@@ -15,12 +15,12 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
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 ]
|
||||
os: [ ubuntu-18.04, ubuntu-20.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 ]
|
||||
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: '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 }
|
||||
@@ -28,13 +28,13 @@ jobs:
|
||||
- { os: windows-2022, ruby: mswin }
|
||||
- { os: windows-2022, ruby: ucrt }
|
||||
exclude:
|
||||
- { os: windows-2019, ruby: 1.9 }
|
||||
- { os: windows-2019, ruby: '1.9' }
|
||||
- { os: windows-2019, ruby: debug }
|
||||
- { os: windows-2019, ruby: truffleruby }
|
||||
- { os: windows-2019, ruby: truffleruby-head }
|
||||
- { os: windows-2019, ruby: truffleruby+graalvm }
|
||||
- { os: windows-2019, ruby: truffleruby+graalvm-head }
|
||||
- { os: windows-2022, ruby: 1.9 }
|
||||
- { os: windows-2022, ruby: '1.9' }
|
||||
- { os: windows-2022, ruby: debug }
|
||||
- { os: windows-2022, ruby: truffleruby }
|
||||
- { os: windows-2022, ruby: truffleruby-head }
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
rubygems: latest
|
||||
- run: ruby -e "exit(Gem.rubygems_version > Gem::Version.new('3.0.3'))"
|
||||
|
||||
@@ -135,7 +135,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
rubygems: 3.2.3
|
||||
- run: gem --version | grep -F "3.2.3"
|
||||
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 3.1.0
|
||||
ruby-version: '3.1.0'
|
||||
rubygems: 3.2.3
|
||||
- run: gem --version | grep -F "3.3.3"
|
||||
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.2
|
||||
ruby-version: '2.2'
|
||||
rubygems: 2.7.11
|
||||
- run: gem --version | grep -F "2.7.11"
|
||||
- run: bundle --version | grep -F "1.16.6"
|
||||
@@ -169,7 +169,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.2
|
||||
ruby-version: '2.2'
|
||||
bundler: 1.16.6
|
||||
- run: bundle --version | grep -F "1.16.6" # And not 1.17.x from ~> 1
|
||||
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
bundler: 2
|
||||
- run: bundle --version | grep -P "Bundler version 2\.\d+\.\d+"
|
||||
|
||||
@@ -191,7 +191,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
bundler: 2.2
|
||||
- run: bundle --version | grep -P "Bundler version 2\.2\.\d+"
|
||||
|
||||
@@ -202,7 +202,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
bundler: 2.2.3
|
||||
- run: bundle --version | grep -F "Bundler version 2.2.3"
|
||||
|
||||
@@ -215,7 +215,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.7
|
||||
ruby-version: '2.7'
|
||||
bundler: 1
|
||||
bundler-cache: true
|
||||
- run: bundle --version | grep -F "Bundler version 1."
|
||||
@@ -233,7 +233,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '2.6'
|
||||
bundler-cache: true
|
||||
- run: bundle exec rails --version
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ The action works on these [GitHub-hosted runners](https://help.github.com/en/act
|
||||
|
||||
| Operating System | Recommended | Other Supported Versions |
|
||||
| ----------- | -------- | -------- |
|
||||
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04` |
|
||||
| macOS | `macos-latest` (= `macos-10.15`) | `macos-11.0` |
|
||||
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04`, `ubuntu-22.04` (beta, only `ruby: 3.1 - head`) |
|
||||
| macOS | `macos-latest` (= `macos-11`) | `macos-10.15`, `macos-12` (beta) |
|
||||
| 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.
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6 # Not needed with a .ruby-version file
|
||||
ruby-version: '3.0' # Not needed with a .ruby-version file
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- run: bundle exec rake
|
||||
```
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
||||
ruby: [2.6, 2.7, '3.0', 3.1, head, jruby, jruby-head, truffleruby, truffleruby-head]
|
||||
ruby: ['2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- run: bundle exec rake
|
||||
```
|
||||
@@ -129,8 +129,8 @@ and the [condition and expression syntax](https://help.github.com/en/actions/ref
|
||||
### Supported Version Syntax
|
||||
|
||||
* engine-version like `ruby-2.6.5` and `truffleruby-19.3.0`
|
||||
* short version like `2.6`, automatically using the latest release matching that version (`2.6.5`)
|
||||
* version only like `2.6.5`, assumes MRI for the engine
|
||||
* short version like `'2.6'`, automatically using the latest release matching that version (`2.6.10`)
|
||||
* version only like `'2.6.5'`, assumes MRI for the engine
|
||||
* engine only like `truffleruby`, uses the latest stable release of that implementation
|
||||
* `.ruby-version` reads from the project's `.ruby-version` file
|
||||
* `.tool-versions` reads from the project's `.tool-versions` file
|
||||
|
||||
@@ -103,7 +103,8 @@ export const supportedPlatforms = [
|
||||
'ubuntu-20.04',
|
||||
'ubuntu-22.04',
|
||||
'macos-10.15',
|
||||
'macos-11.0',
|
||||
'macos-11',
|
||||
'macos-12',
|
||||
'windows-2019',
|
||||
'windows-2022',
|
||||
]
|
||||
@@ -118,7 +119,11 @@ export function getVirtualEnvironmentName() {
|
||||
|
||||
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
|
||||
if (match) {
|
||||
return `macos-${match[1]}.${match[2] || '0'}`
|
||||
if (match[2]) {
|
||||
return `macos-${match[1]}.${match[2]}`
|
||||
} else {
|
||||
return `macos-${match[1]}`
|
||||
}
|
||||
}
|
||||
|
||||
match = imageOS.match(/^win(\d+)/) // e.g. win19
|
||||
|
||||
+7
-2
@@ -372,7 +372,8 @@ const supportedPlatforms = [
|
||||
'ubuntu-20.04',
|
||||
'ubuntu-22.04',
|
||||
'macos-10.15',
|
||||
'macos-11.0',
|
||||
'macos-11',
|
||||
'macos-12',
|
||||
'windows-2019',
|
||||
'windows-2022',
|
||||
]
|
||||
@@ -387,7 +388,11 @@ function getVirtualEnvironmentName() {
|
||||
|
||||
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
|
||||
if (match) {
|
||||
return `macos-${match[1]}.${match[2] || '0'}`
|
||||
if (match[2]) {
|
||||
return `macos-${match[1]}.${match[2]}`
|
||||
} else {
|
||||
return `macos-${match[1]}`
|
||||
}
|
||||
}
|
||||
|
||||
match = imageOS.match(/^win(\d+)/) // e.g. win19
|
||||
|
||||
Reference in New Issue
Block a user