diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index 1efe11e33..000000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Deploy IRB documentation to GitHub Pages - -on: - push: - branches: ["master"] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - if: ${{ github.repository == 'ruby/irb' && !startsWith(github.event_name, 'pull') }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Ruby - uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # v1.196.0 - with: - ruby-version: "3.3" - bundler-cache: true - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - - name: Build with IRB - run: bundle exec rake rdoc - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "docs/" - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml deleted file mode 100644 index d1d5f69c8..000000000 --- a/.github/workflows/ruby-core.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: ruby-core - -on: - pull_request: - - push: - branches: - - master - -concurrency: - group: ci-${{ github.ref }}-${{ github.workflow }} - -permissions: # added using https://github.com/step-security/secure-workflows - contents: read - -jobs: - ruby_core: - name: IRB under a ruby-core setup - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - timeout-minutes: 30 - steps: - - name: Set up latest ruby head - uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0 - with: - ruby-version: head - bundler: none - - name: Save latest buildable revision to environment - run: echo "REF=$(ruby -v | cut -d')' -f1 | cut -d' ' -f5)" >> $GITHUB_ENV - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.1.0 - with: - repository: ruby/ruby - path: ruby/ruby - fetch-depth: 10 - - name: Checkout the latest buildable revision - run: git switch -c ${{ env.REF }} - working-directory: ruby/ruby - - name: Install libraries - run: | - set -x - sudo apt-get update -q || : - sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby - - name: Build Ruby - run: | - autoconf - ./configure -C --disable-install-doc - make -j2 - working-directory: ruby/ruby - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.1.0 - with: - path: ruby/irb - - name: Sync tools - run: | - ruby tool/sync_default_gems.rb irb - working-directory: ruby/ruby - - name: Test IRB - run: make -j2 -s test-all TESTS="irb --no-retry" - working-directory: ruby/ruby diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 810c27590..bb6d3d276 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }}" diff --git a/Gemfile b/Gemfile index 3c2efa44d..08c134b2a 100644 --- a/Gemfile +++ b/Gemfile @@ -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: "ruby/reline", branch: "windows_fix" if ENV["WITH_LATEST_RELINE"] == "true" gem "rake" gem "test-unit" gem "test-unit-ruby-core"