Skip to content

Commit b156bdb

Browse files
committed
Update GitHub actions for wip/2.3
1 parent f564716 commit b156bdb

File tree

6 files changed

+29
-283
lines changed

6 files changed

+29
-283
lines changed

.github/workflows/build.yml

+17-73
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
# GitHub actions for branch testing the latest Hibernate ORM 6.5 snapshot
12
name: Hibernate Reactive CI
23

34
on:
45
push:
56
branches:
6-
- main
7-
tags:
8-
- '2.*'
7+
- wip/2.3
98
pull_request:
10-
branches: main
9+
branches: wip/2.3
1110

1211
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
1312
concurrency:
@@ -24,6 +23,7 @@ jobs:
2423
runs-on: ubuntu-latest
2524
strategy:
2625
matrix:
26+
orm-version: [ '6.5.3-SNAPSHOT' ]
2727
example: [ 'session-example', 'native-sql-example' ]
2828
db: [ 'MySQL', 'PostgreSQL' ]
2929
exclude:
@@ -67,8 +67,7 @@ jobs:
6767
- uses: actions/checkout@v2
6868
- name: Get year/month for cache key
6969
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")"
7271
shell: bash
7372
- name: Cache Gradle downloads
7473
uses: actions/cache@v2
@@ -85,6 +84,8 @@ jobs:
8584
with:
8685
distribution: 'temurin'
8786
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
8889
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
8990
run: ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
9091
- name: Upload reports (if build failed)
@@ -99,6 +100,7 @@ jobs:
99100
runs-on: ubuntu-latest
100101
strategy:
101102
matrix:
103+
orm-version: [ '6.5.3-SNAPSHOT' ]
102104
db: [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
103105
steps:
104106
- uses: actions/checkout@v2
@@ -122,8 +124,10 @@ jobs:
122124
with:
123125
distribution: 'temurin'
124126
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
125129
- 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
127131
- name: Upload reports (if build failed)
128132
uses: actions/upload-artifact@v2
129133
if: failure()
@@ -137,6 +141,7 @@ jobs:
137141
strategy:
138142
fail-fast: false
139143
matrix:
144+
orm-version: [ '6.5.3-SNAPSHOT' ]
140145
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
141146
# https://api.adoptium.net/v3/info/available_releases
142147
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -198,75 +203,14 @@ jobs:
198203
id: mainjdk-exportpath
199204
run: echo "::set-output name=path::${JAVA_HOME}"
200205
- 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
203209
- 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 }}
208211
- name: Upload reports (if build failed)
209212
uses: actions/upload-artifact@v2
210213
if: failure()
211214
with:
212215
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-
uses: actions/[email protected]
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-
uses: actions/[email protected]
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/'

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

-105
This file was deleted.

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

-103
This file was deleted.

examples/native-sql-example/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ buildscript {
77
// Useful for local development, it should be disabled otherwise
88
mavenLocal()
99
}
10+
// Optional: Enables snapshots repository
11+
// Example: ./gradlew build -PenableSonatypeOpenSourceSnapshotsRep
12+
if ( project.hasProperty('enableSonatypeOpenSourceSnapshotsRep') ) {
13+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
14+
}
1015
mavenCentral()
1116
}
1217
}

examples/session-example/build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ buildscript {
77
// Useful for local development, it should be disabled otherwise
88
mavenLocal()
99
}
10+
// Optional: Enables snapshots repository
11+
// Example: ./gradlew build -PenableSonatypeOpenSourceSnapshotsRep
12+
if ( project.hasProperty('enableSonatypeOpenSourceSnapshotsRep') ) {
13+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
14+
}
1015
mavenCentral()
1116
}
1217
}

0 commit comments

Comments
 (0)