-
-
Notifications
You must be signed in to change notification settings - Fork 25
227 lines (206 loc) · 7.12 KB
/
make.yml
File metadata and controls
227 lines (206 loc) · 7.12 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
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). Opt-in only: netbsd, dragonflybsd — pass explicitly here.
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
# 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 }}
native_matrix: ${{ steps.resolve.outputs.native_matrix }}
steps:
- uses: actions/checkout@v6
- 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:
needs: setup
# native_matrix is built from targets.json filtered to enabled native ids.
# An empty array would be an invalid matrix, so skip the job in that case.
if: needs.setup.outputs.native_matrix != '[]'
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.setup.outputs.native_matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build
shell: bash
env:
FPC_TARGET: ${{ matrix.fpc_target }}
run: bash .github/workflows/ci/native-build.sh
linux-arm32:
name: Linux ARMv7 (QEMU)
runs-on: ubuntu-latest
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-arm32,')
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
env: |
FPC_VERSION: ${{ env.FPC_VERSION }}
FPC_TARGET: arm-linux
LAZARUS_BRANCH: ${{ env.LAZARUS_BRANCH }}
LAZARUS_REPO: ${{ env.LAZARUS_REPO }}
MAKE_BUILD_BACKEND: ${{ env.MAKE_BUILD_BACKEND }}
MAKE_PACKAGE_SCOPE: ${{ env.MAKE_PACKAGE_SCOPE }}
CI_DEBUG: ${{ env.CI_DEBUG }}
run: bash .github/workflows/ci/arm32-run.sh
linux-powerpc64-be:
name: Linux PowerPC64 BE (QEMU)
runs-on: ubuntu-latest
timeout-minutes: 180
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',linux-powerpc64-be,')
steps:
- name: Checkout
uses: actions/checkout@v6
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: powerpc64-linux
MAKE_BUILD_BACKEND: ${{ env.MAKE_BUILD_BACKEND }}
MAKE_PACKAGE_SCOPE: ${{ env.MAKE_PACKAGE_SCOPE }}
run: bash .github/workflows/ci/ppc64-be-build.sh
freebsd:
name: FreeBSD x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',freebsd,')
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (FreeBSD x86_64)
uses: vmactions/freebsd-vm@v1
env:
FPC_TARGET: x86_64-freebsd
FREEBSD_INSTALL_MODE: interim
with:
envs: FPC_VERSION FPC_TARGET LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE 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: NetBSD x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',netbsd,')
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (NetBSD x86_64)
uses: vmactions/netbsd-vm@v1
env:
FPC_TARGET: x86_64-netbsd
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE FPC_TARGET CI_DEBUG
prepare: sh .github/workflows/ci/vm-netbsd-prepare.sh
run: bash .github/workflows/ci/vm-run-shared.sh
dragonflybsd:
name: DragonFlyBSD x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',dragonflybsd,')
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (DragonFlyBSD x86_64)
uses: vmactions/dragonflybsd-vm@v1
env:
FPC_TARGET: x86_64-dragonfly
LD_LIBRARY_PATH_EXTRA: /usr/local/lib
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE FPC_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: Solaris x86_64
runs-on: ubuntu-latest
timeout-minutes: 120
needs: setup
if: contains(format(',{0},', needs.setup.outputs.enabled_targets), ',solaris,')
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Build (Solaris x86_64)
uses: vmactions/solaris-vm@v1
env:
FPC_TARGET: x86_64-solaris
with:
envs: FPC_VERSION LAZARUS_BRANCH LAZARUS_REPO MAKE_BUILD_BACKEND MAKE_PACKAGE_SCOPE FPC_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