Skip to content

Commit

Permalink
Support TruffleRuby toolchain on macOS/Linux
Browse files Browse the repository at this point in the history
Windows support is yet to be added.
  • Loading branch information
p0deje committed Nov 13, 2022
1 parent ed813aa commit 80b362c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ jobs:
ruby:
- 2.7.6
- 3.0.4
- truffleruby-22.3.0
os:
- ubuntu-latest
- macos-latest
- windows-latest
exclude:
- os: windows-latest
ruby: truffleruby-22.3.0
defaults:
run:
working-directory: examples/gem
Expand Down
4 changes: 4 additions & 0 deletions examples/gem/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
startup --windows_enable_symlinks
build --enable_runfiles
test --test_output=errors

# TruffleRuby needs $HOME for File#expand_path to work.
build --action_env=HOME
test --test_env=HOME
2 changes: 2 additions & 0 deletions examples/gem/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GEM
ast (2.4.2)
diff-lcs (1.5.0)
json (2.6.2)
json (2.6.2-java)
parallel (1.22.1)
parser (3.1.2.1)
ast (~> 2.4.1)
Expand Down Expand Up @@ -47,6 +48,7 @@ GEM

PLATFORMS
ruby
universal-java-18
x64-mingw32

DEPENDENCIES
Expand Down
1 change: 1 addition & 0 deletions ruby/private/gem_build.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def _rb_gem_build_impl(ctx):
executable = toolchain.ruby,
arguments = [args],
outputs = [ctx.outputs.gem],
use_default_shell_env = True,
)

rb_gem_build = rule(
Expand Down

0 comments on commit 80b362c

Please sign in to comment.