From 689f94552b57cf6a8e6aa44b0c9ed93bd7a9bbf5 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 25 Jan 2020 16:54:03 +0100 Subject: [PATCH] Add support for Rubinius * Only works on ubuntu-latest. --- .github/workflows/test.yml | 8 +++++++- dist/index.js | 5 +++++ ruby-install-builder.js | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31d6de6..53e2088 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,16 @@ jobs: matrix: os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ] # 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, rubinius ] exclude: - os: windows-latest ruby: truffleruby + - os: ubuntu-16.04 + ruby: rubinius + - os: macos-latest + ruby: rubinius + - os: windows-latest + ruby: rubinius runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/dist/index.js b/dist/index.js index 6010abf..9cb0a9a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4867,7 +4867,12 @@ async function getAvailableVersions(engine) { async function install(platform, ruby) { const rubyPrefix = await downloadAndExtract(platform, ruby) + core.addPath(path.join(rubyPrefix, 'bin')) + if (ruby.startsWith('rubinius')) { + core.addPath(path.join(rubyPrefix, 'gems', 'bin')) + } + return rubyPrefix } diff --git a/ruby-install-builder.js b/ruby-install-builder.js index ac60a0c..e12ab9c 100644 --- a/ruby-install-builder.js +++ b/ruby-install-builder.js @@ -17,7 +17,12 @@ export async function getAvailableVersions(engine) { export async function install(platform, ruby) { const rubyPrefix = await downloadAndExtract(platform, ruby) + core.addPath(path.join(rubyPrefix, 'bin')) + if (ruby.startsWith('rubinius')) { + core.addPath(path.join(rubyPrefix, 'gems', 'bin')) + } + return rubyPrefix }