Skip to content

Commit 2265eb6

Browse files
committed
Update GitHub actions for WIP/2.4
1 parent dd1df26 commit 2265eb6

File tree

3 files changed

+15
-279
lines changed

3 files changed

+15
-279
lines changed

.github/workflows/build.yml

+15-71
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
# GitHub actions for branch testing the latest Hibernate ORM 6.6 snapshot
12
name: Hibernate Reactive CI
23

34
on:
45
push:
56
branches:
67
- wip/2.4
7-
tags:
8-
- '2.4.*'
98
pull_request:
109
branches:
1110
- wip/2.4
@@ -25,6 +24,7 @@ jobs:
2524
runs-on: ubuntu-latest
2625
strategy:
2726
matrix:
27+
orm-version: [ '6.6.0-SNAPSHOT' ]
2828
example: [ 'session-example', 'native-sql-example' ]
2929
db: [ 'MySQL', 'PostgreSQL' ]
3030
exclude:
@@ -68,8 +68,7 @@ jobs:
6868
- uses: actions/checkout@v2
6969
- name: Get year/month for cache key
7070
id: get-date
71-
run: |
72-
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
71+
run: echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
7372
shell: bash
7473
- name: Cache Gradle downloads
7574
uses: actions/cache@v2
@@ -86,6 +85,8 @@ jobs:
8685
with:
8786
distribution: 'temurin'
8887
java-version: 11
88+
- name: Print the effective ORM version used
89+
run: ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
8990
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
9091
run: ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
9192
- name: Upload reports (if build failed)
@@ -100,6 +101,7 @@ jobs:
100101
runs-on: ubuntu-latest
101102
strategy:
102103
matrix:
104+
orm-version: [ '6.6.0-SNAPSHOT' ]
103105
db: [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
104106
steps:
105107
- uses: actions/checkout@v2
@@ -123,8 +125,10 @@ jobs:
123125
with:
124126
distribution: 'temurin'
125127
java-version: 11
128+
- name: Print the effective ORM version used
129+
run: ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
126130
- name: Build and Test with ${{ matrix.db }}
127-
run: ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }}
131+
run: ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
128132
- name: Upload reports (if build failed)
129133
uses: actions/upload-artifact@v2
130134
if: failure()
@@ -138,6 +142,7 @@ jobs:
138142
strategy:
139143
fail-fast: false
140144
matrix:
145+
orm-version: [ '6.6.0-SNAPSHOT' ]
141146
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
142147
# https://api.adoptium.net/v3/info/available_releases
143148
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -199,75 +204,14 @@ jobs:
199204
id: mainjdk-exportpath
200205
run: echo "::set-output name=path::${JAVA_HOME}"
201206
- name: Display exact version of JDK ${{ matrix.java.name }}
202-
run: |
203-
${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
207+
run: ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
208+
- name: Print the effective ORM version used
209+
run: ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
204210
- name: Build and Test with Java ${{ matrix.java.name }}
205-
run: |
206-
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
207-
-Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} \
208-
${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
211+
run: ./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep -Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} ${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
209212
- name: Upload reports (if build failed)
210213
uses: actions/upload-artifact@v2
211214
if: failure()
212215
with:
213216
name: reports-java${{ matrix.java.name }}
214-
path: './**/build/reports/'
215-
216-
snapshot:
217-
name: Create snapshot
218-
if: github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
219-
runs-on: ubuntu-latest
220-
steps:
221-
- uses: actions/checkout@v2
222-
- name: Set up JDK 11
223-
uses: actions/[email protected]
224-
with:
225-
distribution: 'temurin'
226-
java-version: 11
227-
- name: Create artifacts
228-
run: ./gradlew assemble
229-
- name: Detect the version of Hibernate Reactive
230-
id: detect-version
231-
run: |
232-
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
233-
- name: Publish snapshot to JBoss Nexus
234-
env:
235-
ORG_GRADLE_PROJECT_jbossNexusUser: ${{ secrets.JBOSS_NEXUS_USER }}
236-
ORG_GRADLE_PROJECT_jbossNexusPassword: ${{ secrets.JBOSS_NEXUS_PASSWORD }}
237-
if: endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser
238-
run: ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository
239-
240-
release:
241-
name: Release
242-
if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
243-
runs-on: ubuntu-latest
244-
steps:
245-
- uses: actions/checkout@v2
246-
- name: Set git username and email
247-
run: |
248-
git config --global user.email "[email protected]"
249-
git config --global user.name "hibernate"
250-
- name: Set up JDK 11
251-
uses: actions/[email protected]
252-
with:
253-
distribution: 'temurin'
254-
java-version: 11
255-
- name: Create artifacts
256-
run: ./gradlew assemble
257-
- name: Install SSH key
258-
uses: shimataro/ssh-key-action@v2
259-
with:
260-
key: ${{ secrets.HIBERNATE_ORG_SSH_KEY }}
261-
name: id_rsa_hibernate.org
262-
known_hosts: ${{ secrets.HIBERNATE_ORG_SSH_KNOWN_HOSTS }}
263-
config: |
264-
Host github.com
265-
User hibernate
266-
IdentityFile ~/.ssh/id_rsa_hibernate.org
267-
- name: Publish documentation on Hibernate.org
268-
run: ./gradlew publishDocumentation -PdocPublishBranch=production
269-
- name: Publish artifacts to OSSRH, close repository and release
270-
env:
271-
ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }}
272-
ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
273-
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
217+
path: './**/build/reports/'

.github/workflows/tracking-orm-6.build.yml

-105
This file was deleted.

.github/workflows/tracking-vertx-4.build.yml

-103
This file was deleted.

0 commit comments

Comments
 (0)