mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-27 14:30:16 +00:00
110 lines
3.2 KiB
YAML
110 lines
3.2 KiB
YAML
|
# The main CI of Hibernate ORM is https://ci.hibernate.org/job/hibernate-orm-6.0-h2-main/.
|
||
|
# However, Hibernate ORM builds run on GitHub actions regularly
|
||
|
# to check that it still works and can be used in GitHub forks.
|
||
|
# See https://docs.github.com/en/free-pro-team@latest/actions
|
||
|
# for more information about GitHub actions.
|
||
|
|
||
|
name: Hibernate ORM contributor build
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- 'master'
|
||
|
- 'wip/6.0'
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- 'master'
|
||
|
- 'wip/6.0'
|
||
|
jobs:
|
||
|
build:
|
||
|
name: Build and test on Java 8 against a wide range of DBs
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
include:
|
||
|
- rdbms: h2
|
||
|
jdk: 8
|
||
|
- rdbms: derby
|
||
|
jdk: 8
|
||
|
- rdbms: mariadb
|
||
|
jdk: 8
|
||
|
- rdbms: postgresql
|
||
|
jdk: 8
|
||
|
- rdbms: oracle
|
||
|
jdk: 8
|
||
|
- rdbms: db2
|
||
|
jdk: 8
|
||
|
- rdbms: mssql
|
||
|
jdk: 8
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- name: Set up Java 8
|
||
|
uses: actions/setup-java@v1
|
||
|
with:
|
||
|
java-version: 1.8
|
||
|
- name: Get year/month for cache key
|
||
|
id: get-date
|
||
|
run: |
|
||
|
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
|
||
|
shell: bash
|
||
|
- name: Cache Maven local repository
|
||
|
uses: actions/cache@v2
|
||
|
id: cache-maven
|
||
|
with:
|
||
|
path: |
|
||
|
~/.m2/repository
|
||
|
~/.gradle/caches/
|
||
|
~/.gradle/wrapper/
|
||
|
# refresh cache every month to avoid unlimited growth
|
||
|
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
|
||
|
- name: Run build script
|
||
|
env:
|
||
|
RDBMS: ${{ matrix.rdbms }}
|
||
|
JDK: ${{ matrix.jdk }}
|
||
|
run: ./ci/build-guthub.sh
|
||
|
shell: bash
|
||
|
- name: Upload test reports (if Gradle failed)
|
||
|
uses: actions/upload-artifact@v2
|
||
|
if: failure()
|
||
|
with:
|
||
|
name: test-reports-java8
|
||
|
path: './**/target/reports/tests/test/'
|
||
|
- name: Omit produced artifacts from build cache
|
||
|
run: ./ci/before-cache.sh
|
||
|
build11:
|
||
|
name: Build and test on Java 11
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- name: Set up Java 11
|
||
|
uses: actions/setup-java@v1
|
||
|
with:
|
||
|
java-version: 11
|
||
|
- name: Get year/month for cache key
|
||
|
id: get-date
|
||
|
run: |
|
||
|
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
|
||
|
shell: bash
|
||
|
- name: Cache Maven local repository
|
||
|
uses: actions/cache@v2
|
||
|
id: cache-maven
|
||
|
with:
|
||
|
path: |
|
||
|
~/.m2/repository
|
||
|
~/.gradle/caches/
|
||
|
~/.gradle/wrapper/
|
||
|
# refresh cache every month to avoid unlimited growth
|
||
|
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
|
||
|
- name: Run build script
|
||
|
env:
|
||
|
JDK: 11
|
||
|
run: ./ci/build-guthub.sh
|
||
|
shell: bash
|
||
|
- name: Upload test reports (if Gradle failed)
|
||
|
uses: actions/upload-artifact@v2
|
||
|
if: failure()
|
||
|
with:
|
||
|
name: test-reports-java11
|
||
|
path: './**/target/reports/tests/test/'
|
||
|
- name: Omit produced artifacts from build cache
|
||
|
run: ./ci/before-cache.sh
|