@@ -155,9 +155,9 @@ jobs:
155
155
matrix :
156
156
include :
157
157
- rdbms : oracle_atps
158
- - rdbms : oracle_db19c
159
- - rdbms : oracle_db21c
160
- - rdbms : oracle_db23c
158
+ # - rdbms: oracle_db19c
159
+ # - rdbms: oracle_db21c
160
+ # - rdbms: oracle_db23c
161
161
steps :
162
162
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
163
163
with :
@@ -249,6 +249,122 @@ jobs:
249
249
- name : Omit produced artifacts from build cache
250
250
run : ./ci/before-cache.sh
251
251
252
+ # Job for builds on Oracle TP infrastructure.
253
+ # This is untrusted, even for pushes, see below.
254
+ otp :
255
+ permissions :
256
+ contents : read
257
+ name : GraalVM 21 - ${{matrix.rdbms}}
258
+ runs-on : [ self-hosted, Linux, X64, OracleTestPilot ]
259
+ strategy :
260
+ fail-fast : false
261
+ matrix :
262
+ include :
263
+ # - rdbms: autonomous-transaction-processing-serverless
264
+ - rdbms : base-database-service-19c
265
+ - rdbms : base-database-service-21c
266
+ - rdbms : base-database-service-23ai
267
+ steps :
268
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
269
+ with :
270
+ persist-credentials : false
271
+ - name : Set up Java 21
272
+ uses : graalvm/setup-graalvm@aafbedb8d382ed0ca6167d3a051415f20c859274 # v1.2.8
273
+ with :
274
+ distribution : ' graalvm'
275
+ java-version : ' 21'
276
+ - name : Generate cache key
277
+ id : cache-key
278
+ run : |
279
+ CURRENT_BRANCH="${{ github.repository != 'hibernate/hibernate-orm' && 'fork' || github.base_ref || github.ref_name }}"
280
+ CURRENT_MONTH=$(/bin/date -u "+%Y-%m")
281
+ CURRENT_DAY=$(/bin/date -u "+%d")
282
+ ROOT_CACHE_KEY="buildtool-cache-atlas"
283
+ echo "buildtool-monthly-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}" >> $GITHUB_OUTPUT
284
+ echo "buildtool-monthly-branch-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
285
+ echo "buildtool-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}-${CURRENT_DAY}" >> $GITHUB_OUTPUT
286
+ - name : Cache Maven/Gradle Dependency/Dist Caches
287
+ id : cache-maven
288
+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
289
+ # if it's not a pull request, we restore and save the cache
290
+ if : github.event_name != 'pull_request'
291
+ with :
292
+ path : |
293
+ ~/.m2/repository/
294
+ ~/.m2/wrapper/
295
+ ~/.gradle/caches/modules-2
296
+ ~/.gradle/wrapper/
297
+ # A new cache will be stored daily. After that first store of the day, cache save actions will fail because the cache is immutable but it's not a problem.
298
+ # The whole cache is dropped monthly to prevent unlimited growth.
299
+ # The cache is per branch but in case we don't find a branch for a given branch, we will get a cache from another branch.
300
+ key : ${{ steps.cache-key.outputs.buildtool-cache-key }}
301
+ restore-keys : |
302
+ ${{ steps.cache-key.outputs.buildtool-monthly-branch-cache-key }}-
303
+ ${{ steps.cache-key.outputs.buildtool-monthly-cache-key }}-
304
+ - name : Restore Maven/Gradle Dependency/Dist Caches
305
+ uses : actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
306
+ # if it is a pull request, we restore the cache but we don't save it
307
+ if : github.event_name == 'pull_request'
308
+ with :
309
+ path : |
310
+ ~/.m2/repository/
311
+ ~/.m2/wrapper/
312
+ ~/.gradle/caches/modules-2
313
+ ~/.gradle/wrapper/
314
+ key : ${{ steps.cache-key.outputs.buildtool-cache-key }}
315
+ restore-keys : |
316
+ ${{ steps.cache-key.outputs.buildtool-monthly-branch-cache-key }}-
317
+ ${{ steps.cache-key.outputs.buildtool-monthly-cache-key }}-
318
+
319
+ - id : create_database
320
+ uses :
loiclefevre/[email protected]
321
+ with :
322
+ oci-service : ${{ matrix.rdbms }}
323
+ action : create
324
+ user : hibernate_orm_test
325
+
326
+ - name : Run build script
327
+ env :
328
+ RDBMS : ${{ matrix.rdbms }}
329
+ RUNID : ${{ github.run_number }}
330
+ TESTPILOT_CONNECTION_STRING_SUFFIX : ${{ steps.create_database.outputs.connection_string_suffix }}
331
+ TESTPILOT_PASSWORD : ${{ steps.create_database.outputs.database_password }}
332
+ API_HOST : " "
333
+ TESTPILOT_CLIENT_ID : " "
334
+ TESTPILOT_TOKEN : " "
335
+ # Needed for TFO (TCP fast open)
336
+ LD_PRELOAD : /home/ubuntu/libtfojdbc1.so
337
+ LD_LIBRARY_PATH : /home/ubuntu
338
+ run : ./ci/build-github.sh
339
+ shell : bash
340
+
341
+ -
uses :
loiclefevre/[email protected]
342
+ if : always()
343
+ with :
344
+ oci-service : ${{ matrix.rdbms }}
345
+ action : delete
346
+ user : hibernate_orm_test
347
+
348
+ # Upload build scan data.
349
+ # The actual publishing must be done in a separate job (see ci-report.yml).
350
+ # We don't write to the remote cache as that would be unsafe.
351
+ # That's even on push, because we do not trust Atlas runners to hold secrets: they are shared infrastructure.
352
+ - name : Upload GitHub Actions artifact for the Develocity build scan
353
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
354
+ if : " ${{ !cancelled() }}"
355
+ with :
356
+ name : build-scan-data-${{ matrix.rdbms }}
357
+ path : ~/.gradle/build-scan-data
358
+ - name : Upload test reports (if Gradle failed)
359
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
360
+ if : failure()
361
+ with :
362
+ name : test-reports-java11-${{ matrix.rdbms }}
363
+ path : |
364
+ ./**/target/reports/tests/
365
+ - name : Omit produced artifacts from build cache
366
+ run : ./ci/before-cache.sh
367
+
252
368
# Static code analysis check
253
369
format_checks :
254
370
permissions :
0 commit comments