diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c7e31b..fa5858f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,12 +3,12 @@ name: CI on: push: branches: - - master + - master pull_request: types: - - opened - - synchronize - - reopened + - opened + - synchronize + - reopened jobs: ubuntu: @@ -19,107 +19,107 @@ jobs: fail-fast: false matrix: os: - - ubuntu-latest + - ubuntu-latest ruby: - - "3.3" - - "3.2" - - "3.1" - - "3.0" - - "2.7" - - "2.6" - - "2.5" - - debug + - "3.3" + - "3.2" + - "3.1" + - "3.0" + - "2.7" + - "2.6" + - "2.5" + - debug steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - - run: rake build - - - name: Install irb for old Ruby - if: | - matrix.ruby == '2.5' || - matrix.ruby == '2.4' || - matrix.ruby == '2.3' - run: | - cat < Gemfile.irb - source 'https://rubygems.org' - gem 'irb' - GEMFILE - BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3 - - - run: gem install pkg/*.gem - - - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" - env: - IRUBY_SESSION_ADAPTER: ffi-rzmq - - - name: Install requirements on ubuntu - run: | - sudo apt update - sudo apt install -y --no-install-recommends \ - libczmq-dev \ - python3 \ - python3-pip \ - python3-setuptools - sudo pip3 install wheel - sudo pip3 install -r ci/requirements.txt - - - run: bundle install --jobs 4 --retry 3 - - - name: Run tests - env: - PYTHON: python3 - ADAPTERS: cztop ffi-rzmq - run: | - for adapter in $ADAPTERS; do - export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter - bundle exec rake test TESTOPTS="-v" - done + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - run: rake build + + - name: Install irb for old Ruby + if: | + matrix.ruby == '2.5' || + matrix.ruby == '2.4' || + matrix.ruby == '2.3' + run: | + cat < Gemfile.irb + source 'https://rubygems.org' + gem 'irb' + GEMFILE + BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3 + + - run: gem install pkg/*.gem + + - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" + env: + IRUBY_SESSION_ADAPTER: ffi-rzmq + + - name: Install requirements on ubuntu + run: | + sudo apt update + sudo apt install -y --no-install-recommends \ + libczmq-dev \ + python3 \ + python3-pip \ + python3-setuptools + sudo pip3 install wheel + sudo pip3 install -r ci/requirements.txt + + - run: bundle install --jobs 4 --retry 3 + + - name: Run tests + env: + PYTHON: python3 + ADAPTERS: cztop ffi-rzmq + run: | + for adapter in $ADAPTERS; do + export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter + bundle exec rake test TESTOPTS="-v" + done windows: name: Windows runs-on: windows-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 + - uses: actions/checkout@v3 + with: + fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.0" + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.0" - - run: rake build + - run: rake build - - run: gem install pkg/*.gem + - run: gem install pkg/*.gem - - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" - env: - IRUBY_SESSION_ADAPTER: ffi-rzmq + - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" + env: + IRUBY_SESSION_ADAPTER: ffi-rzmq macos: name: macOS runs-on: macos-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 + - uses: actions/checkout@v3 + with: + fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.0" + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.0" - - run: rake build + - run: rake build - - run: gem install pkg/*.gem + - run: gem install pkg/*.gem - - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" - env: - IRUBY_SESSION_ADAPTER: ffi-rzmq + - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class" + env: + IRUBY_SESSION_ADAPTER: ffi-rzmq diff --git a/README.md b/README.md index 9052d4b..1e3faa2 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ IRuby is a Ruby kernel for [Jupyter project](http://try.jupyter.org/). You can try IRuby with a sample notebook on Binder (the same link as the banner placed above): -https://mybinder.org/v2/gh/RubyData/binder/master?filepath=ruby-data.ipynb + The following URL launches JupyterLab directly on Binder. -https://mybinder.org/v2/gh/RubyData/binder/master?filepath=../lab + ## Installation @@ -31,13 +31,12 @@ The following dependencies are optional. * [Pry][Pry], if you want to use [Pry][Pry] instead of IRB for the code execution backend - ### Installing Jupyter Notebook and/or JupyterLab See the official document to know how to install Jupyter Notebook and/or JupyterLab. -* https://jupyter.readthedocs.io/en/latest/install/notebook-classic.html -* https://jupyter.readthedocs.io/en/latest/install.html +* +* ### Ubuntu @@ -106,7 +105,7 @@ iruby register --force ### Docker -Try [RubyData Docker Stacks](https://github.com/RubyData/docker-stacks). +Try [RubyData Docker Stacks](https://github.com/RubyData/docker-stacks). Running jupyter notebook: ```shell @@ -123,7 +122,7 @@ You can use Java classes in your IRuby notebook. After installation, make sure that your `env` is set up to use jruby. ```shell -$ env ruby -v +env ruby -v ``` If you use RVM, it is enough to switch the current version to jruby. @@ -131,7 +130,7 @@ If you use RVM, it is enough to switch the current version to jruby. If you have already used IRuby with a different version, you need to generate a new kernel: ```shell -$ iruby register --force +iruby register --force ``` ### Install the development version of IRuby @@ -182,7 +181,7 @@ Contributions to IRuby are very welcome. To former contributors -In February 2021, [IRuby became the canonical repository](https://github.com/SciRuby/iruby/issues/285) and is no longer a fork from [minrk/iruby](https://github.com/minrk/iruby). Please fork from this repository again before making pull requests. +In February 2021, [IRuby became the canonical repository](https://github.com/SciRuby/iruby/issues/285) and is no longer a fork from [minrk/iruby](https://github.com/minrk/iruby). Please fork from this repository again before making pull requests. ## License