-
-
Notifications
You must be signed in to change notification settings - Fork 93
371 lines (338 loc) · 14.5 KB
/
Copy pathmake.yml
File metadata and controls
371 lines (338 loc) · 14.5 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
name: Make
on:
schedule:
- cron: '0 0 1 * *'
push:
branches:
- "**"
pull_request:
branches:
- master
- main
workflow_dispatch:
inputs:
enabled_targets:
description: >-
Comma-separated list of targets to run (leave empty for the default set).
Valid IDs: linux-x64, linux-arm64, windows-x64, macos-arm64,
macos-x64, linux-arm32, linux-powerpc64-be, freebsd, solaris,
netbsd, dragonflybsd
default: ""
type: string
debug:
description: Verbose install tracing (CI_DEBUG=1 in install-fpc-lazarus.sh)
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FPC_VERSION: 3.2.2
LAZARUS_BRANCH: lazarus_4_4
LAZARUS_REPO: https://github.com/fpc/Lazarus.git
MAKE_BUILD_BACKEND: fpc
# make.pas package build scope: 'all' compiles every discovered package (catches
# a package that fails on the target even if unused); 'required' only compiles
# the projects' dependency closure. Override per job below, like MAKE_BUILD_BACKEND.
MAKE_PACKAGE_SCOPE: required
# Space/comma/semicolon-separated conditional defines passed to every compile.
# fpc backend: -dNAME per compile. lazbuild backend: injected into fpc.cfg so
# the project and every recursive package rebuild inherit them. Override per job.
# Examples:
# single: MAKE_DEFINES: WITH_GTK2_IM
# multiple: MAKE_DEFINES: 'WITH_GTK2_IM DEBUG_LOG USE_CTHREADS'
MAKE_DEFINES: ''
# When true, make.pas builds and runs console benchmarks after the test suite.
# Override per job below, like MAKE_BUILD_BACKEND.
MAKE_RUN_BENCHMARK: false
# When true, make.pas builds (never runs) LCL/GUI projects. Only meaningful under
# the lazbuild backend - the fpc backend has no widgetset and always skips them.
# Set false to opt out of the per-platform GUI widgetset toolchain (GTK2/X11 on
# Unix, cocoa on macOS). Override per job below, like MAKE_BUILD_BACKEND.
MAKE_LAZBUILD_GUI: false
# Set by the workflow_dispatch "debug" toggle; '1' enables `set -x` tracing in
# install-fpc-lazarus.sh, '0' otherwise. Forwarded into the sandboxed jobs below.
CI_DEBUG: ${{ github.event.inputs.debug == 'true' && '1' || '0' }}
jobs:
setup:
name: Resolve target list
runs-on: ubuntu-latest
outputs:
enabled_targets: ${{ steps.resolve.outputs.enabled_targets }}
target_map: ${{ steps.resolve.outputs.target_map }}
steps:
- uses: actions/checkout@v7
- name: Resolve enabled targets
id: resolve
shell: bash
env:
INPUT_TARGETS: ${{ github.event.inputs.enabled_targets }}
run: bash .github/workflows/ci/resolve-targets.sh
# Native targets are standalone jobs (one per target) rather than a single
# matrix job, so each can carry its own env overrides and so a single-target
# workflow_dispatch cleanly skips the rest. Like the QEMU/VM jobs below, they
# gate via `if: contains(... enabled_targets ...)` and resolve runner/fpc_target
# from target_map. Keep `name:` literal: an if-skipped job renders an
# unevaluated name expression in the UI, so it cannot be sourced from JSON.
linux-x64:
name: "Native: Linux x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-x64,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64'].fpc_tarball_target }}
run: bash .github/workflows/ci/native-build.sh
linux-arm64:
name: "Native: Linux AArch64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-arm64,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64'].fpc_tarball_target }}
run: bash .github/workflows/ci/native-build.sh
# Scalar-dispatch legs: same native targets, but MAKE_DEFINES
# forces HASHLIB_FORCE_SCALAR so the SIMD-bearing
# arches exercise the scalar fallbacks instead.
linux-x64-scalar:
name: "Native: Linux x86_64 (FORCE_SCALAR)"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64-scalar'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-x64-scalar,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64-scalar'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-x64-scalar'].fpc_tarball_target }}
MAKE_DEFINES: 'HASHLIB_FORCE_SCALAR'
run: bash .github/workflows/ci/native-build.sh
linux-arm64-scalar:
name: "Native: Linux AArch64 (FORCE_SCALAR)"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64-scalar'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-arm64-scalar,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64-scalar'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm64-scalar'].fpc_tarball_target }}
MAKE_DEFINES: 'HASHLIB_FORCE_SCALAR'
run: bash .github/workflows/ci/native-build.sh
windows-x64:
name: "Native: Windows x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['windows-x64'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',windows-x64,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['windows-x64'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['windows-x64'].fpc_tarball_target }}
run: bash .github/workflows/ci/native-build.sh
macos-arm64:
name: "Native: macOS AArch64 (Apple Silicon)"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['macos-arm64'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',macos-arm64,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['macos-arm64'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['macos-arm64'].fpc_tarball_target }}
run: bash .github/workflows/ci/native-build.sh
macos-x64:
name: "Native: macOS x86_64 (Intel)"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['macos-x64'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',macos-x64,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['macos-x64'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['macos-x64'].fpc_tarball_target }}
run: bash .github/workflows/ci/native-build.sh
linux-arm32:
name: "QEMU: Linux ARMv7"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm32'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-arm32,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build (ARMv7 via QEMU user-mode)
uses: uraimo/run-on-arch-action@v3
with:
arch: armv7
distro: ubuntu24.04
env: |
FPC_VERSION: ${{ env.FPC_VERSION }}
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm32'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-arm32'].fpc_tarball_target }}
LAZARUS_BRANCH: ${{ env.LAZARUS_BRANCH }}
LAZARUS_REPO: ${{ env.LAZARUS_REPO }}
MAKE_BUILD_BACKEND: ${{ env.MAKE_BUILD_BACKEND }}
MAKE_PACKAGE_SCOPE: ${{ env.MAKE_PACKAGE_SCOPE }}
MAKE_RUN_BENCHMARK: ${{ env.MAKE_RUN_BENCHMARK }}
MAKE_LAZBUILD_GUI: ${{ env.MAKE_LAZBUILD_GUI }}
CI_DEBUG: ${{ env.CI_DEBUG }}
run: bash .github/workflows/ci/arm32-run.sh
linux-powerpc64-be:
name: "QEMU: Linux PowerPC64 BE"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['linux-powerpc64-be'].runner }}
timeout-minutes: 180
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-powerpc64-be,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Set up QEMU (ppc64 big-endian)
run: bash .github/workflows/ci/ppc64-qemu-setup.sh
- name: Build (PowerPC64 BE via QEMU)
env:
FPC_VERSION: ${{ env.FPC_VERSION }}
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-powerpc64-be'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['linux-powerpc64-be'].fpc_tarball_target }}
MAKE_BUILD_BACKEND: ${{ env.MAKE_BUILD_BACKEND }}
MAKE_PACKAGE_SCOPE: ${{ env.MAKE_PACKAGE_SCOPE }}
MAKE_RUN_BENCHMARK: ${{ env.MAKE_RUN_BENCHMARK }}
MAKE_LAZBUILD_GUI: ${{ env.MAKE_LAZBUILD_GUI }}
run: bash .github/workflows/ci/ppc64-be-build.sh
freebsd:
name: "VM: FreeBSD x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['freebsd'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',freebsd,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build (FreeBSD x86_64)
uses: vmactions/freebsd-vm@v1
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['freebsd'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['freebsd'].fpc_tarball_target }}
FREEBSD_INSTALL_MODE: interim
with:
envs: FPC_VERSION FPC_TARGET FPC_TARBALL_TARGET LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE MAKE_RUN_BENCHMARK MAKE_LAZBUILD_GUI FREEBSD_INSTALL_MODE CI_DEBUG
release: "15.0"
usesh: true
prepare: sh .github/workflows/ci/vm-freebsd-prepare.sh
run: bash .github/workflows/ci/vm-freebsd-run.sh
netbsd:
name: "VM: NetBSD x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['netbsd'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',netbsd,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build (NetBSD x86_64)
uses: vmactions/netbsd-vm@v1
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['netbsd'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['netbsd'].fpc_tarball_target }}
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE MAKE_RUN_BENCHMARK MAKE_LAZBUILD_GUI FPC_TARGET FPC_TARBALL_TARGET CI_DEBUG
prepare: sh .github/workflows/ci/vm-netbsd-prepare.sh
run: bash .github/workflows/ci/vm-run-shared.sh
dragonflybsd:
name: "VM: DragonFlyBSD x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['dragonflybsd'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',dragonflybsd,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build (DragonFlyBSD x86_64)
uses: vmactions/dragonflybsd-vm@v1
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['dragonflybsd'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['dragonflybsd'].fpc_tarball_target }}
LD_LIBRARY_PATH_EXTRA: /usr/local/lib
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE MAKE_RUN_BENCHMARK MAKE_LAZBUILD_GUI FPC_TARGET FPC_TARBALL_TARGET LD_LIBRARY_PATH_EXTRA CI_DEBUG
usesh: true
prepare: sh .github/workflows/ci/vm-dragonfly-prepare.sh
run: bash .github/workflows/ci/vm-run-shared.sh
solaris:
name: "VM: Solaris x86_64"
runs-on: ${{ fromJSON(needs.setup.outputs.target_map)['solaris'].runner }}
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',solaris,')
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
- name: Build (Solaris x86_64)
uses: vmactions/solaris-vm@v1
env:
FPC_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['solaris'].fpc_target }}
FPC_TARBALL_TARGET: ${{ fromJSON(needs.setup.outputs.target_map)['solaris'].fpc_tarball_target }}
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE MAKE_RUN_BENCHMARK MAKE_LAZBUILD_GUI FPC_TARGET FPC_TARBALL_TARGET CI_DEBUG
release: "11.4-gcc"
usesh: true
prepare: sh .github/workflows/ci/vm-solaris-prepare.sh
run: bash .github/workflows/ci/vm-run-shared.sh