Compare commits

..
6 Commits
4 changed files with 29 additions and 19 deletions
+10 -5
View File
@@ -3,7 +3,6 @@ on:
pull_request:
push:
branches-ignore:
- master
- v1
tags-ignore:
- '*'
@@ -15,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
# Use various version syntaxes here for testing
# Use various version syntax here for testing
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6.6, 2.7, ruby-head, jruby-9.1, jruby, jruby-head, truffleruby, truffleruby-head ]
include:
- { os: ubuntu, ruby: rubinius }
@@ -29,15 +28,17 @@ jobs:
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: ./
with:
ruby-version: ${{ matrix.ruby }}
- run: ruby -v
- name: build compiler
run: |
ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first"
- name: gcc and ridk version (mingw)
if: startsWith(matrix.os, 'windows')
if: matrix.os == 'windows'
run: |
$abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ')
if ($plat.Contains('mingw')) {
@@ -48,22 +49,25 @@ jobs:
echo 'ridk is unavailable'
}
}
- name: Subprocess test
run: ruby test_subprocess.rb
- name: OpenSSL version
run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'
- name: OpenSSL test
run: ruby -ropen-uri -e 'puts open(%{https://rubygems.org/}) { |f| f.read(1024) }'
- name: C extension test
run: gem install json:2.2.0 --no-document
- run: bundle --version
- run: bundle install
- run: bundle exec rake --version
- name: which ruby, rake
if: startsWith(matrix.os, 'windows') == false
if: matrix.os != 'windows'
run: which -a ruby rake
- name: where ruby, rake
if: startsWith(matrix.os, 'windows')
if: matrix.os == 'windows'
run: |
$ErrorActionPreference = 'Continue'
$where = 'ruby', 'rake'
@@ -74,6 +78,7 @@ jobs:
echo ''
}
lint:
runs-on: ubuntu-latest
steps:
+11 -4
View File
@@ -146,15 +146,22 @@ It is recommended to first get your build working on Ubuntu and macOS before try
* For Ruby < 2.4, the DevKit MSYS tools are installed and prepended to the `Path`.
* JRuby on Windows has a known bug that `bundle exec rake` [fails](https://github.com/ruby/setup-ruby/issues/18).
## Limitations
* This action currently only works with GitHub-hosted runners, not private runners.
## Versioning
It is highly recommended to use `ruby/setup-ruby@v1` for the version of this action.
This will provide the best experience by automatically getting bug fixes, new Ruby versions and new features.
If you instead choose a specific version (v1.2.3) or a commit sha, there will be no automatic bug fixes and
it will be your responsibility to update every time the action no longer works.
Make sure to always use the latest release before reporting an issue on GitHub.
This action follows semantic versioning with a moving `v1` branch.
This follows the [recommendations](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) of GitHub Actions.
## Limitations
* This action currently only works with GitHub-hosted runners, not private runners.
## History
This action used to be at `eregon/use-ruby-action` and was moved to the `ruby` organization.
Generated Vendored
+4 -5
View File
@@ -984,8 +984,10 @@ async function run() {
setupPath(ruby, newPathEntries)
await common.measure('Installing Bundler', async () =>
installBundler(platform, rubyPrefix, engine, version))
if (core.getInput('bundler') !== 'none') {
await common.measure('Installing Bundler', async () =>
installBundler(platform, rubyPrefix, engine, version))
}
core.setOutput('ruby-prefix', rubyPrefix)
} catch (error) {
@@ -1093,9 +1095,6 @@ function readBundledWithFromGemfileLock() {
async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
var bundlerVersion = core.getInput('bundler')
if (bundlerVersion === 'none') {
return
}
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
bundlerVersion = readBundledWithFromGemfileLock()
+4 -5
View File
@@ -26,8 +26,10 @@ export async function run() {
setupPath(ruby, newPathEntries)
await common.measure('Installing Bundler', async () =>
installBundler(platform, rubyPrefix, engine, version))
if (core.getInput('bundler') !== 'none') {
await common.measure('Installing Bundler', async () =>
installBundler(platform, rubyPrefix, engine, version))
}
core.setOutput('ruby-prefix', rubyPrefix)
} catch (error) {
@@ -135,9 +137,6 @@ function readBundledWithFromGemfileLock() {
async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
var bundlerVersion = core.getInput('bundler')
if (bundlerVersion === 'none') {
return
}
if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') {
bundlerVersion = readBundledWithFromGemfileLock()