1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Add ENV['PUMA_NO_RUBOCOP'] to disable RuboCop install, add mswin ci (#2881)

* Add ENV['PUMA_NO_RUBOCOP'] to disable RuboCop install, allow mswin compile

* [CI] Actions workflow file updates
This commit is contained in:
MSP-Greg 2022-05-19 15:34:39 -05:00 committed by GitHub
parent bf2548ce30
commit 97c7457c89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 11 deletions

View file

@ -15,6 +15,8 @@ jobs:
ragel:
name: >-
ragel ${{ matrix.os }} ${{ matrix.ruby }}
env:
PUMA_NO_RUBOCOP: true
runs-on: ${{ matrix.os }}
if: |
@ -40,7 +42,7 @@ jobs:
uses: actions/checkout@v3
- name: load ruby
uses: MSP-Greg/setup-ruby-pkgs@v1
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel

View file

@ -22,6 +22,7 @@ jobs:
env:
CI: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
runs-on: ${{ matrix.os }}
if: |
@ -36,6 +37,7 @@ jobs:
yjit: ['']
include:
- { os: windows-2022 , ruby: ucrt }
- { os: windows-2022 , ruby: mswin }
- { os: windows-2022 , ruby: 2.7 , no-ssl: ' no SSL' }
- { os: ubuntu-20.04 , ruby: head , yjit: ' yjit' }
- { os: ubuntu-20.04 , ruby: 2.7 , no-ssl: ' no SSL' }
@ -59,7 +61,7 @@ jobs:
uses: actions/checkout@v3
- name: load ruby
uses: MSP-Greg/setup-ruby-pkgs@v1
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel
@ -103,6 +105,7 @@ jobs:
env:
CI: true
TESTOPTS: -v
PUMA_NO_RUBOCOP: true
runs-on: ${{ matrix.os }}
if: |
@ -133,14 +136,11 @@ jobs:
echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
- name: load ruby, ragel
uses: MSP-Greg/setup-ruby-pkgs@v1
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel
brew: ragel
mingw: _upgrade_ openssl ragel
# Use the bundler shipped with that ruby,
# temporary workaround for https://github.com/oracle/truffleruby/issues/2586
bundler: none
bundler-cache: true
timeout-minutes: 10

View file

@ -15,7 +15,9 @@ gem "sd_notify"
gem "jruby-openssl", :platform => "jruby"
gem "rubocop", "~> 0.64.0"
unless ENV['PUMA_NO_RUBOCOP'] || RUBY_PLATFORM.include?('mswin')
gem "rubocop", "~> 0.64.0"
end
if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION
gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]

View file

@ -2,17 +2,20 @@ require "bundler/setup"
require "rake/testtask"
require "rake/extensiontask"
require "rake/javaextensiontask"
require "rubocop/rake_task"
require_relative 'lib/puma/detect'
require 'rubygems/package_task'
require 'bundler/gem_tasks'
begin
# Add rubocop task
require "rubocop/rake_task"
RuboCop::RakeTask.new
rescue LoadError
end
gemspec = Gem::Specification.load("puma.gemspec")
Gem::PackageTask.new(gemspec).define
# Add rubocop task
RuboCop::RakeTask.new
# generate extension code using Ragel (C and Java)
desc "Generate extension code (C and Java) using Ragel"
task :ragel

View file

@ -14,6 +14,8 @@ unless ENV["DISABLE_SSL"]
found_ssl = if (!$mingw || RUBY_VERSION >= '2.4') && (t = pkg_config 'openssl')
puts 'using OpenSSL pkgconfig (openssl.pc)'
true
elsif have_library('libcrypto', 'BIO_read') && have_library('libssl', 'SSL_CTX_new')
true
elsif %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} &&
%w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
true