Skip to content

Commit

Permalink
Test the Ruby gem on all supported platforms
Browse files Browse the repository at this point in the history
Now Ruby 3.4 builds on Windows should be fixed (see
oxidize-rb/actions#50), try installing and
testing the Ruby gem on Ubuntu, macOS, and Windows.
  • Loading branch information
mudge committed Jan 14, 2025
1 parent 9f840ab commit b60b65a
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
ruby-version: "3.4"
bundler-cache: true
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: bundle exec rake build
Expand All @@ -33,23 +33,24 @@ jobs:
test-ruby-gem:
needs: ruby-gem
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
name: Test Ruby gem - ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
ruby:
- '3.4'
- '3.3'
- '3.2'
- '3.1'
- '3.0'
- '2.7'
- "3.4"
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: actions-rust-lang/setup-rust-toolchain@v1
cargo-cache: true
- uses: actions/download-artifact@v4
with:
name: ruby-gem
Expand All @@ -76,20 +77,21 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
ruby-version: "3.4"
bundler-cache: true
- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
platform: ${{ matrix.platform }}
ruby-versions: '2.7,3.0,3.1,3.2,3.3,3.4'
ruby-versions: "2.7,3.0,3.1,3.2,3.3,3.4"
- uses: actions/upload-artifact@v4
with:
name: cross-gem-${{ matrix.platform }}
path: ${{ steps.cross-gem.outputs.gem-path }}

test-precompiled-arm-linux:
needs: "cross-gem"
name: Test precompiled gem - arm-linux - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -118,6 +120,7 @@ jobs:
test-precompiled-aarch64-linux:
needs: "cross-gem"
name: Test precompiled gem - aarch64-linux - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -146,6 +149,7 @@ jobs:
test-precompiled-aarch64-linux-musl:
needs: "cross-gem"
name: Test precompiled gem - aarch64-linux-musl - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -174,6 +178,7 @@ jobs:
test-precompiled-arm64-darwin:
needs: "cross-gem"
name: Test precompiled gem - arm64-darwin - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -201,6 +206,7 @@ jobs:

test-precompiled-x64-mingw-ucrt:
needs: "cross-gem"
name: Test precompiled gem - x64-mingw-ucrt - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand All @@ -221,6 +227,7 @@ jobs:

test-precompiled-x64-mingw32:
needs: "cross-gem"
name: Test precompiled gem - x64-mingw32 - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand All @@ -245,6 +252,7 @@ jobs:

test-precompiled-x86_64-darwin:
needs: "cross-gem"
name: Test precompiled gem - x86_64-darwin - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -272,6 +280,7 @@ jobs:

test-precompiled-x86_64-linux:
needs: "cross-gem"
name: Test precompiled gem - x86_64-linux - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -299,6 +308,7 @@ jobs:

test-precompiled-x86_64-linux-musl:
needs: "cross-gem"
name: Test precompiled gem - x86_64-linux-musl - Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit b60b65a

Please sign in to comment.