Skip to content

Commit

Permalink
Test Windows only on head
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Oct 17, 2024
1 parent 51ee671 commit 4185f39
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,12 @@ name: build
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-truffleruby
min_version: 2.6

build:
needs: ruby-versions
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest, windows-latest ]
exclude:
- { os: windows-latest, ruby: head }
- { os: windows-latest, ruby: truffleruby }
- { os: windows-latest, ruby: truffleruby-head }
include:
- { os: windows-latest, ruby: mingw }
- { os: windows-latest, ruby: mswin }
ruby: [ mingw, mswin ]
os: [ windows-latest ]
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- name: git config
Expand All @@ -40,19 +25,3 @@ jobs:
bundler-cache: true
- name: Run test
run: bundle exec rake compile test
- id: build
run: |
git fetch --force --no-tags origin 'refs/tags/v*:refs/tags/v*'
bundle exec rake build
echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT
env:
RUNNING_OS: ${{matrix.os}}
if: ${{ matrix.ruby == fromJson(needs.ruby-versions.outputs.latest) }}
shell: bash
# Ubuntu 20.04 still has libyaml 0.2.2
- name: Upload package
uses: actions/upload-artifact@v4
with:
path: pkg/*.gem
name: ${{steps.build.outputs.pkg}}
if: steps.build.outputs.pkg

0 comments on commit 4185f39

Please sign in to comment.