Skip to content

debug

debug #223

Workflow file for this run

name: Test this action
on:
pull_request:
push:
branches-ignore:
- v1
tags-ignore:
- '*'
paths-ignore:
- README.md
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ macos-14 ]
ruby: [
truffleruby, truffleruby-head,
truffleruby+graalvm, truffleruby+graalvm-head
]
exclude:
# https://github.com/ruby/setup-ruby/issues/496
- { os: ubuntu-22.04, ruby: '2.2' }
- { os: ubuntu-24.04, ruby: '1.9' }
- { os: ubuntu-24.04, ruby: '2.2' }
# These old Rubies fail to compile on macOS arm64
- { os: macos-14, ruby: '1.9' }
- { os: macos-14, ruby: '2.0' }
- { os: macos-14, ruby: '2.1' }
- { os: macos-14, ruby: '2.2' }
- { os: macos-14, ruby: '2.3' }
- { os: macos-14, ruby: '2.4' }
- { os: macos-14, ruby: '2.5' }
- { os: macos-15, ruby: '1.9' }
- { os: macos-15, ruby: '2.0' }
- { os: macos-15, ruby: '2.1' }
- { os: macos-15, ruby: '2.2' }
- { os: macos-15, ruby: '2.3' }
- { os: macos-15, ruby: '2.4' }
- { os: macos-15, ruby: '2.5' }
# Windows (note: previews are not available on Windows)
- { os: windows-2019, ruby: '1.9' }
- { os: windows-2022, ruby: '1.9' }
- { os: windows-2019, ruby: '3.4' } # 3.4.0-preview2
- { os: windows-2022, ruby: '3.4' } # 3.4.0-preview2
- { os: windows-2019, ruby: debug }
- { os: windows-2022, ruby: debug }
- { os: windows-2019, ruby: truffleruby }
- { os: windows-2022, ruby: truffleruby }
- { os: windows-2019, ruby: truffleruby-head }
- { os: windows-2022, ruby: truffleruby-head }
- { os: windows-2019, ruby: truffleruby+graalvm }
- { os: windows-2022, ruby: truffleruby+graalvm }
- { os: windows-2019, ruby: truffleruby+graalvm-head }
- { os: windows-2022, ruby: truffleruby+graalvm-head }
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: ${{ matrix.ruby }}
# bundler-cache: true
- run: ruby -v
- name: PATH
shell: pwsh
run: |
# Show PATH with Powershell
$f, $r = $env:PATH.split([IO.Path]::PathSeparator); $r
- name: build compiler
run: |
ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first"
- name: gcc and ridk version (mingw)
if: startsWith(matrix.os, 'windows')
run: |
$abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ')
if ($plat.Contains('mingw')) {
gcc --version
if ($abi -ge '2.4') {
ridk version
} else {
echo 'ridk is unavailable'
}
} elseif ($plat.Contains('mswin')) {
&"$env:VCPKG_INSTALLATION_ROOT\vcpkg" list
}
- name: RbConfig::CONFIG
run: ruby -rrbconfig -rpp -e 'pp RbConfig::CONFIG'
- name: RbConfig::MAKEFILE_CONFIG
run: ruby -rrbconfig -rpp -e 'pp RbConfig::MAKEFILE_CONFIG'
- name: Subprocess test
run: ruby test_subprocess.rb
- run: brew list
- name: OpenSSL compiled version
run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
- name: OpenSSL loaded version
run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION'
if: matrix.ruby != '1.9'
- name: OpenSSL test
run: ruby -ropen-uri -e 'puts URI.send(:open, %{https://rubygems.org/}) { |f| f.read(1024) }'
- run: gem env
- name: C extension test
run: gem install json -v 2.2.0
- run: bundle --version
# This step is redundant with `bundler-cache: true` but is there to check a redundant `bundle install` still works
- run: bundle install
- run: bundle exec rake --version
- run: bundle exec rake
# Ensure the same bundle commands work in bash on Windows
- name: bundle install (bash)
run: bundle install
shell: bash
if: startsWith(matrix.os, 'windows')
- name: bundle exec rake --version (bash)
run: bundle exec rake --version
shell: bash
if: startsWith(matrix.os, 'windows')
- name: bundle exec rake (bash)
run: bundle exec rake
shell: bash
if: startsWith(matrix.os, 'windows')
- name: Test `gem github:` in a Gemfile
run: bundle install
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile
- name: which ruby
shell: bash
run: which -a ruby
- name: which bundle
shell: bash
run: which -a bundle
# https://github.com/ruby/setup-ruby/issues/658
if: "matrix.ruby != 'mingw' && matrix.ruby != 'mswin' && matrix.ruby != 'ucrt'"
- name: which rake
run: which -a rake
if: "!startsWith(matrix.os, 'windows')"
- name: where ruby, rake, bundle
if: startsWith(matrix.os, 'windows')
run: |
$ErrorActionPreference = 'Continue'
$where = 'ruby', 'rake', 'bundle'
foreach ($e in $where) {
$rslt = where.exe $e 2>&1 | Out-String
if ($rslt.contains($e)) { echo $rslt.Trim() }
else { echo "Can't find $e" }
echo ''
}
- name: bash test
shell: bash
run: echo ~ && bundle install
- name: Windows JRuby
if: startsWith(matrix.os, 'windows') && startsWith(matrix.ruby, 'jruby')
run: gem install sassc