-
Notifications
You must be signed in to change notification settings - Fork 90
175 lines (168 loc) · 5.97 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: "Blaze-Persistence CI"
on: [push, pull_request]
env:
MAVEN_SKIP_RC: true
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
concurrency:
# Consider that two builds are in the same concurrency group (cannot run concurrently)
# if they use the same workflow and are about the same branch ("ref") or pull request.
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
# Cancel previous builds in the same concurrency group even if they are in process
# for pull requests or pushes to forks (not the upstream repository).
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'Blazebit/blaze-persistence' }}
jobs:
build:
name: Test
runs-on: ubuntu-latest
# We want to know the test results of all matrix entries
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
################################################
# hibernate-6.6
################################################
- rdbms: h2
provider: hibernate-6.6
jdk: 17
native: true
- rdbms: mysql
provider: hibernate-6.6
jdk: 17
native: true
- rdbms: postgresql
provider: hibernate-6.6
jdk: 17
native: true
- rdbms: oracle
provider: hibernate-6.6
jdk: 17
# native: true
- rdbms: db2
provider: hibernate-6.6
jdk: 17
# native: true
- rdbms: mssql
provider: hibernate-6.6
jdk: 17
native: true
################################################
# Test different spring-data and deltaspike versions
################################################
- rdbms: h2
provider: hibernate-6.6
jdk: 17
spring-data: spring-data-3.3.x
################################################
# A Hibernate 6.6 profile that also runs the entity-view-annotation-processor
################################################
- rdbms: postgresql
provider: hibernate-apt
jdk: 17
################################################
# eclipselink
################################################
- rdbms: h2
provider: eclipselink
jdk: 17
################################################
# hibernate-6.2
################################################
- rdbms: h2
provider: hibernate-6.2
jdk: 17
spring-data: spring-data-3.1.x
################################################
# hibernate-6.4
################################################
- rdbms: h2
provider: hibernate-6.4
jdk: 17
spring-data: spring-data-3.2.x
################################################
# LTS JDKs
################################################
- rdbms: h2
provider: hibernate-6.6
jdk: 17
build-jdk: 17
################################################
# Latest GA JDK
################################################
- rdbms: h2
provider: hibernate-6.6
jdk: 21
- rdbms: h2
provider: hibernate-6.6
jdk: 21
build-jdk: 21
################################################
# Early access JDKs
################################################
# - rdbms: h2
# provider: hibernate-6.6
# jdk: 22-ea
# - rdbms: h2
# provider: hibernate-6.6
# jdk: 22-ea
# build-jdk: 22-ea
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
# /etc/hosts file needs to be updated as a workaround for
# https://github.com/actions/virtual-environments/issues/3185
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- uses: graalvm/setup-graalvm@v1
if: ${{ matrix.native }}
with:
java-version: '17'
distribution: 'mandrel'
- name: Set up Requested JDK
uses: actions/setup-java@v3
if: ${{ !endsWith(matrix.jdk, '-ea') && matrix.jdk != '21' }}
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
- name: Set up EA JDK
uses: actions/setup-java@v3
if: ${{ endsWith(matrix.jdk, '-ea') || matrix.jdk == '21' }}
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'
- 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
# refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Set up Maven
run: ./mvnw -v
- name: Run build script
env:
RDBMS: ${{ matrix.rdbms }}
JPAPROVIDER: ${{ matrix.provider }}
JDK: ${{ matrix.jdk }}
BUILD_JDK: ${{ matrix.build-jdk }}
NATIVE: ${{ matrix.native }}
DELTASPIKE: ${{ matrix.deltaspike }}
SPRING_DATA: ${{ matrix.spring-data }}
run: ./ci/build-github.sh
shell: bash
- name: Upload test reports (if Maven failed)
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-${{ matrix.provider }}-${{ matrix.rdbms }}-jdk${{ matrix.jdk }}-build-jdk${{ matrix.build-jdk }}-${{ matrix.spring-data }}
path: './**/*-reports/'
- name: Omit produced artifacts from build cache
run: ./ci/before-cache.sh