162 lines (160 loc) · 5.48 KB
/
main.yml
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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * 1"
jobs:
hotspot-ea:
name: HotSpot (EA)
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install JDK and build project
run: |
. ./.github/scripts/install-jdk.sh --feature ea --os linux-x64
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED"
./mvnw verify -Pjava17 -Dnet.bytebuddy.experimental=true
continue-on-error: true
hotspot-supported:
name: HotSpot (supported)
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macOS-10.15, windows-2019]
java: [8, 11, 16]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: x64
- name: Build project
run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }}
hotspot-32:
name: HotSpot (32 bit)
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019]
java: [8]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: x86
- name: Build project
run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }}
hotspot-unsupported:
name: HotSpot (unsupported)
strategy:
fail-fast: false
matrix:
java: [7, 9, 10, 12, 13, 14, 15]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: x64
- name: Build project
run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }}
hotspot-legacy:
name: HotSpot (legacy)
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.6
architecture: x64
- name: Build project
run: ./mvnw -s .mvn/nossl.settings.xml verify -Pintegration -Pjava6
openj9-supported:
name: OpenJ9 (supported)
strategy:
fail-fast: false
matrix:
java: [8, 11, 13]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install JDK and build project
run: |
. ./.github/scripts/install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/openjdk${{ matrix.java }}?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal"
./mvnw verify -Pintegration -Pjava${{ matrix.java }}
coverage:
name: Coverage
runs-on: ubuntu-18.04
needs: [hotspot-ea, hotspot-supported, hotspot-unsupported, hotspot-legacy, openj9-supported]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v1
with:
java-version: 8
architecture: x64
- name: Build project
run: ./mvnw jacoco:prepare-agent verify jacoco:report coveralls:report -DrepoToken=${{ secrets.coveralls }} -Pintegration
release:
name: Release new version
runs-on: ubuntu-18.04
needs: [coverage]
if: github.event_name == 'push' && startsWith(github.event.head_commit.message, '[release]')
steps:
- uses: actions/setup-java@v1
with:
java-version: 8
architecture: x64
- name: Publish new version
run: |
export GPG_TTY=$(tty)
echo "${{ secrets.gpg_secret }}" | gpg --batch --import
git clone ${{ github.repositoryUrl }} .
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
./mvnw -B -x -s .mvn/release.settings.xml release:prepare release:perform -Drepository.url=https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git -Dcentral.username=raphw -Dcentral.password=${{ secrets.central_password }} -Dgpg.passphrase=${{ secrets.gpg_passphrase }} -Dgpg.keyname=B4AC8CDC141AF0AE468D16921DA784CCB5C46DD5 -Dgradle.key=${{ secrets.gradle_key }} -Dgradle.secret=${{ secrets.gradle_secret }}