Compare commits

..
9 Commits
5 changed files with 22 additions and 7 deletions
+5
View File
@@ -60,6 +60,10 @@ jobs:
echo 'ridk is unavailable'
}
}
- name: RbConfig::CONFIG
run: ruby -rrbconfig -rpp -e 'pp RbConfig::CONFIG'
- name: RbConfig::MAKEFILE_CONFIG
run: ruby -rrbconfig -rpp -e 'pp RbConfig::MAKEFILE_CONFIG'
- name: Subprocess test
run: ruby test_subprocess.rb
@@ -71,6 +75,7 @@ jobs:
- name: C extension test
run: gem install json:2.2.0 --no-document
- run: bundle --version
# This step is redundant with `bundler-cache: true` but is there to check a redundant `bundle install` still works
- run: bundle install
- run: bundle exec rake --version
+5 -1
View File
@@ -66,6 +66,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle install
- run: bundle exec rake
```
@@ -91,6 +92,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle install
- run: bundle exec rake
```
@@ -131,12 +133,14 @@ This action provides a way to automatically run `bundle install` and cache the r
bundler-cache: true
```
Note that any step doing `bundle install` (for the root `Gemfile`) or `gem install bundler` can be removed with `bundler-cache: true`.
This caching speeds up installing gems significantly and avoids too many requests to RubyGems.org.
It needs a `Gemfile` (or `$BUNDLE_GEMFILE` or `gems.rb`) under the [`working-directory`](#working-directory).
If there is a `Gemfile.lock` (or `$BUNDLE_GEMFILE.lock` or `gems.locked`), `bundle config --local deployment true` is used.
To perform caching, this action will use `bundle config --local path vendor/bundle`.
Therefore, the Bundler `path` should not be changed in your workflow for the cache to work.
Therefore, the Bundler `path` should not be changed in your workflow for the cache to work (no `bundle config path`).
### Caching `bundle install` manually
Generated Vendored
+2
View File
@@ -52860,6 +52860,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
const os = __webpack_require__(87)
const path = __webpack_require__(622)
const core = __webpack_require__(186)
const exec = __webpack_require__(514)
const io = __webpack_require__(436)
const tc = __webpack_require__(188)
@@ -52886,6 +52887,7 @@ async function downloadAndExtract(platform, engine, version) {
// Set the PATH now, so the MSYS2 'tar' is in Path on Windows
if (engine === 'rubinius') {
core.warning('Rubinius builds will no longer be provided, see https://github.com/ruby/setup-ruby/issues/101')
common.setupPath([path.join(rubyPrefix, 'bin'), path.join(rubyPrefix, 'gems', 'bin')])
} else {
common.setupPath([path.join(rubyPrefix, 'bin')])
+2
View File
@@ -1,5 +1,6 @@
const os = require('os')
const path = require('path')
const core = require('@actions/core')
const exec = require('@actions/exec')
const io = require('@actions/io')
const tc = require('@actions/tool-cache')
@@ -26,6 +27,7 @@ async function downloadAndExtract(platform, engine, version) {
// Set the PATH now, so the MSYS2 'tar' is in Path on Windows
if (engine === 'rubinius') {
core.warning('Rubinius builds will no longer be provided, see https://github.com/ruby/setup-ruby/issues/101')
common.setupPath([path.join(rubyPrefix, 'bin'), path.join(rubyPrefix, 'gems', 'bin')])
} else {
common.setupPath([path.join(rubyPrefix, 'bin')])
+8 -6
View File
@@ -3,14 +3,16 @@ versions = eval hash
by_minor = versions[:ruby].group_by { |v| v[/^\d\.\d/] }
p by_minor['2.1']
p by_minor['2.2']
p by_minor['2.3']
(4..7).each do |minor|
(1..7).each do |minor|
p by_minor["2.#{minor}"].map { |v| "ruby-#{v}" }
end
puts
p (versions[:truffleruby] - %w[head]).map { |v| "truffleruby-#{v}" }
puts
p (versions[:jruby] - %w[head]).map { |v| "jruby-#{v}" }
p (versions[:truffleruby] - %w[head]).map { |v| "truffleruby-#{v}" }
(versions[:jruby] - %w[head]).each do |v|
puts "- { os: windows-latest, jruby-version: #{v}, ruby: jruby-#{v} }"
end