Repository navigation
242 lines (209 loc) · 8.97 KB
/
Copy pathci-build.yml
File metadata and controls
242 lines (209 loc) · 8.97 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
name: Build project
on:
push:
branches: [ main ]
schedule:
- cron: '30 3 * * 1' # At 03:30 on Monday, every Monday.
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
# Cancel running jobs when a new push happens to the same branch as otherwise it will
# tie up too many resources without providing much value.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- setup: centos6-x86_64
docker-compose-run: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build"
docker-bake-args: "-f docker-compose.centos-6.yaml -f docker-compose.centos-6.18.yaml"
- setup: debian7-x86_64
docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run build-dynamic-only"
docker-bake-args: "-f docker-compose.debian.yaml -f docker-compose.debian-7.18.yaml"
- setup: centos7-aarch64
docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-build"
docker-bake-args: "-f docker-compose.centos-7.yaml"
- setup: al2023-x86_64-aws_lc
docker-compose-run: "-f docker/docker-compose.al2023.yaml run build"
docker-bake-args: "-f docker-compose.al2023.yaml"
name: ${{ matrix.setup }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
# Cache .m2/repository
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
continue-on-error: true
with:
path: ~/.m2/repository
key: build-${{ matrix.setup }}-m2-repository-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
build-${{ matrix.setup }}-m2-repository-cache-
- name: Extract OpenSSL version from pom.xml
run: echo "OPENSSL_VERSION=$(./mvnw -q -Dexpression=opensslVersion -DforceStdout -N help:evaluate --no-transfer-progress)" >> $GITHUB_ENV
- name: Extract OpenSSL SHA256 from pom.xml
run: echo "OPENSSL_SHA256=$(./mvnw -q -Dexpression=opensslSha256 -DforceStdout -N help:evaluate --no-transfer-progress)" >> $GITHUB_ENV
- name: Build docker image
working-directory: docker
env:
BUILDX_BAKE_ENTITLEMENTS_FS: "0"
run: docker buildx bake ${{ matrix.docker-bake-args }} --load --set "*.cache-from=type=gha,scope=${{ matrix.setup }}" --set "*.cache-to=type=gha,scope=${{ matrix.setup }},mode=max"
- name: Build project
run: docker compose ${{ matrix.docker-compose-run }} | tee build.output
- name: Checking for test failures
run: ./.github/scripts/check_build_result.sh build.output
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: build-${{ matrix.setup }}-jars
path: |
**/target/*.jar
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ failure() }}
with:
name: build-${{ matrix.setup }}-target
path: |
**/target/surefire-reports/
**/hs_err*.log
build-windows:
runs-on: windows-2022
name: windows-x86_64
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up JDK 8
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1
with:
java-version: 8
distribution: zulu
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Configuring Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: x86_amd64
- name: Install tools
uses: crazy-max/ghaction-chocolatey@2526f467ccbd337d307fe179959cabbeca0bc8c0 # v3.4.0
with:
args: install ninja nasm
# Cache .m2/repository
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
continue-on-error: true
with:
path: ~/.m2/repository
key: build-windows-m2-repository-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
build-windows-m2-repository-cache-
- name: Build netty-tcnative-boringssl-static
run: ./mvnw.cmd --file pom.xml -am -pl boringssl-static clean package
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ always() }}
with:
name: build-windows-jars
path: |
**/target/*.jar
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ failure() }}
with:
name: build-windows-target
path: |
**/target/surefire-reports/
**/hs_err*.log
# Same verification as ci-pr.yml, on the same legs. See docs/musl-compatibility.md.
musl-verify:
needs: build
strategy:
fail-fast: false
matrix:
include:
# Both runners are pinned: there is no ubuntu-latest-arm, so pairing ubuntu-latest with
# a pinned arm label would drift apart as soon as ubuntu-latest moves on.
- setup: alpine-x86_64
os: ubuntu-24.04
jars: build-centos6-x86_64-jars
variant: bare
extra-pkgs: ""
drop-elftools: "1"
build-service: runtime-setup
run-service: verify
- setup: alpine-aarch64
os: ubuntu-24.04-arm
jars: build-centos7-aarch64-jars
variant: bare
extra-pkgs: ""
drop-elftools: "1"
build-service: runtime-setup
run-service: verify
# The invariant leg: an Alpine JDK that ships no `libgcc` package of its own, so
# `apk del .elftools` really does leave libgcc absent. eclipse-temurin's JDK depends on
# libgcc, so the bare legs above cannot prove the artifact loads without it.
- setup: alpine-x86_64-nolibgcc
os: ubuntu-24.04
jars: build-centos6-x86_64-jars
variant: nolibgcc
extra-pkgs: ""
drop-elftools: "1"
jdk-image: amazoncorretto:21-alpine
build-service: runtime-setup
run-service: verify
- setup: alpine-aarch64-nolibgcc
os: ubuntu-24.04-arm
jars: build-centos7-aarch64-jars
variant: nolibgcc
extra-pkgs: ""
drop-elftools: "1"
jdk-image: amazoncorretto:21-alpine
build-service: runtime-setup
run-service: verify
- setup: alpine-x86_64-gcompat
os: ubuntu-24.04
jars: build-centos6-x86_64-jars
variant: gcompat
extra-pkgs: gcompat
drop-elftools: "0"
build-service: runtime-setup
run-service: verify
- setup: alpine-aarch64-gcompat
os: ubuntu-24.04-arm
jars: build-centos7-aarch64-jars
variant: gcompat
extra-pkgs: gcompat
drop-elftools: "0"
build-service: runtime-setup
run-service: verify
- setup: glibc-control-x86_64
os: ubuntu-24.04
jars: build-centos6-x86_64-jars
variant: glibc-control
extra-pkgs: ""
drop-elftools: "0"
build-service: control-runtime-setup
run-service: control-verify
runs-on: ${{ matrix.os }}
name: musl-verify ${{ matrix.setup }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ matrix.jars }}
path: musl-verify-jars
- name: Build verification image
env:
MUSL_VARIANT: ${{ matrix.variant }}
MUSL_EXTRA_PKGS: ${{ matrix.extra-pkgs }}
MUSL_JDK_IMAGE: ${{ matrix.jdk-image }}
run: docker compose -f docker/docker-compose.alpine.yaml build ${{ matrix.build-service }}
- name: Verify the artifact under ${{ matrix.variant }}
env:
MUSL_VARIANT: ${{ matrix.variant }}
MUSL_EXTRA_PKGS: ${{ matrix.extra-pkgs }}
MUSL_DROP_ELFTOOLS: ${{ matrix.drop-elftools }}
MUSL_JDK_IMAGE: ${{ matrix.jdk-image }}
MUSL_JARS_DIR: musl-verify-jars
run: docker compose -f docker/docker-compose.alpine.yaml run --rm ${{ matrix.run-service }}