Skip to content

chore: update build and tooling to utilize new java version #1321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 4 additions & 5 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
- name: Set up JDK 8
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
Expand All @@ -35,9 +34,9 @@ jobs:
uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
${{ runner.os }}-17-maven-

- name: Configure GPG Key
run: |
Expand All @@ -60,7 +59,7 @@ jobs:
# Add -SNAPSHOT before deploy
- name: Add SNAPSHOT
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'

- name: Deploy
run: |
mvn --batch-mode \
Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ permissions:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
build:
- java: 17
profile: codequality
- java: 8
profile: java8
name: with Java ${{ matrix.build.java }}
runs-on: ${{ matrix.os}}
steps:
- name: Check out the code
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2

- name: Set up JDK 8
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
java-version: '8'
distribution: 'temurin'
cache: maven
java-version: ${{ matrix.build.java }}
distribution: 'temurin'
cache: maven

- name: Initialize CodeQL
uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559
Expand All @@ -27,15 +36,16 @@ jobs:
- name: Cache local Maven repository
uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
path: ~/.m2/repository
key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}${{ matrix.build.java }}-maven-

- name: Verify with Maven
run: mvn --batch-mode --update-snapshots --activate-profiles e2e verify
run: mvn --batch-mode --update-snapshots --activate-profiles e2e,${{ matrix.build.profile }} verify

- name: Upload coverage to Codecov
- if: matrix.build.java == '17'
name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
on:
push:
branches:
- main
- beta/new_java_build
name: Run Release Please
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand All @@ -23,17 +23,17 @@ jobs:
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
target-branch: beta/new_java_build

# These steps are only run if this was a merged release-please PR
- name: checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
- name: Set up JDK 8
- name: Set up JDK 17
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
Expand All @@ -54,4 +54,4 @@ jobs:
--settings release/m2-settings.xml clean deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Loading
Loading