Skip to content

Commit acffd63

Browse files
committed
Consider truffleruby as supported for yaml/json compile cache
Tests pass with 21 less skips. This improves the speed of `Faker::Config.locale` on truffleruby by over 50%. This moves truffleruby from "minimal" to the full suite in CI.
1 parent 91977e3 commit acffd63

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
os: [ubuntu]
46-
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head', 'debug']
46+
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', 'ruby-head', 'debug', 'truffleruby']
4747
runs-on: ${{ matrix.os }}-latest
4848
steps:
4949
- uses: actions/checkout@v2
@@ -75,7 +75,7 @@ jobs:
7575
fail-fast: false
7676
matrix:
7777
os: [ubuntu]
78-
ruby: ['jruby', 'truffleruby']
78+
ruby: ['jruby']
7979
runs-on: ${{ matrix.os }}-latest
8080
steps:
8181
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased
22

3+
* Support YAML and JSON CompileCache on TruffleRuby.
4+
35
# 1.16.0
46

57
* Use `RbConfig::CONFIG["rubylibdir"]` instead of `RbConfig::CONFIG["libdir"]` to check for stdlib files. See #431.

ext/bootsnap/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require("mkmf")
44

5-
if RUBY_ENGINE == "ruby"
5+
if %w[ruby truffleruby].include?(RUBY_ENGINE)
66
$CFLAGS << " -O3 "
77
$CFLAGS << " -std=c99"
88

lib/bootsnap/compile_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def self.permission_error(path)
5454

5555
def self.supported?
5656
# only enable on 'ruby' (MRI), POSIX (darwin, linux, *bsd), Windows (RubyInstaller2) and >= 2.3.0
57-
RUBY_ENGINE == "ruby" && RUBY_PLATFORM.match?(/darwin|linux|bsd|mswin|mingw|cygwin/)
57+
%w[ruby truffleruby].include?(RUBY_ENGINE) && RUBY_PLATFORM.match?(/darwin|linux|bsd|mswin|mingw|cygwin/)
5858
end
5959
end
6060
end

0 commit comments

Comments
 (0)