Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract TruffleRuby workflow from reline.yml #783

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/reline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby-truffleruby
engine: cruby
min_version: 2.6

reline:
Expand All @@ -23,12 +23,6 @@ jobs:
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
Expand Down Expand Up @@ -126,8 +120,6 @@ jobs:
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, 'truffleruby') }}

vterm-yamatanooroti:
needs: ruby-versions
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/truffle-ruby-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: build-with-truffleruby-head

on:
push:
pull_request:
workflow_dispatch:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it possible to check the CI status manually.

schedule:
- cron: "30 14 * * *"

jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby-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: [truffleruby-head]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

truffleruby-head was originally excluded, but since it can now be easily stopped, it has been set to truffleruby-head.

os: [ubuntu-latest, 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"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readline tests were removed because they were not being run on TruffleRuby.

irb:
needs: ruby-versions
name: >-
irb ${{ matrix.ruby }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [truffleruby-head]
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

vterm-yamatanooroti:
needs: ruby-versions
name: >-
vterm-yamatanooroti ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [truffleruby-head]
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
Loading