Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bootstrap JRuby
description: Set up Java, build JRuby with Maven, and install the bundled gems

inputs:
java-version:
description: Java version to set up
default: '21'
distribution:
description: Java distribution to set up
default: 'zulu'
remove-old-java:
description: Remove the JDKs preinstalled on Linux runners other than 21
default: 'true'
build-args:
description: Arguments passed to the Maven wrapper
default: '-Pbootstrap clean package'
bundle-install:
description: Run bundle install after the build
default: 'true'
jruby-flags:
description: Flags passed to bin/jruby for bundle install
default: '--dev'

runs:
using: composite
steps:
- name: remove default java except 21
if: runner.os == 'Linux' && inputs.remove-old-java == 'true'
shell: bash
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ inputs.java-version }}
uses: actions/setup-java@v5
with:
distribution: ${{ inputs.distribution }}
java-version: ${{ inputs.java-version }}
cache: 'maven'
# tool/ci-retry.sh needs bash, so Windows builds run the wrapper directly and are not retried.
- name: build
if: runner.os != 'Windows'
shell: bash
run: tool/ci-retry.sh ./mvnw -ntp ${{ inputs.build-args }}
- name: build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: ./mvnw -ntp ${{ inputs.build-args }}
- name: bundle install
if: runner.os != 'Windows' && inputs.bundle-install == 'true'
shell: bash
run: tool/ci-retry.sh bin/jruby ${{ inputs.jruby-flags }} -S bundle install
- name: bundle install (Windows)
if: runner.os == 'Windows' && inputs.bundle-install == 'true'
shell: pwsh
run: bin/jruby ${{ inputs.jruby-flags }} -S bundle install
169 changes: 32 additions & 137 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: rake ${{ matrix.target }}
run: bin/jruby -S rake ${{ matrix.target }}

Expand All @@ -54,16 +46,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
remove-old-java: false
- name: rake ${{ matrix.target }}
run: bin/jruby -S rake ${{ matrix.target }}

Expand All @@ -75,18 +62,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
uses: ./.github/actions/bootstrap
- name: run specs
env:
JAVA_OPTS: '-XX:TieredStopAtLevel=1'
Expand All @@ -101,18 +78,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java 21
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: rake test:jruby
run: bin/jruby --dev -S rake test:jruby

Expand All @@ -133,18 +102,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: rake ${{ matrix.target }}
run: bin/jruby -S rake ${{ matrix.target }}

Expand All @@ -162,18 +123,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: mvn package ${{ matrix.package-flags }}
run: tool/maven-ci-script.sh
env:
Expand All @@ -194,18 +147,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
distribution: 'temurin'
- name: mvn package ${{ matrix.package-flags }}
run: tool/maven-ci-script.sh
env:
Expand All @@ -220,18 +166,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
uses: ./.github/actions/bootstrap
- name: rake spec:regression
run: bin/jruby -S rake spec:regression

Expand All @@ -247,16 +183,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: set up java 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: bootstrap
run: ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: bin/jruby --dev -S bundle install
uses: ./.github/actions/bootstrap
with:
remove-old-java: false
- name: rake test:jruby
run: bin/jruby -S rake test:jruby TESTOPTS="--no-show-detail-immediately"
env:
Expand All @@ -276,16 +206,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: set up java 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: bootstrap
run: ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: bin/jruby --dev -S bundle install
uses: ./.github/actions/bootstrap
with:
remove-old-java: false
- name: language specs interpreted
run: bin/jruby spec/mspec/bin/mspec ci :language
- name: language specs compiled
Expand All @@ -305,16 +229,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: set up java 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: bootstrap
run: ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: bin/jruby --dev -S bundle install
uses: ./.github/actions/bootstrap
with:
remove-old-java: false
- name: core specs interpreted
run: bin/jruby spec/mspec/bin/mspec ci :core
- name: core specs compiled
Expand Down Expand Up @@ -391,18 +309,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java 21
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: sequel
run: tool/sequel-github-actions.sh

Expand All @@ -412,18 +322,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java 21
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby --dev -S bundle install
- name: concurrent-ruby
run: tool/concurrent-ruby-github-actions.sh

Expand All @@ -435,18 +337,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: remove default java except 21
run: sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v5
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
distribution: 'semeru'
java-version: '21'
cache: 'maven'
- name: bootstrap
run: tool/ci-retry.sh ./mvnw -ntp -Pbootstrap clean package
- name: bundle install
run: tool/ci-retry.sh bin/jruby -S bundle install
jruby-flags: ''
- name: test profile
run: "tool/maven-ci-script.sh"
env:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/dist-verification-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v6
- name: set up java 21
uses: actions/setup-java@v5
- name: build release artifacts
uses: ./.github/actions/bootstrap
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: build release artifacts
run: |
tool/ci-retry.sh ./mvnw -ntp clean package -Pall
remove-old-java: false
build-args: 'clean package -Pall'
bundle-install: false
- uses: cedx/SetupAnt@v7
- name: install dependencies
run: tool/ci-retry.sh bin/jruby -S bundle install
Expand Down
Loading