From 002b15eeca2c8a043d93bfd8bd5acd44761954f9 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 13 May 2020 23:40:48 +0200 Subject: [PATCH] Add support for ruby master debug builds --- .github/workflows/test.yml | 3 ++- README.md | 3 ++- common.js | 2 +- dist/index.js | 6 +++--- ruby-builder-versions.js | 2 +- ruby-builder.js | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61a4a13f2..0e8c56cc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,12 +15,13 @@ jobs: matrix: os: [ ubuntu, macos, windows ] # 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 ] + ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6.6, 2.7, ruby-head, ruby-debug, jruby-9.1, jruby, jruby-head, truffleruby, truffleruby-head ] include: - { os: ubuntu, ruby: rubinius } - { os: windows, ruby: mingw } - { os: windows, ruby: mswin } exclude: + - { os: windows, ruby: ruby-debug } - { os: windows, ruby: truffleruby } - { os: windows, ruby: truffleruby-head } diff --git a/README.md b/README.md index ebbb734b8..9de88ea50 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby: | Interpreter | Versions | | ----------- | -------- | -| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.10, 2.5.0 - 2.5.8, 2.6.0 - 2.6.6, 2.7.1, head, mingw, mswin | +| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.10, 2.5.0 - 2.5.8, 2.6.0 - 2.6.6, 2.7.1, head, debug, mingw, mswin | | JRuby | 9.1.17.0, 9.2.9.0 - 9.2.11.1, head | | TruffleRuby | 19.3.0 - 20.0.0, head | | Rubinius | 4.14 | +`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`). On Windows, `mingw` and `mswin` are `ruby-head` builds using the MSYS2/MinGW and the MSVC toolchains respectively. Ruby 2.2 resolves to 2.2.6 on Windows (last build from RubyInstaller) and 2.2.10 otherwise. diff --git a/common.js b/common.js index ed4839df3..8303d5c51 100644 --- a/common.js +++ b/common.js @@ -17,7 +17,7 @@ export async function measure(name, block) { } export function isHeadVersion(rubyVersion) { - return rubyVersion === 'head' || rubyVersion === 'mingw' || rubyVersion === 'mswin' + return rubyVersion === 'head' || rubyVersion === 'debug' || rubyVersion === 'mingw' || rubyVersion === 'mswin' } export function getVirtualEnvironmentName() { diff --git a/dist/index.js b/dist/index.js index 7302ddb04..4fb3b06a0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1462,7 +1462,7 @@ function getVersions(platform) { "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7", "2.5.8", "2.6.0", "2.6.1", "2.6.2", "2.6.3", "2.6.4", "2.6.5", "2.6.6", "2.7.0", "2.7.1", - "head" + "head", "debug", ], "jruby": [ "9.1.17.0", @@ -1522,7 +1522,7 @@ async function measure(name, block) { } function isHeadVersion(rubyVersion) { - return rubyVersion === 'head' || rubyVersion === 'mingw' || rubyVersion === 'mswin' + return rubyVersion === 'head' || rubyVersion === 'debug' || rubyVersion === 'mingw' || rubyVersion === 'mswin' } function getVirtualEnvironmentName() { @@ -3580,7 +3580,7 @@ function getDownloadURL(platform, engine, version) { } function getLatestHeadBuildURL(platform, engine, version) { - return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-head-${platform}.tar.gz` + return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-${version}-${platform}.tar.gz` } diff --git a/ruby-builder-versions.js b/ruby-builder-versions.js index af46872d7..6f178572c 100644 --- a/ruby-builder-versions.js +++ b/ruby-builder-versions.js @@ -7,7 +7,7 @@ export function getVersions(platform) { "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7", "2.5.8", "2.6.0", "2.6.1", "2.6.2", "2.6.3", "2.6.4", "2.6.5", "2.6.6", "2.7.0", "2.7.1", - "head" + "head", "debug", ], "jruby": [ "9.1.17.0", diff --git a/ruby-builder.js b/ruby-builder.js index dc2414915..c126f5f0c 100644 --- a/ruby-builder.js +++ b/ruby-builder.js @@ -50,5 +50,5 @@ function getDownloadURL(platform, engine, version) { } function getLatestHeadBuildURL(platform, engine, version) { - return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-head-${platform}.tar.gz` + return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-${version}-${platform}.tar.gz` }