1
+ # GitHub actions for branch testing the latest Hibernate ORM 6.6 snapshot
1
2
name : Hibernate Reactive CI
2
3
3
4
on :
4
5
push :
5
6
branches :
6
7
- wip/2.4
7
- tags :
8
- - ' 2.4.*'
9
8
pull_request :
10
9
branches :
11
10
- wip/2.4
25
24
runs-on : ubuntu-latest
26
25
strategy :
27
26
matrix :
27
+ orm-version : [ '6.6.0-SNAPSHOT' ]
28
28
example : [ 'session-example', 'native-sql-example' ]
29
29
db : [ 'MySQL', 'PostgreSQL' ]
30
30
exclude :
68
68
- uses : actions/checkout@v2
69
69
- name : Get year/month for cache key
70
70
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")"
73
72
shell : bash
74
73
- name : Cache Gradle downloads
75
74
uses : actions/cache@v2
86
85
with :
87
86
distribution : ' temurin'
88
87
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
89
90
- name : Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
90
91
run : ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
91
92
- name : Upload reports (if build failed)
@@ -100,6 +101,7 @@ jobs:
100
101
runs-on : ubuntu-latest
101
102
strategy :
102
103
matrix :
104
+ orm-version : [ '6.6.0-SNAPSHOT' ]
103
105
db : [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
104
106
steps :
105
107
- uses : actions/checkout@v2
@@ -123,8 +125,10 @@ jobs:
123
125
with :
124
126
distribution : ' temurin'
125
127
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
126
130
- 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
128
132
- name : Upload reports (if build failed)
129
133
uses : actions/upload-artifact@v2
130
134
if : failure()
@@ -138,6 +142,7 @@ jobs:
138
142
strategy :
139
143
fail-fast : false
140
144
matrix :
145
+ orm-version : [ '6.6.0-SNAPSHOT' ]
141
146
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
142
147
# https://api.adoptium.net/v3/info/available_releases
143
148
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -199,75 +204,14 @@ jobs:
199
204
id : mainjdk-exportpath
200
205
run : echo "::set-output name=path::${JAVA_HOME}"
201
206
- 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
204
210
- 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 }}
209
212
- name : Upload reports (if build failed)
210
213
uses : actions/upload-artifact@v2
211
214
if : failure()
212
215
with :
213
216
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
-
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
-
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/'
0 commit comments