mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Show RUBYOPT in test 'header', use setup-ruby-pkgs (#2162)
This commit is contained in:
parent
a9940688a4
commit
745bef73e1
2 changed files with 37 additions and 54 deletions
89
.github/workflows/ruby.yml
vendored
89
.github/workflows/ruby.yml
vendored
|
@ -21,44 +21,32 @@ jobs:
|
|||
- name: repo checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: load ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: load ruby, ragel
|
||||
uses: MSP-Greg/setup-ruby-pkgs@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
|
||||
- name: ubuntu & macos - install ragel
|
||||
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
if [ "${{ matrix.os }}" == "macos" ]; then
|
||||
brew install ragel
|
||||
else
|
||||
sudo apt-get -qy install ragel
|
||||
fi
|
||||
|
||||
- name: Ruby 2.2 update RubyGems
|
||||
if: matrix.ruby < '2.3'
|
||||
run: |
|
||||
gem update --system 2.7.10 --no-document
|
||||
apt-get: ragel
|
||||
brew: ragel
|
||||
|
||||
- name: bundle install
|
||||
run: bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
||||
run: |
|
||||
# update RubyGems in Ruby 2.2, bundle install
|
||||
if [[ "${{ matrix.ruby }}" < "2.3" ]]; then
|
||||
gem update --system 2.7.10 --no-document
|
||||
fi
|
||||
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
||||
|
||||
- name: compile
|
||||
run: bundle exec rake compile
|
||||
|
||||
# two test steps due to pre-installed Bundler not working with
|
||||
# frozen strings before 2.0
|
||||
|
||||
- name: test with frozen string
|
||||
- name: test
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
RUBYOPT: --enable-frozen-string-literal
|
||||
if: matrix.ruby >= '2.6'
|
||||
run: bundle exec rake
|
||||
|
||||
- name: test without frozen string
|
||||
timeout-minutes: 10
|
||||
if: matrix.ruby < '2.6'
|
||||
run: bundle exec rake
|
||||
run: |
|
||||
# RubyGems < 3, no frozen strings
|
||||
if [[ "2.6" < "${{ matrix.ruby }}.0" ]]; then
|
||||
export RUBYOPT="--enable=frozen-string-literal"
|
||||
fi
|
||||
bundle exec rake
|
||||
|
||||
win32:
|
||||
name: >-
|
||||
|
@ -72,40 +60,35 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
ruby: [ 2.4, 2.5, 2.6, 2.7, ruby-head ]
|
||||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, mingw ]
|
||||
|
||||
steps:
|
||||
- name: repo checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: windows - update MSYS2, openssl, ragel
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: MSP-Greg/actions-ruby@v1
|
||||
- name: load ruby, ragel, openssl
|
||||
uses: MSP-Greg/setup-ruby-pkgs@v1
|
||||
with:
|
||||
# base: update
|
||||
mingw: openssl ragel
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
mingw: _upgrade_ openssl ragel
|
||||
|
||||
- name: bundle install
|
||||
run: bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
||||
|
||||
- name: compile
|
||||
if: matrix.ruby >= '2.4'
|
||||
run: bundle exec rake compile
|
||||
run: |
|
||||
# Windows Ruby < 2.4 do not use MSYS2 OpenSSL
|
||||
if ('${{ matrix.ruby }}' -lt '2.4') {
|
||||
bundle exec rake compile -- --with-openssl-dir=C:/openssl-win
|
||||
} else {
|
||||
bundle exec rake compile
|
||||
}
|
||||
|
||||
# Ruby 2.3 uses a OpenSSL package that is not MSYS2
|
||||
- name: compile ruby 2.3
|
||||
if: matrix.ruby == '2.3'
|
||||
run: bundle exec rake compile -- --with-openssl-dir=C:/openssl-win
|
||||
|
||||
- name: test with frozen string
|
||||
- name: test
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
RUBYOPT: --enable-frozen-string-literal
|
||||
if: matrix.ruby >= '2.6'
|
||||
run: bundle exec rake
|
||||
|
||||
- name: test without frozen string
|
||||
timeout-minutes: 10
|
||||
if: matrix.ruby < '2.6'
|
||||
run: bundle exec rake
|
||||
run: |
|
||||
# RubyGems < 3, no frozen strings
|
||||
if ('${{ matrix.ruby }}' -ge '2.6') {
|
||||
$env:RUBYOPT = '--enable=frozen-string-literal'
|
||||
}
|
||||
bundle exec rake
|
||||
|
|
|
@ -21,7 +21,7 @@ DISABLE_SSL = begin
|
|||
Puma::MiniSSL.check
|
||||
# net/http (loaded in helper) does not necessarily load OpenSSL
|
||||
require "openssl" unless Object.const_defined? :OpenSSL
|
||||
puts "", RUBY_DESCRIPTION,
|
||||
puts "", RUBY_DESCRIPTION, "RUBYOPT: #{ENV['RUBYOPT']}",
|
||||
" Puma::MiniSSL OpenSSL",
|
||||
"OPENSSL_LIBRARY_VERSION: #{Puma::MiniSSL::OPENSSL_LIBRARY_VERSION.ljust 32}#{OpenSSL::OPENSSL_LIBRARY_VERSION}",
|
||||
" OPENSSL_VERSION: #{Puma::MiniSSL::OPENSSL_VERSION.ljust 32}#{OpenSSL::OPENSSL_VERSION}", ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue