1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00
execjs/.github/workflows/ci.yml
Benoit Daloze 566d611c23 Add runtime using GraalJS on TruffleRuby
* Use Truffle inner contexts to provide correct isolation between ExecJS::Context
* To run the tests:
TRUFFLERUBYOPT="--jvm --polyglot" bundle exec rake test:graaljs TESTOPTS="--seed=0 --verbose"
* Full command without subprocess:
TRUFFLERUBYOPT="--jvm --polyglot" jt -u jvm-js ruby -w -Ilib:test -I $PWD/vendor/bundle/truffleruby/*/gems/rake-13.0.1/lib $PWD/vendor/bundle/truffleruby/*/gems/rake-13.0.1/lib/rake/rake_test_loader.rb test/test_execjs.rb --seed=0 --verbose
* Try command:
TRUFFLERUBYOPT="--jvm --polyglot" jt -u jvm-js ruby -Ilib -rexecjs -e 'p ExecJS.eval("2 + 3")'
2021-10-19 19:34:12 +02:00

62 lines
1.6 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
ruby: [ '3.0', '2.7', '2.6', '2.5', 'jruby', 'truffleruby', 'truffleruby+graalvm-head' ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node
run: sudo apt-get install -y nodejs
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Update Rubygems
run: gem update --system
- name: Install bundler
run: gem install bundler -v '2.2.16'
- name: Install dependencies
run: bundle install
- name: Set TRUFFLERUBYOPT
run: echo "TRUFFLERUBYOPT=--jvm --polyglot" >> $GITHUB_ENV
if: matrix.ruby == 'truffleruby+graalvm-head'
- name: Run test
run: rake
- name: Install gem
run: rake install
macos:
strategy:
fail-fast: false
matrix:
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install V8
run: |
brew update
brew install v8
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Update Rubygems
run: gem update --system
- name: Install bundler
run: gem install bundler -v '2.2.16'
- name: Install dependencies
run: bundle install
- name: Run test
run: rake
- name: Install gem
run: rake install