1+ # The main CI of Hibernate ORM is https://ci.hibernate.org/job/hibernate-orm-6.0-h2-main/.
2+ # However, Hibernate ORM builds run on GitHub actions regularly
3+ # to check that it still works and can be used in GitHub forks.
4+ # See https://docs.github.com/en/free-pro-team@latest/actions
5+ # for more information about GitHub actions.
6+
7+ name : Hibernate ORM build
8+
9+ on :
10+ push :
11+ branches :
12+ - ' 5.4'
13+ pull_request :
14+ branches :
15+ - ' 5.4'
16+ jobs :
17+ build :
18+ name : Java 8
19+ runs-on : ubuntu-latest
20+ # We want to know the test results of all matrix entries
21+ continue-on-error : true
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ # When GitHub Actions supports it: https://github.com/actions/toolkit/issues/399
26+ # We will use the experimental flag as indicator whether a failure should cause a workflow failure
27+ include :
28+ - rdbms : h2
29+ experimental : false
30+ # - rdbms: derby
31+ # experimental: true
32+ # - rdbms: mariadb
33+ # experimental: true
34+ - rdbms : postgresql
35+ experimental : true
36+ # - rdbms: oracle
37+ # experimental: true
38+ # - rdbms: db2
39+ # experimental: true
40+ # - rdbms: mssql
41+ # experimental: true
42+ steps :
43+ - uses : actions/checkout@v2
44+ - name : Reclaim Disk Space
45+ run : .github/ci-prerequisites.sh
46+ - name : Set up Java 8
47+ uses : actions/setup-java@v1
48+ with :
49+ java-version : 1.8
50+ - name : Get year/month for cache key
51+ id : get-date
52+ run : |
53+ echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
54+ shell : bash
55+ - name : Cache Maven local repository
56+ uses : actions/cache@v2
57+ id : cache-maven
58+ with :
59+ path : |
60+ ~/.m2/repository
61+ ~/.gradle/caches/
62+ ~/.gradle/wrapper/
63+ # refresh cache every month to avoid unlimited growth
64+ key : maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
65+ - name : Run build script
66+ env :
67+ RDBMS : ${{ matrix.rdbms }}
68+ run : ./ci/build-github.sh
69+ shell : bash
70+ - name : Upload test reports (if Gradle failed)
71+ uses : actions/upload-artifact@v2
72+ if : failure()
73+ with :
74+ name : test-reports-java8-${{ matrix.rdbms }}
75+ path : |
76+ ./**/target/reports/tests/
77+ ./**/target/reports/checkstyle/
78+ - name : Omit produced artifacts from build cache
79+ run : ./ci/before-cache.sh
80+ build11 :
81+ name : Java 11
82+ runs-on : ubuntu-latest
83+ # We want to know the test results of all matrix entries
84+ continue-on-error : true
85+ steps :
86+ - uses : actions/checkout@v2
87+ - name : Set up Java 11
88+ uses : actions/setup-java@v1
89+ with :
90+ java-version : 11
91+ - name : Get year/month for cache key
92+ id : get-date
93+ run : |
94+ echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
95+ shell : bash
96+ - name : Cache Maven local repository
97+ uses : actions/cache@v2
98+ id : cache-maven
99+ with :
100+ path : |
101+ ~/.m2/repository
102+ ~/.gradle/caches/
103+ ~/.gradle/wrapper/
104+ # refresh cache every month to avoid unlimited growth
105+ key : maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
106+ - name : Run build script
107+ run : ./ci/build-github.sh
108+ shell : bash
109+ - name : Upload test reports (if Gradle failed)
110+ uses : actions/upload-artifact@v2
111+ if : failure()
112+ with :
113+ name : test-reports-java11
114+ path : |
115+ ./**/target/reports/tests/
116+ ./**/target/reports/checkstyle/
117+ - name : Omit produced artifacts from build cache
118+ run : ./ci/before-cache.sh
0 commit comments