Merge pull request #1892 from ruby/dependabot/bundler/parallel-1.25.1 #4906
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
push: | |
branches: | |
- master | |
pull_request: {} | |
merge_group: {} | |
jobs: | |
test: | |
runs-on: "ubuntu-latest" | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['3.0', '3.1', '3.2', '3.3', head] | |
rubyopt: [""] | |
job: | |
- test | |
include: | |
- ruby: head | |
job: stdlib_test rubocop | |
- ruby: "3.3" | |
job: stdlib_test | |
- ruby: "3.3" | |
job: test | |
rubyopt: "--enable-frozen-string-literal" | |
- ruby: "3.3" | |
job: stdlib_test | |
rubyopt: "--enable-frozen-string-literal" | |
- ruby: "3.3" | |
job: lexer compile confirm_lexer | |
- ruby: "3.3" | |
job: rubocop validate test_doc build test_generate_stdlib raap | |
- ruby: "3.3" | |
job: typecheck_test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: none | |
- name: Set working directory as safe | |
run: git config --global --add safe.directory $(pwd) | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool python3 | |
- name: Install Re2c | |
if: ${{ contains(matrix.job, 'lexer') }} | |
run: | | |
cd /tmp | |
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.1.tar.gz > re2c-3.1.tar.gz | |
tar xf re2c-3.1.tar.gz | |
cd re2c-3.1 | |
autoreconf -i -W all | |
./configure | |
make | |
sudo make install | |
- name: Update rubygems & bundler | |
run: | | |
ruby -v | |
gem update --system | |
- name: bundle config set with | |
run: | | |
echo "NO_MINITEST=true" >> $GITHUB_ENV | |
bundle config set --local without 'minitest' | |
if: ${{ contains(matrix.ruby, 'head') }} | |
- name: Skip installing type checkers | |
if: ${{ ! contains(matrix.job, 'typecheck_test') }} | |
run: | | |
bundle config set without 'typecheck_test' | |
- name: bin/setup | |
run: | | |
bin/setup | |
- name: Run test | |
run: | | |
bundle exec rake ${{ matrix.job }} | |
windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, windows-2022] | |
ruby: [ucrt, mswin] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: load ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: rake-compiler | |
run: gem install rake-compiler | |
- name: compile | |
run: rake compile |