1
+ # GitHub actions for branch testing the latest Hibernate ORM 6.5 snapshot
1
2
name : Hibernate Reactive CI
2
3
3
4
on :
4
5
push :
5
6
branches :
6
- - main
7
- tags :
8
- - ' 2.*'
7
+ - wip/2.3
9
8
pull_request :
10
- branches : main
9
+ branches : wip/2.3
11
10
12
11
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
13
12
concurrency :
24
23
runs-on : ubuntu-latest
25
24
strategy :
26
25
matrix :
26
+ orm-version : [ '6.5.3-SNAPSHOT' ]
27
27
example : [ 'session-example', 'native-sql-example' ]
28
28
db : [ 'MySQL', 'PostgreSQL' ]
29
29
exclude :
67
67
- uses : actions/checkout@v2
68
68
- name : Get year/month for cache key
69
69
id : get-date
70
- run : |
71
- echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
70
+ run : echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
72
71
shell : bash
73
72
- name : Cache Gradle downloads
74
73
uses : actions/cache@v2
85
84
with :
86
85
distribution : ' temurin'
87
86
java-version : 11
87
+ - name : Print the effective ORM version used
88
+ run : ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
88
89
- name : Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
89
90
run : ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
90
91
- name : Upload reports (if build failed)
99
100
runs-on : ubuntu-latest
100
101
strategy :
101
102
matrix :
103
+ orm-version : [ '6.5.3-SNAPSHOT' ]
102
104
db : [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
103
105
steps :
104
106
- uses : actions/checkout@v2
@@ -122,8 +124,10 @@ jobs:
122
124
with :
123
125
distribution : ' temurin'
124
126
java-version : 11
127
+ - name : Print the effective ORM version used
128
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
125
129
- name : Build and Test with ${{ matrix.db }}
126
- run : ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }}
130
+ run : ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
127
131
- name : Upload reports (if build failed)
128
132
uses : actions/upload-artifact@v2
129
133
if : failure()
@@ -137,6 +141,7 @@ jobs:
137
141
strategy :
138
142
fail-fast : false
139
143
matrix :
144
+ orm-version : [ '6.5.3-SNAPSHOT' ]
140
145
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
141
146
# https://api.adoptium.net/v3/info/available_releases
142
147
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -198,75 +203,14 @@ jobs:
198
203
id : mainjdk-exportpath
199
204
run : echo "::set-output name=path::${JAVA_HOME}"
200
205
- name : Display exact version of JDK ${{ matrix.java.name }}
201
- run : |
202
- ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
206
+ run : ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
207
+ - name : Print the effective ORM version used
208
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
203
209
- name : Build and Test with Java ${{ matrix.java.name }}
204
- run : |
205
- ./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
206
- -Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} \
207
- ${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
210
+ 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 }}
208
211
- name : Upload reports (if build failed)
209
212
uses : actions/upload-artifact@v2
210
213
if : failure()
211
214
with :
212
215
name : reports-java${{ matrix.java.name }}
213
- path : ' ./**/build/reports/'
214
-
215
- snapshot :
216
- name : Create snapshot
217
- if : github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
218
- runs-on : ubuntu-latest
219
- steps :
220
- - uses : actions/checkout@v2
221
- - name : Set up JDK 11
222
-
223
- with :
224
- distribution : ' temurin'
225
- java-version : 11
226
- - name : Create artifacts
227
- run : ./gradlew assemble
228
- - name : Detect the version of Hibernate Reactive
229
- id : detect-version
230
- run : |
231
- sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
232
- - name : Publish snapshot to JBoss Nexus
233
- env :
234
- ORG_GRADLE_PROJECT_jbossNexusUser : ${{ secrets.JBOSS_NEXUS_USER }}
235
- ORG_GRADLE_PROJECT_jbossNexusPassword : ${{ secrets.JBOSS_NEXUS_PASSWORD }}
236
- if : endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser
237
- run : ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository
238
-
239
- release :
240
- name : Release
241
- if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
242
- runs-on : ubuntu-latest
243
- steps :
244
- - uses : actions/checkout@v2
245
- - name : Set git username and email
246
- run : |
247
- git config --global user.email "[email protected] "
248
- git config --global user.name "hibernate"
249
- - name : Set up JDK 11
250
-
251
- with :
252
- distribution : ' temurin'
253
- java-version : 11
254
- - name : Create artifacts
255
- run : ./gradlew assemble
256
- - name : Install SSH key
257
- uses : shimataro/ssh-key-action@v2
258
- with :
259
- key : ${{ secrets.HIBERNATE_ORG_SSH_KEY }}
260
- name : id_rsa_hibernate.org
261
- known_hosts : ${{ secrets.HIBERNATE_ORG_SSH_KNOWN_HOSTS }}
262
- config : |
263
- Host github.com
264
- User hibernate
265
- IdentityFile ~/.ssh/id_rsa_hibernate.org
266
- - name : Publish documentation on Hibernate.org
267
- run : ./gradlew publishDocumentation -PdocPublishBranch=production
268
- - name : Publish artifacts to OSSRH, close repository and release
269
- env :
270
- ORG_GRADLE_PROJECT_sonatypeOssrhUser : ${{ secrets.SONATYPE_OSSRH_USER }}
271
- ORG_GRADLE_PROJECT_sonatypeOssrhPassword : ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
272
- run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
216
+ path : ' ./**/build/reports/'
0 commit comments