Skip to content

Commit

Permalink
ci for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
YO4 committed Nov 4, 2024
1 parent 6dc0da8 commit 2a66b0e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 195 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/gh-pages.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/ruby-core.yml

This file was deleted.

104 changes: 17 additions & 87 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,104 +7,34 @@ on:
- cron: "30 14 * * *"

jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby-truffleruby
min_version: 2.7
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop
irb:
needs: ruby-versions
name: rake test ${{ matrix.ruby }} ${{ matrix.with_latest_reline && '(latest reline)' || '' }}
strategy:
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
with_latest_reline: [true, false]
exclude:
- ruby: truffleruby
fail-fast: false
runs-on: ubuntu-latest
env:
WITH_LATEST_RELINE: ${{matrix.with_latest_reline}}
timeout-minutes: 30
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
- name: Run tests in isolation
run: bundle exec rake test_in_isolation
debug-test:
name: Debug compatibility test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Install dependencies
run: bundle install
- name: Install IRB
run: |
rake install
- name: Download ruby/debug
run: |
git clone https://github.com/ruby/debug
- name: Run debug tests
working-directory: ./debug
run: |
bundle install
bundle exec rake
vterm-yamatanooroti:
needs: ruby-versions
winconhost-yamatanooroti:
name: >-
vterm-yamatanooroti ${{ matrix.ruby }} ${{ matrix.with_latest_reline && '(latest reline)' || '' }}
runs-on: ubuntu-latest
win-yamatanooroti ${{ matrix.os }} ${{ matrix.console }} ${{ matrix.ruby }} ${{ matrix.with_latest_reline && '(latest reline)' || '' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
with_latest_reline: [true, false]
ruby: [3.3]
os: [windows-2019, windows-2022]
console: [ conhost, legacy-conhost, 1.21, 1.22preview, canary ]
with_latest_reline: [true]
exclude:
- ruby: truffleruby
- ruby: truffleruby-head
fail-fast: false
- console: 1.21
os: windows-2019
- console: 1.22preview
os: windows-2019
- console: canary
os: windows-2019
env:
WITH_LATEST_RELINE: ${{matrix.with_latest_reline}}
timeout-minutes: 30
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- 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: |
WITH_VTERM=1 bundle install
run: bundle install
- name: rake test_yamatanooroti
run: WITH_VTERM=1 bundle exec rake test_yamatanooroti
run: bundle exec rake test_yamatanooroti TESTOPTS="-v --wt_dir=./tmp --windows=${{ matrix.console }}"
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ gemspec

is_unix = RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
is_truffleruby = RUBY_DESCRIPTION =~ /truffleruby/
is_win = RUBY_PLATFORM =~ /(mswin|msys|mingw|cygwin|bccwin|wince|emc)/i

if is_unix && ENV['WITH_VTERM']
gem "vterm", github: "ruby/vterm-gem"
gem "yamatanooroti", github: "ruby/yamatanooroti"
end
if is_win
gem "yamatanooroti", github: "yo4/yamatanooroti", branch: "ci_for_windows"
end

gem "stackprof" if is_unix && !is_truffleruby

gem "reline", github: "ruby/reline" if ENV["WITH_LATEST_RELINE"] == "true"
gem "reline", github: "YO4/reline", branch: "windows_fix" if ENV["WITH_LATEST_RELINE"] == "true"
gem "rake"
gem "test-unit"
gem "test-unit-ruby-core"
Expand Down

0 comments on commit 2a66b0e

Please sign in to comment.