-
Notifications
You must be signed in to change notification settings - Fork 23
464 lines (420 loc) · 18.6 KB
/
make.yml
File metadata and controls
464 lines (420 loc) · 18.6 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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
name: Make
on:
schedule:
- cron: '0 0 1 * *'
push:
branches:
- "**"
pull_request:
branches:
- master
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# ═══════════════════════════════════════════════════════════════════════
# Shared configuration
# ═══════════════════════════════════════════════════════════════════════
env:
LAZARUS_BRANCH: lazarus_4_4
LAZARUS_REPO: https://github.com/fpc/Lazarus.git
# ═══════════════════════════════════════════════════════════════════════
# Jobs
# ═══════════════════════════════════════════════════════════════════════
jobs:
# ─────────────────────────────────────────────────────────────────────
# Tier 1 — Native GitHub-hosted runners (Linux, macOS, Windows)
# ─────────────────────────────────────────────────────────────────────
native:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
name: Linux x86_64
- runner: ubuntu-24.04-arm
name: Linux AArch64
- runner: windows-latest
name: Windows x86_64
- runner: macos-latest
name: macOS AArch64 (Apple Silicon)
- runner: macos-15-intel
name: macOS x86_64 (Intel)
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
dotnet-quality: 'ga'
# ── Linux ──────────────────────────────────────────────────────
- name: Build (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
set -xeuo pipefail
sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null
openssl version
fpc -iV
instantfpc .github/workflows/make.pas
# ── macOS ──────────────────────────────────────────────────────
- name: Build (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -xeuo pipefail
LAZARUS_DIR="/tmp/lazarus-src"
brew install fpc
# FPC 3.2.2 hardcodes libssl.1.1 but macOS runners ship
# OpenSSL 3 via Homebrew (keg-only). Symlink so FPC can find
# the libraries. This hack can be removed once we move to
# FPC 3.2.4+ which natively includes '.3' in DLLVersions.
OSSL_LIB="$(brew --prefix openssl@3)/lib"
sudo mkdir -p /usr/local/lib
sudo ln -sf "$OSSL_LIB/libssl.3.dylib" /usr/local/lib/libssl.1.1.dylib
sudo ln -sf "$OSSL_LIB/libcrypto.3.dylib" /usr/local/lib/libcrypto.1.1.dylib
git clone --depth 1 --branch "$LAZARUS_BRANCH" \
"$LAZARUS_REPO" "$LAZARUS_DIR"
make -C "$LAZARUS_DIR" lazbuild
mkdir -p "$HOME/.lazarus"
cat > "$HOME/.lazarus/environmentoptions.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<EnvironmentOptions>
<LazarusDirectory Value="$LAZARUS_DIR"/>
<CompilerFilename Value="$(which fpc)"/>
</EnvironmentOptions>
</CONFIG>
EOF
export PATH="$LAZARUS_DIR:$PATH"
"$(brew --prefix openssl@3)/bin/openssl" version
fpc -iV
lazbuild --version
instantfpc .github/workflows/make.pas
# ── Windows ────────────────────────────────────────────────────
- name: Build (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
Set-PSDebug -Strict
Write-Host "Installing Lazarus via Chocolatey..."
choco install lazarus -y --no-progress
$fpcDir = Get-ChildItem 'C:\Lazarus\fpc' -Directory | Select-Object -First 1
$env:Path += ";C:\Lazarus;$($fpcDir.FullName)\bin\x86_64-win64"
Write-Host "OpenSSL version:"
openssl version
Write-Host "FPC version:"
fpc -iV
Write-Host "Building make.pas..."
instantfpc .github/workflows/make.pas
# ─────────────────────────────────────────────────────────────────────
# Tier 2 — Linux ARM32 via QEMU user-mode emulation
# ─────────────────────────────────────────────────────────────────────
linux-arm32:
name: Linux ARMv7 (QEMU)
runs-on: ubuntu-latest
timeout-minutes: 120
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (ARMv7 via QEMU user-mode)
uses: uraimo/run-on-arch-action@v3
with:
arch: armv7
distro: ubuntu24.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y lazarus openssl wget ca-certificates
# FPC 3.2.2 hardcodes libssl.1.1 but Ubuntu 24.04 ships
# OpenSSL 3.x only. Symlink so FPC can find the libraries.
# This hack can be removed once we move to FPC 3.2.4+ which
# natively includes '.3' in DLLVersions.
ln -sf /usr/lib/arm-linux-gnueabihf/libssl.so.3 \
/usr/lib/arm-linux-gnueabihf/libssl.so.1.1
ln -sf /usr/lib/arm-linux-gnueabihf/libcrypto.so.3 \
/usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1
run: |
set -xeuo pipefail
openssl version
fpc -iV
instantfpc .github/workflows/make.pas
# ─────────────────────────────────────────────────────────────────────
# Tier 3 — BSD family via vmactions QEMU system VMs
#
# All BSD jobs: build lazbuild from source (Lazarus packages are
# unreliable across BSDs). GNU make (gmake) required on all BSDs.
#
# Not supported (removed):
# - FreeBSD aarch64: fpc-devel exists but is experimental.
# - OpenBSD: pre-built FPC binary links against older libc;
# incompatible with current OpenBSD. No usable package either.
# - NetBSD aarch64: no FPC package available.
#
# Disabled (commented out below):
# - NetBSD x86_64: package server intermittently times out.
# - DragonFlyBSD x86_64: FPC 3.2.x TLS broken (see comment below).
# ─────────────────────────────────────────────────────────────────────
freebsd:
name: FreeBSD x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (FreeBSD x86_64)
uses: vmactions/freebsd-vm@v1
with:
envs: LAZARUS_BRANCH LAZARUS_REPO
release: "15.0"
usesh: true
prepare: |
pkg install -y fpc git wget gmake
LAZARUS_DIR="/tmp/lazarus-src"
git clone --depth 1 --branch "$LAZARUS_BRANCH" \
"$LAZARUS_REPO" "$LAZARUS_DIR"
gmake -C "$LAZARUS_DIR" lazbuild
mkdir -p "$HOME/.lazarus"
cat > "$HOME/.lazarus/environmentoptions.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<EnvironmentOptions>
<LazarusDirectory Value="$LAZARUS_DIR"/>
<CompilerFilename Value="$(which fpc)"/>
</EnvironmentOptions>
</CONFIG>
EOF
export PATH="$LAZARUS_DIR:$PATH"
lazbuild --version
run: |
set -xeuo pipefail
export PATH="/tmp/lazarus-src:$PATH"
openssl version || true
fpc -iV
lazbuild --version
instantfpc .github/workflows/make.pas
# netbsd:
# name: NetBSD x86_64
# runs-on: ubuntu-latest
# timeout-minutes: 120
# # Disabled: NetBSD package server (cdn.NetBSD.org) intermittently
# # times out, causing CI failures. Re-enable when server is stable.
# #
# # pkgin is not pre-installed in the vmactions NetBSD image, so we
# # use pkg_add directly. The VM ships with slightly older base
# # packages (e.g. pcre2-10.46) that conflict with the latest repo
# # (which has git requiring pcre2>=10.47). We force-replace pcre2
# # first, then install everything else cleanly.
# steps:
# - name: Checkout
# uses: actions/checkout@v6
# with:
# submodules: true
#
# - name: Build (NetBSD x86_64)
# uses: vmactions/netbsd-vm@v1
# with:
# envs: LAZARUS_BRANCH LAZARUS_REPO
# prepare: |
# export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r | cut -d_ -f1)/All"
#
# # Force-update pcre2 to resolve version conflict with git
# pkg_add -uu pcre2 || true
# pkg_add fpc git wget gmake
#
# # NetBSD's FPC package may not generate fpc.cfg properly.
# # Ensure fpc.cfg exists and points to the correct unit paths.
# FPC_VER=$(fpc -iV)
# FPC_CFG="/usr/pkg/etc/fpc.cfg"
# if [ ! -f "$FPC_CFG" ] || ! grep -q "units" "$FPC_CFG"; then
# /usr/pkg/lib/fpc/${FPC_VER}/samplecfg \
# /usr/pkg/lib/fpc/${FPC_VER} /usr/pkg/etc
# fi
#
# LAZARUS_DIR="/tmp/lazarus-src"
# git clone --depth 1 --branch "$LAZARUS_BRANCH" \
# "$LAZARUS_REPO" "$LAZARUS_DIR"
# gmake -C "$LAZARUS_DIR" lazbuild
#
# mkdir -p "$HOME/.lazarus"
# cat > "$HOME/.lazarus/environmentoptions.xml" <<EOF
# <?xml version="1.0" encoding="UTF-8"?>
# <CONFIG>
# <EnvironmentOptions>
# <LazarusDirectory Value="$LAZARUS_DIR"/>
# <CompilerFilename Value="$(which fpc)"/>
# </EnvironmentOptions>
# </CONFIG>
# EOF
#
# export PATH="$LAZARUS_DIR:/usr/pkg/bin:$PATH"
# lazbuild --version
# run: |
# set -xeuo pipefail
# export PATH="/tmp/lazarus-src:/usr/pkg/bin:$PATH"
# openssl version || true
# fpc -iV
# lazbuild --version
# instantfpc .github/workflows/make.pas
# dragonflybsd:
# name: DragonFlyBSD x86_64
# runs-on: ubuntu-latest
# timeout-minutes: 120
# # Disabled: FPC 3.2.x cannot establish TLS connections on
# # DragonFlyBSD — base LibreSSL is ABI-incompatible and DPorts
# # OpenSSL is 3.x which FPC 3.2.x doesn't support. FPC's
# # pure-Pascal DNS resolver is also broken (same as mono/mono#8168).
# #
# # FPC 3.2.4+ fixes OpenSSL 3.x loading (adds '.3' to DLLVersions)
# # but will NOT fix the DNS resolver bug. The /etc/hosts workaround
# # and LD_LIBRARY_PATH below will still be needed.
# #
# # Lazarus has no DragonFlyBSD lazconf.inc, but DragonFlyBSD is a
# # FreeBSD derivative so the FreeBSD include works as-is. We patch
# # it in after cloning the Lazarus source.
# steps:
# - name: Checkout
# uses: actions/checkout@v6
# with:
# submodules: true
#
# - name: Build (DragonFlyBSD x86_64)
# uses: vmactions/dragonflybsd-vm@v1
# with:
# envs: LAZARUS_BRANCH LAZARUS_REPO
# usesh: true
# prepare: |
# pkg install -y fpc git wget gmake openssl
#
# # FPC's pure-Pascal DNS resolver (netdb unit) is broken on
# # DragonFlyBSD — it fails to resolve hostnames even though
# # system tools (host, drill, wget, git) work fine. This is
# # the same class of bug as mono/mono#8168.
# #
# # Workaround: resolve dependency hostnames via system DNS
# # and add them to /etc/hosts. FPC's netdb checks /etc/hosts
# # first (via gethostbyname), bypassing the broken resolver.
# for h in github.com packages.lazarus-ide.org; do
# ip=$(drill "$h" 2>/dev/null | awk '/^'"$h"'/{print $5; exit}')
# if [ -n "$ip" ]; then
# echo "$ip $h" >> /etc/hosts
# fi
# done
#
# # DragonFlyBSD base ships LibreSSL in /usr/lib. Real OpenSSL
# # 3.x from DPorts installs to /usr/local/lib. FPC 3.2.4+
# # adds '.3' to DLLVersions — once upgraded, remove these
# # symlinks but keep LD_LIBRARY_PATH in the run step.
# ln -sf libssl.so.3 /usr/local/lib/libssl.so.1.1
# ln -sf libcrypto.so.3 /usr/local/lib/libcrypto.so.1.1
#
# LAZARUS_DIR="/tmp/lazarus-src"
# git clone --depth 1 --branch "$LAZARUS_BRANCH" \
# "$LAZARUS_REPO" "$LAZARUS_DIR"
#
# # Lazarus is missing include/dragonfly/lazconf.inc.
# # DragonFlyBSD is a FreeBSD derivative, so the FreeBSD
# # version works as-is.
# mkdir -p "$LAZARUS_DIR/ide/packages/ideconfig/include/dragonfly"
# cp "$LAZARUS_DIR/ide/packages/ideconfig/include/freebsd/lazconf.inc" \
# "$LAZARUS_DIR/ide/packages/ideconfig/include/dragonfly/lazconf.inc"
#
# gmake -C "$LAZARUS_DIR" lazbuild
#
# mkdir -p "$HOME/.lazarus"
# cat > "$HOME/.lazarus/environmentoptions.xml" <<EOF
# <?xml version="1.0" encoding="UTF-8"?>
# <CONFIG>
# <EnvironmentOptions>
# <LazarusDirectory Value="$LAZARUS_DIR"/>
# <CompilerFilename Value="$(which fpc)"/>
# </EnvironmentOptions>
# </CONFIG>
# EOF
#
# export PATH="$LAZARUS_DIR:$PATH"
# lazbuild --version
# run: |
# set -xeuo pipefail
# export PATH="/tmp/lazarus-src:$PATH"
# export LD_LIBRARY_PATH="/usr/local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
# /usr/local/bin/openssl version || true
# fpc -iV
# lazbuild --version
# instantfpc .github/workflows/make.pas
# ─────────────────────────────────────────────────────────────────────
# Tier 4 — Solaris via vmactions QEMU system VM
#
# Solaris uses pkgutil (OpenCSW) for community packages which install
# to /opt/csw/bin. FPC is installed from the official SourceForge
# tarball. FPC's install.sh uses bash syntax so must be run with bash.
# ─────────────────────────────────────────────────────────────────────
solaris:
name: Solaris x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (Solaris x86_64)
uses: vmactions/solaris-vm@v1
with:
envs: LAZARUS_BRANCH LAZARUS_REPO
release: "11.4-gcc"
usesh: true
prepare: |
# CSW packages install to /opt/csw — must be in PATH
# before any CSW-installed tool can be used.
export PATH="/opt/csw/bin:/usr/local/bin:$PATH"
pkgutil -y -i bash wget gmake git
# Install FPC from the official SourceForge tarball.
# FPC's install.sh uses bash syntax (subshell expressions)
# which is incompatible with Solaris /bin/sh.
FPC_VERSION="3.2.2"
FPC_TARBALL="fpc-${FPC_VERSION}.x86_64-solaris.tar"
wget -q "https://sourceforge.net/projects/freepascal/files/Solaris/${FPC_VERSION}/${FPC_TARBALL}/download" \
-O "/tmp/${FPC_TARBALL}"
cd /tmp && tar xf "${FPC_TARBALL}"
cd "fpc-${FPC_VERSION}.x86_64-solaris"
echo -e "/usr/local\nY\n\nY\n" | bash install.sh
export PATH="/usr/local/bin:$PATH"
# Build lazbuild from source
LAZARUS_DIR="/tmp/lazarus-src"
git clone --depth 1 --branch "$LAZARUS_BRANCH" \
"$LAZARUS_REPO" "$LAZARUS_DIR"
gmake -C "$LAZARUS_DIR" lazbuild
mkdir -p "$HOME/.lazarus"
cat > "$HOME/.lazarus/environmentoptions.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<EnvironmentOptions>
<LazarusDirectory Value="$LAZARUS_DIR"/>
<CompilerFilename Value="$(which fpc)"/>
</EnvironmentOptions>
</CONFIG>
EOF
export PATH="$LAZARUS_DIR:$PATH"
fpc -iV
lazbuild --version
run: |
set -xeuo pipefail
export PATH="/tmp/lazarus-src:/usr/local/bin:/opt/csw/bin:$PATH"
openssl version || true
fpc -iV
lazbuild --version
instantfpc .github/workflows/make.pas