Skip to content

Extract TruffleRuby workflow from reline.yml #1

Extract TruffleRuby workflow from reline.yml

Extract TruffleRuby workflow from reline.yml #1

name: build-with-truffleruby-head
on:
push:
pull_request:
schedule:
- cron: "30 14 * * *"
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: truffleruby
min_version: 2.6
reline:
needs: ruby-versions
name: >-
reline ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- { ruby: truffleruby, os: windows-latest }
- { ruby: truffleruby-head, os: windows-latest }
# https://github.com/ruby/reline/pull/768#issuecomment-2420586587
- { ruby: truffleruby-head, os: ubuntu-latest }
- { ruby: truffleruby-head, os: macos-latest }
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: rake test
env:
TERM: xterm-256color
run: bundle exec rake test
- name: rake test (frozen string literal)
env:
TERM: xterm-256color
run: bundle exec rake test RUBYOPT="--enable-frozen-string-literal"
readline:
name: >-
readline ${{ matrix.ruby }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { ruby: head, os: ubuntu-latest }
- { ruby: head, os: macos-latest }
- { ruby: mingw, os: windows-latest }
- { ruby: mswin, os: windows-latest }
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Download test readline
run: ruby download-test_readline.rb
- name: rake test
run: bundle exec rake test
- name: rake ci-test
env:
TEST_READLINE_OR_RELINE: Reline
TERM: xterm-256color
run: bundle exec rake ci-test
irb:
needs: ruby-versions
name: >-
irb ${{ matrix.ruby }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ubuntu-latest]
exclude:
- ruby: 2.6
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install libvterm
run: |
sudo apt install -y libtool-bin
wget http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.4.tar.gz
tar xvzf libvterm-0.1.4.tar.gz
cd libvterm-0.1.4
sed -i -e 's/^PREFIX=.*$/PREFIX=\/usr/g' Makefile
make
sudo make install
- name: Install dependencies
run: bundle install
- name: Install reline
run: rake install
- name: Download ruby/irb
run: |
git clone https://github.com/ruby/irb
- name: Run irb test
working-directory: ./irb
run: |
bundle install
bundle exec rake test
- name: Run irb yamatanooroti test
working-directory: ./irb
env:
WITH_VTERM: 1
run: |
gem rdoc --all --ri --no-rdoc
bundle install
bundle exec rake test_yamatanooroti
# https://github.com/ruby/reline/pull/768#issuecomment-2420588075
if: ${{ !startsWith(matrix.ruby) }}

Check failure on line 130 in .github/workflows/truffle-ruby-test.yml

View workflow run for this annotation

GitHub Actions / build-with-truffleruby-head

Invalid workflow file

The workflow is not valid. .github/workflows/truffle-ruby-test.yml (Line: 130, Col: 13): Too few parameters supplied: '('. Located at position 12 within expression: !startsWith(matrix.ruby)
vterm-yamatanooroti:
needs: ruby-versions
name: >-
vterm-yamatanooroti ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ubuntu-latest]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install libvterm
run: |
sudo apt-get install -y libvterm-dev
- name: Install dependencies
run: WITH_VTERM=1 bundle install
- name: rake test_yamatanooroti
run: WITH_VTERM=1 bundle exec rake test_yamatanooroti