mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Split ruby.yml, revise Actions (#2114)
This commit is contained in:
parent
a391634a34
commit
71bcd84a57
1 changed files with 85 additions and 37 deletions
122
.github/workflows/ruby.yml
vendored
122
.github/workflows/ruby.yml
vendored
|
@ -5,7 +5,7 @@ on: [push, pull_request]
|
|||
jobs:
|
||||
build:
|
||||
name: >-
|
||||
${{ matrix.os }} Ruby: ${{ matrix.ruby }}
|
||||
${{ matrix.os }}, ${{ matrix.ruby }}
|
||||
env:
|
||||
CI: true
|
||||
TESTOPTS: -v
|
||||
|
@ -14,45 +14,93 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-18.04, macos, windows-latest ]
|
||||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7 ]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
ruby: 2.3
|
||||
os: [ ubuntu-18.04, macos ]
|
||||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, ruby-head ]
|
||||
|
||||
steps:
|
||||
- name: repo checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: repo checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: load ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
- name: load ruby
|
||||
uses: ruby/setup-ruby@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: 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: windows - update MSYS2, openssl, ragel
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: MSP-Greg/msys2-action@master
|
||||
with:
|
||||
base: update
|
||||
mingw: openssl ragel
|
||||
- name: bundle install
|
||||
run: bundle install --jobs 4 --retry 3
|
||||
- name: compile
|
||||
run: bundle exec rake compile
|
||||
|
||||
- name: RubyGems, Bundler Update
|
||||
run: gem update --system --no-document --conservative
|
||||
- name: bundle install
|
||||
run: bundle install --jobs 4 --retry 3
|
||||
- name: compile
|
||||
run: bundle exec rake compile
|
||||
- name: test
|
||||
run: bundle exec rake
|
||||
env:
|
||||
RUBYOPT: --enable-frozen-string-literal
|
||||
timeout-minutes: 10
|
||||
# two test steps due to pre-installed Bundler not working with
|
||||
# frozen strings before 2.0
|
||||
|
||||
- name: test with frozen string
|
||||
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
|
||||
|
||||
win32:
|
||||
name: >-
|
||||
${{ matrix.os }}, ${{ matrix.ruby }}
|
||||
env:
|
||||
CI: true
|
||||
TESTOPTS: -v
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, ruby-head ]
|
||||
|
||||
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
|
||||
with:
|
||||
base: update
|
||||
mingw: openssl ragel
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
|
||||
- name: bundle install
|
||||
run: bundle install --jobs 4 --retry 3
|
||||
|
||||
- name: compile
|
||||
if: matrix.ruby >= '2.4'
|
||||
run: bundle exec rake compile
|
||||
|
||||
# Ruby 2.3 uses a OpenSSL package that is not MSYS2
|
||||
- name: compile
|
||||
if: matrix.ruby == '2.3'
|
||||
run: bundle exec rake compile -- --with-openssl-dir=C:/openssl-win
|
||||
|
||||
- name: test with frozen string
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue