Skip to content

Add Ruby 3.3.

Add Ruby 3.3. #52

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.ruby }} on ${{ matrix.os }}${{ matrix.name_suffix }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2022, macos-11]
ruby: ['1.9.3', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', jruby-1.7, jruby-9.0, jruby-9.1, jruby-9.2, jruby-9.3, jruby-9.4]
architecture: [default]
name_suffix: ['']
experimental: [false]
exclude:
- os: windows-2022
ruby: jruby-1.7
- os: macos-11
ruby: '1.9.3'
include:
- os: windows-2022
ruby: '2.0'
architecture: x86
name_suffix: ' (x86)'
experimental: false
- os: ubuntu-20.04
ruby: head
architecture: default
name_suffix: ' (experimental)'
experimental: true
- os: ubuntu-20.04
ruby: jruby-head
architecture: default
name_suffix: ' (experimental)'
experimental: true
- os: windows-2022
ruby: head
architecture: default
name_suffix: ' (experimental)'
experimental: true
- os: windows-2022
ruby: jruby-head
architecture: default
name_suffix: ' (experimental)'
experimental: true
- os: macos-11
ruby: head
architecture: default
name_suffix: ' (experimental)'
experimental: true
- os: macos-11
ruby: jruby-head
architecture: default
name_suffix: ' (experimental)'
experimental: true
fail-fast: false
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v3
- if: (startsWith(matrix.ruby, '1.') && startsWith(matrix.os, 'windows')) || (startsWith(matrix.ruby, '2.0') && startsWith(matrix.os, 'windows') && matrix.architecture == 'x86') || startsWith(matrix.ruby, 'jruby-1.7') || startsWith(matrix.ruby, 'jruby-9.0')
uses: philr/setup-ruby@legacy-v1
with:
ruby-version: ${{ matrix.ruby }}
architecture: ${{ matrix.architecture }}
bundler-cache: true
- if: ${{ !((startsWith(matrix.ruby, '1.') && startsWith(matrix.os, 'windows')) || (startsWith(matrix.ruby, '2.0') && startsWith(matrix.os, 'windows') && matrix.architecture == 'x86') || startsWith(matrix.ruby, 'jruby-1.7') || startsWith(matrix.ruby, 'jruby-9.0')) }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Download bzip2
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
Invoke-WebRequest `
-Uri https://github.com/philr/bzip2-windows/releases/download/v1.0.8.0/bzip2-1.0.8.0-win-x${{ (matrix.architecture == 'x86' || startsWith(matrix.ruby, '1.')) && '86' || '64' }}.zip `
-OutFile bzip2.zip `
-MaximumRetryCount 10 `
-RetryIntervalSec 2
$RubyBinPath = Split-Path (Get-Command ${{ startsWith(matrix.ruby, 'jruby') && 'j' || '' }}ruby.exe).Path
Write-Host $RubyBinPath
Expand-Archive -Path bzip2.zip -DestinationPath $RubyBinPath -Force
Get-Command bzip2.exe | Format-List
- name: Determine JAVA_HOME
id: java_home
shell: bash
if: startsWith(matrix.ruby, 'jruby-')
run: |
if ( [[ "${{ matrix.os }}" == ubuntu-20.04 ]] || [[ "${{ matrix.os }}" == macos-11 ]] ) && ( [[ "${{ matrix.ruby }}" == jruby-1.* ]] || [[ "${{ matrix.ruby }}" == jruby-9.0* ]] )
then
# Use Java 8 for old versions of JRuby so that the ffi gem is loaded
# instead of the stdlib version of ffi.
# This is currently not required (Java 8 is the default on all
# operating systems currently configured). Later versions may change
# that.
echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
fi
- run: ruby --version
- run: gem --version
- run: bundle --version
- run: bundle exec rake test
env:
TESTOPTS: --verbose
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
CI_NAME: github-actions
CI_BUILD_NUMBER: ${{ github.run_number }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}