Skip to content

Commit

Permalink
Update CI versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 13, 2024
1 parent 0205bd1 commit d635776
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 8 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,31 @@ name: macos
on: [push, pull_request]

jobs:
ruby-versions:
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }}
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.7
versions: '["debug"]'

build:
needs: ruby-versions
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-12
- macos-arm-oss
ruby: [ '2.7', '3.0', '3.1', '3.2', 'debug', 'head' ]
- macos-14
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -26,8 +40,8 @@ jobs:
run: bundle exec rake build
- uses: actions/upload-artifact@v4
if: >-
matrix.os == 'macos-12' &&
matrix.ruby == '3.2'
matrix.os == 'macos-14' &&
matrix.ruby == needs.ruby-versions.outputs.latest
with:
name: gem-${{ matrix.os }}-${{ matrix.ruby }}
path: pkg/
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ name: ubuntu
on: [push, pull_request]

jobs:
ruby-versions:
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }}
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.7
versions: '["debug", "jruby-head", "truffleruby-head"]'

build:
needs: ruby-versions
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -12,8 +21,13 @@ jobs:
os:
- ubuntu-22.04
- ubuntu-20.04
ruby: [ '2.7', '3.0', '3.1', '3.2', 'debug', 'head', 'jruby-head', 'truffleruby-head' ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -27,7 +41,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: >-
matrix.os == 'ubuntu-22.04' &&
matrix.ruby == 'jruby-head'
(matrix.ruby == needs.ruby-versions.outputs.latest || matrix.ruby == 'jruby-head')
with:
name: gem-${{ matrix.os }}-${{ matrix.ruby }}
path: pkg/
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@ name: windows
on: [push, pull_request]

jobs:
ruby-versions:
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }}
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.7
versions: '["mswin", "mingw"]'

build:
needs: ruby-versions
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
ruby: [ '2.7', '3.0', '3.1', '3.2', 'mswin', 'mingw' ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
exclude:
- ruby: head
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -21,4 +37,3 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run test
run: bundle exec rake

0 comments on commit d635776

Please sign in to comment.