Skip to content

Prepare for Java 24 Build #2433

Prepare for Java 24 Build

Prepare for Java 24 Build #2433

Workflow file for this run

name: 'Rebuild'
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*rebuild*'
pull_request:
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*rebuild*'
env:
LC_ALL: en_US.UTF-8
GRADLE_OPTS: >-
-Dorg.gradle.parallel=true
MAVEN_OPTS: >-
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.count=3
-Daether.connector.http.retryHandler.count=5
-Daether.connector.http.reuseConnections=false
-Daether.connector.http.connectionMaxTtl=25
-Daether.connector.connectTimeout=120000
BNDTOOLS_CORE_TEST_NOJUNITOSGI: true # This test is very flaky on CI
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: ${{ (github.repository != 'bndtools/bnd') || ((github.ref != 'refs/heads/master') && (github.ref != 'refs/heads/next')) || (github.event_name == 'pull_request') }}
matrix:
os:
- 'ubuntu-latest'
java:
- '17'
name: Build JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
outputs:
dist-bundles: Dist_Bundles_JDK${{ matrix.java }}_${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
with:
distribution: 'temurin'
java-version: |
8
${{ matrix.java }}
- name: Set up Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed
- name: Build
id: build
run: |
./.github/scripts/rebuild-build.sh
- name: Upload dist/bundles
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: Dist_Bundles_JDK${{ matrix.java }}_${{ matrix.os }}
if-no-files-found: error
path: dist/bundles/
rebuild:
needs: build
strategy:
fail-fast: ${{ (github.repository != 'bndtools/bnd') || ((github.ref != 'refs/heads/master') && (github.ref != 'refs/heads/next')) || (github.event_name == 'pull_request') }}
matrix:
os:
- 'ubuntu-latest'
java:
- '17'
- '20'
- '24-ea'
runner:
- '{0}' # 'xvfb-run --auto-servernum {0}'
name: Rebuild JDK${{ matrix.java }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Git Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Java 8 + ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
with:
distribution: 'temurin'
java-version: |
8
${{ matrix.java }}
- name: Set up Gradle
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed
- name: Download dist/bundles
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85
with:
name: ${{ needs.build.outputs.dist-bundles }}
path: dist/bundles
- name: Rebuild
id: build
run: |
${{ format(matrix.runner, './.github/scripts/rebuild-test.sh') }}
- name: Upload Test Reports
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: Rebuild_JDK${{ matrix.java }}_${{ matrix.os }}-test-reports
path: |
*/generated/test-reports/*/TEST-*.xml
maven/*/target/surefire-reports/TEST-*.xml
gradle-plugins/*/build/test-results/*/TEST-*.xml