mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Actions - Add nonMRI workflow - allow failure - JRuby, TruffleRuby [changelog skip] (#2185)
* Actions - Add nonMRIHead workflow - allow failure - JRuby, TruffleRuby Also, on Windows, add Ruby 2.2 and fix compile code * extconf.rb - minor fix for old Windows Rubies * JRuby fixes for CI 1. lib/puma/minissl.rb - add 'correct' constants so CI will run 2. test/shell/t*.rb - extend time to start by two seconds for JRuby * Delete .travis.yml
This commit is contained in:
parent
d8b25115d4
commit
21a33f73a9
6 changed files with 68 additions and 57 deletions
67
.github/workflows/ruby.yml
vendored
67
.github/workflows/ruby.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-18.04, macos ]
|
||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, ruby-head, jruby ]
|
||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head, jruby ]
|
||||
|
||||
steps:
|
||||
- name: repo checkout
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
|||
run: bundle exec rake compile
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
# RubyGems < 3, no frozen strings
|
||||
if [[ "2.6" < "${{ matrix.ruby }}.0" ]]; then
|
||||
|
@ -60,7 +60,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, mingw ]
|
||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, mingw ]
|
||||
|
||||
steps:
|
||||
- name: repo checkout
|
||||
|
@ -73,22 +73,67 @@ jobs:
|
|||
mingw: _upgrade_ openssl 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 }}' -lt '2.3') {
|
||||
gem update --system 2.7.10 --no-document
|
||||
}
|
||||
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
||||
|
||||
- name: 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
|
||||
}
|
||||
bundle exec rake compile
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 8
|
||||
run: |
|
||||
# RubyGems < 3, no frozen strings
|
||||
if ('${{ matrix.ruby }}' -ge '2.6') {
|
||||
$env:RUBYOPT = '--enable=frozen-string-literal'
|
||||
}
|
||||
bundle exec rake
|
||||
|
||||
nonMRIHead:
|
||||
name: >-
|
||||
${{ matrix.cfg.os }}, ${{ matrix.cfg.ruby }}
|
||||
env:
|
||||
CI: true
|
||||
TESTOPTS: -v
|
||||
|
||||
runs-on: ${{ matrix.cfg.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
cfg:
|
||||
- { os: ubuntu-latest, ruby: jruby-head }
|
||||
- { os: ubuntu-latest, ruby: truffleruby-head }
|
||||
|
||||
steps:
|
||||
- name: repo checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: load ruby, ragel
|
||||
uses: MSP-Greg/setup-ruby-pkgs@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.cfg.ruby }}
|
||||
apt-get: ragel
|
||||
brew: ragel
|
||||
|
||||
- name: bundle install
|
||||
run: |
|
||||
bundle install --jobs 4 --retry 3 --path=.bundle/puma
|
||||
|
||||
- name: compile
|
||||
continue-on-error: true
|
||||
run: bundle exec rake compile
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 8
|
||||
continue-on-error: true
|
||||
if: success()
|
||||
run: |
|
||||
# RubyGems < 3, no frozen strings
|
||||
if [[ "2.6" < "${{ matrix.cfg.ruby }}.0" ]]; then
|
||||
export RUBYOPT="--enable=frozen-string-literal"
|
||||
fi
|
||||
bundle exec rake
|
||||
|
|
43
.travis.yml
43
.travis.yml
|
@ -1,43 +0,0 @@
|
|||
dist: bionic
|
||||
language: ruby
|
||||
cache: bundler
|
||||
|
||||
before_install:
|
||||
# rubygems 2.7.8 and greater include bundler, leave 2.6.0 untouched
|
||||
- |
|
||||
r_eng="$(ruby -e 'STDOUT.write RUBY_ENGINE')";
|
||||
rv="$(ruby -e 'STDOUT.write RUBY_VERSION')";
|
||||
if [ "$r_eng" == "ruby" ]; then
|
||||
if [ "$rv" \< "2.3" ]; then gem update --system 2.7.10 --no-document
|
||||
elif [ "$rv" \< "2.6" ]; then gem update --system --no-document --conservative
|
||||
fi
|
||||
fi
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
brew update
|
||||
brew install ragel
|
||||
fi
|
||||
- ruby -v && gem --version && bundle version
|
||||
|
||||
before_script:
|
||||
- if [ "$jit" == "yes" ]; then export RUBYOPT=--jit ; fi ; echo RUBYOPT is $RUBYOPT
|
||||
- bundle exec rake compile
|
||||
|
||||
script:
|
||||
- bundle exec rake
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- rvm: jruby-head
|
||||
env:
|
||||
- JRUBY_OPTS="--debug"
|
||||
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens java.base/java.util.zip=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.security.cert=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
|
||||
- rvm: truffleruby-head
|
||||
|
||||
allow_failures:
|
||||
- rvm: truffleruby-head
|
||||
|
||||
env:
|
||||
global:
|
||||
- TESTOPTS="-v"
|
||||
- RUBYOPT="--enable-frozen-string-literal"
|
|
@ -2,7 +2,7 @@ require 'mkmf'
|
|||
|
||||
dir_config("puma_http11")
|
||||
|
||||
if $mingw
|
||||
if $mingw && RUBY_VERSION >= '2.4'
|
||||
append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2'
|
||||
append_ldflags '-fstack-protector-strong -l:libssp.a'
|
||||
have_library 'ssp'
|
||||
|
|
|
@ -7,6 +7,15 @@ end
|
|||
|
||||
module Puma
|
||||
module MiniSSL
|
||||
|
||||
# TODO: are there values somewhere?
|
||||
OPENSSL_VERSION = 'OpenSSL 1.0.2z na' unless const_defined?(:OPENSSL_VERSION)
|
||||
OPENSSL_LIBRARY_VERSION = 'OpenSSL 1.0.2z na' unless const_defined?(:OPENSSL_LIBRARY_VERSION)
|
||||
|
||||
# TODO: are there values somewhere?
|
||||
OPENSSL_NO_SSL3 = true
|
||||
OPENSSL_NO_TLS1 = false
|
||||
|
||||
class Socket
|
||||
def initialize(socket, engine)
|
||||
@socket = socket
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
system "ruby -rrubygems -Ilib bin/puma -p 10102 -C test/shell/t1_conf.rb test/rackup/hello.ru &"
|
||||
sleep 5
|
||||
sleep (defined?(JRUBY_VERSION) ? 7 : 5)
|
||||
system "curl http://localhost:10102/"
|
||||
|
||||
system "kill `cat t1-pid`"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
system "ruby -rrubygems -Ilib bin/pumactl -F test/shell/t2_conf.rb start &"
|
||||
sleep 5
|
||||
sleep (defined?(JRUBY_VERSION) ? 7 : 5)
|
||||
system "curl http://localhost:10103/"
|
||||
|
||||
out=`ruby -rrubygems -Ilib bin/pumactl -F test/shell/t2_conf.rb status`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue