Skip to content

Commit

Permalink
ci: simplify the "setup-ruby" ruby version config (#3377)
Browse files Browse the repository at this point in the history
**What problem is this PR intended to solve?**

Simplify CI configuration.
  • Loading branch information
flavorjones authored Dec 14, 2024
2 parents 32bd55d + ec0d2cd commit d11c148
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ jobs:
ruby_versions:
needs: ["basic"]
outputs:
setup_ruby: "['3.1', '3.2', '3.3', '3.4.0-rc1']"
setup_ruby_windows: "['3.1', '3.2', '3.3', 'head']"
nokogiri_test_image: "['3.1', '3.2', '3.3', '3.4-rc']"
setup_ruby: "['3.1', '3.2', '3.3', 'head']"
image_tag: "['3.1', '3.2', '3.3', '3.4-rc']"
runs-on: ubuntu-latest
steps:
- run: echo "generating rubies ..."
Expand Down Expand Up @@ -126,7 +125,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ${{ fromJSON(needs.ruby_versions.outputs.nokogiri_test_image) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }}
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-${{matrix.ruby}}
Expand All @@ -150,7 +149,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ${{ fromJSON(needs.ruby_versions.outputs.nokogiri_test_image) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }}
mem: ["ruby"]
include:
- sys: "disable"
Expand Down Expand Up @@ -321,7 +320,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_windows) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }}
runs-on: windows-2022
steps:
- name: configure git crlf
Expand Down Expand Up @@ -541,7 +540,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_windows) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -626,7 +625,7 @@ jobs:
- arm-linux-musl
- x86_64-linux-gnu
- x86_64-linux-musl
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }}
include:
# declare docker image for each platform
- { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash build-base &&" }
Expand All @@ -652,7 +651,6 @@ jobs:
${{ matrix.docker_platform }} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \
sh -c "
${{ matrix.bootstrap }}
${{ matrix.rubyenv }}
./scripts/test-gem-install gems
"
Expand Down Expand Up @@ -688,7 +686,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby_windows) }}
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d11c148

Please sign in to comment.