blob: 2c68bc1f3d94437e485510c64072546d3e62dc16 (
plain)
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
|
name: "Warm macOS dependency caches"
description: "Restore or populate macOS Qt and pinned dependency caches without building WSJT-X."
inputs:
arch:
description: "Target architecture: arm64 or x86_64"
required: true
runner:
description: "GitHub Actions runner label"
required: true
deployment_target:
description: "macOS deployment target version"
required: true
hamlib_branch:
description: "Hamlib branch to build"
required: true
runs:
using: "composite"
steps:
- name: Validate workflow inputs
shell: bash
env:
HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
ARCH: ${{ inputs.arch }}
DEPLOYMENT_TARGET: ${{ inputs.deployment_target }}
RUNNER: ${{ inputs.runner }}
run: .github/scripts/validate-ci-inputs.sh
- name: Verify macOS build tuple
shell: bash
run: |
case "${{ inputs.arch }}:${{ inputs.runner }}:${{ inputs.deployment_target }}" in
arm64:macos-15:11.0|x86_64:macos-15-intel:10.13)
echo "Using supported macOS dependency tuple: ${{ inputs.arch }} on ${{ inputs.runner }} targeting ${{ inputs.deployment_target }}"
;;
*)
echo "::error::Unsupported macOS dependency tuple: arch=${{ inputs.arch }}, runner=${{ inputs.runner }}, deployment_target=${{ inputs.deployment_target }}"
exit 1
;;
esac
- name: Set Homebrew prefix
shell: bash
run: echo "HOMEBREW_PREFIX=$(brew --prefix)" >> "$GITHUB_ENV"
- name: Install dependencies
shell: bash
run: brew install cmake autoconf automake libtool pkg-config
- name: Compute Qt cache key
id: qt-key
shell: bash
run: |
.github/scripts/macos-qt-cache-key.sh \
--arch "${{ inputs.arch }}" \
--runner "${{ inputs.runner }}" \
--deployment-target "${{ inputs.deployment_target }}" \
--github-output
- name: Restore Qt cache
id: qt-cache
uses: actions/cache/restore@v5
with:
path: qt-prefix
key: ${{ steps.qt-key.outputs.key }}
- name: Build Qt
id: qt-build
if: steps.qt-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/build-qt-macos.sh \
--arch "${{ inputs.arch }}" \
--deployment-target "${{ inputs.deployment_target }}" \
--prefix "${GITHUB_WORKSPACE}/qt-prefix"
- name: Save Qt cache
if: steps.qt-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: qt-prefix
key: ${{ steps.qt-cache.outputs.cache-primary-key }}
- name: Verify Qt prefix
shell: bash
run: |
.github/scripts/verify-macos-artifacts.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--allow-prefix "${GITHUB_WORKSPACE}/qt-prefix" \
"${GITHUB_WORKSPACE}/qt-prefix"
- name: Install controlled ARM gfortran
id: controlled-arm-fc
if: inputs.arch == 'arm64'
shell: bash
run: |
.github/scripts/install-r-macos-gfortran.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--work-dir "${RUNNER_TEMP}/r-macos-gfortran" \
--prefix "${GITHUB_WORKSPACE}/gfortran-prefix" \
--github-output
- name: Install controlled Intel gfortran
id: controlled-intel-fc
if: inputs.arch == 'x86_64'
shell: bash
run: |
.github/scripts/install-xpack-gfortran-macos.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--work-dir "${RUNNER_TEMP}/xpack-gfortran" \
--prefix "${GITHUB_WORKSPACE}/gfortran-prefix" \
--github-output
- name: Select gfortran
id: fc
shell: bash
run: |
if [ "${{ inputs.arch }}" = "x86_64" ]; then
echo "Using controlled gfortran: ${{ steps.controlled-intel-fc.outputs.path }}"
{
echo "path=${{ steps.controlled-intel-fc.outputs.path }}"
echo "runtime_lib_dir=${{ steps.controlled-intel-fc.outputs.runtime_lib_dir }}"
echo "runtime_archives=${{ steps.controlled-intel-fc.outputs.runtime_archives }}"
echo "cache_key=${{ steps.controlled-intel-fc.outputs.cache_key }}"
} >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Using controlled gfortran: ${{ steps.controlled-arm-fc.outputs.path }}"
{
echo "path=${{ steps.controlled-arm-fc.outputs.path }}"
echo "runtime_lib_dir=${{ steps.controlled-arm-fc.outputs.runtime_lib_dir }}"
echo "runtime_archives=${{ steps.controlled-arm-fc.outputs.runtime_archives }}"
echo "cache_key=${{ steps.controlled-arm-fc.outputs.cache_key }}"
} >> "$GITHUB_OUTPUT"
- name: Verify static Fortran runtime
shell: bash
run: |
.github/scripts/verify-macos-static-archives.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--mode error \
${{ steps.fc.outputs.runtime_archives }}
- name: Restore libusb cache
id: libusb-cache
uses: actions/cache/restore@v5
with:
path: libusb-prefix
key: libusb-macos-${{ inputs.arch }}-${{ inputs.runner }}-1.0.27-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-libusb-macos.sh') }}
- name: Build libusb
id: libusb-build
if: steps.libusb-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/build-libusb-macos.sh \
1.0.27 \
"${{ inputs.deployment_target }}" \
"${GITHUB_WORKSPACE}/libusb-prefix"
- name: Save libusb cache
if: steps.libusb-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: libusb-prefix
key: ${{ steps.libusb-cache.outputs.cache-primary-key }}
- name: Restore PortAudio cache
id: portaudio-cache
uses: actions/cache/restore@v5
with:
path: portaudio-prefix
key: portaudio-macos-${{ inputs.arch }}-${{ inputs.runner }}-19.7.0-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-portaudio-macos.sh') }}
- name: Build PortAudio
id: portaudio-build
if: steps.portaudio-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/build-portaudio-macos.sh \
19.7.0 \
"${{ inputs.deployment_target }}" \
"${GITHUB_WORKSPACE}/portaudio-prefix"
- name: Save PortAudio cache
if: steps.portaudio-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: portaudio-prefix
key: ${{ steps.portaudio-cache.outputs.cache-primary-key }}
- name: Restore FFTW cache
id: fftw-cache
uses: actions/cache/restore@v5
with:
path: fftw-prefix
key: fftw-macos-${{ inputs.arch }}-${{ inputs.runner }}-3.3.10-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-fftw-macos.sh') }}
- name: Build FFTW
id: fftw-build
if: steps.fftw-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/build-fftw-macos.sh \
3.3.10 \
"${{ inputs.deployment_target }}" \
"${GITHUB_WORKSPACE}/fftw-prefix"
- name: Save FFTW cache
if: steps.fftw-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: fftw-prefix
key: ${{ steps.fftw-cache.outputs.cache-primary-key }}
- name: Restore Boost cache
id: boost-cache
uses: actions/cache/restore@v5
with:
path: boost-prefix
key: boost-macos-${{ inputs.arch }}-${{ inputs.runner }}-1.85.0-7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-boost-macos.sh') }}
- name: Build Boost
id: boost-build
if: steps.boost-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/build-boost-macos.sh \
1.85.0 \
7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 \
"${{ inputs.arch }}" \
"${{ inputs.deployment_target }}" \
"${GITHUB_WORKSPACE}/boost-prefix"
- name: Save Boost cache
if: steps.boost-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: boost-prefix
key: ${{ steps.boost-cache.outputs.cache-primary-key }}
- name: Verify pinned runtime prefixes
shell: bash
run: |
.github/scripts/verify-macos-artifacts.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--allow-prefix "${GITHUB_WORKSPACE}/libusb-prefix" \
--allow-prefix "${GITHUB_WORKSPACE}/portaudio-prefix" \
--allow-prefix "${GITHUB_WORKSPACE}/fftw-prefix" \
--allow-prefix "${GITHUB_WORKSPACE}/boost-prefix" \
"${GITHUB_WORKSPACE}/libusb-prefix" \
"${GITHUB_WORKSPACE}/portaudio-prefix" \
"${GITHUB_WORKSPACE}/fftw-prefix" \
"${GITHUB_WORKSPACE}/boost-prefix"
- name: Restore Hamlib cache
id: hamlib-cache
uses: actions/cache/restore@v5
with:
path: hamlib-prefix
key: hamlib-macos-${{ inputs.arch }}-${{ inputs.runner }}-${{ inputs.hamlib_branch }}-libusb1.0.27-min${{ inputs.deployment_target }}-epoch1-${{ hashFiles('.github/scripts/build-hamlib-macos.sh', '.github/scripts/build-libusb-macos.sh') }}
- name: Build Hamlib
id: hamlib-build
if: steps.hamlib-cache.outputs.cache-hit != 'true'
shell: bash
env:
HAMLIB_BRANCH: ${{ inputs.hamlib_branch }}
DEPLOYMENT_TARGET: ${{ inputs.deployment_target }}
run: |
.github/scripts/build-hamlib-macos.sh \
"$HAMLIB_BRANCH" \
"$DEPLOYMENT_TARGET" \
"${GITHUB_WORKSPACE}/hamlib-prefix" \
"${GITHUB_WORKSPACE}/libusb-prefix"
- name: Verify Hamlib prefix
shell: bash
run: |
test -f "${GITHUB_WORKSPACE}/hamlib-prefix/lib/libhamlib.a"
.github/scripts/verify-macos-static-archives.sh \
--target "${{ inputs.deployment_target }}" \
--arch "${{ inputs.arch }}" \
--mode error \
"${GITHUB_WORKSPACE}/hamlib-prefix/lib/libhamlib.a"
- name: Save Hamlib cache
if: steps.hamlib-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: hamlib-prefix
key: ${{ steps.hamlib-cache.outputs.cache-primary-key }}
- name: Restore pFUnit cache
id: pfunit-cache
uses: actions/cache/restore@v5
with:
path: pfunit-prefix
key: pfunit-macos-${{ inputs.arch }}-${{ inputs.runner }}-v4.14.0-${{ steps.fc.outputs.cache_key }}-min${{ inputs.deployment_target }}-epoch3-${{ hashFiles('.github/scripts/build-pfunit-macos.sh') }}
- name: Build pFUnit
id: pfunit-build
if: steps.pfunit-cache.outputs.cache-hit != 'true'
shell: bash
env:
DYLD_LIBRARY_PATH: ${{ steps.fc.outputs.runtime_lib_dir }}
run: |
.github/scripts/build-pfunit-macos.sh \
v4.14.0 \
"${{ steps.fc.outputs.path }}" \
"${{ inputs.deployment_target }}" \
"${GITHUB_WORKSPACE}/pfunit-prefix"
- name: Locate pFUnit config
shell: bash
run: |
config=$(find "${GITHUB_WORKSPACE}/pfunit-prefix" -name PFUNITConfig.cmake -print -quit)
if [ -z "$config" ]; then
echo "ERROR: PFUNITConfig.cmake not found under pfunit-prefix"
find "${GITHUB_WORKSPACE}/pfunit-prefix" -maxdepth 3 -type d
exit 1
fi
echo "Found PFUNITConfig.cmake at: $config"
- name: Save pFUnit cache
if: steps.pfunit-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: pfunit-prefix
key: ${{ steps.pfunit-cache.outputs.cache-primary-key }}
- name: Summarize dependency caches
if: always()
shell: bash
env:
CACHE_STEPS: ${{ toJSON(steps) }}
COLD_BUILD: "false"
run: python3 .github/scripts/summarize-native-caches.py qt libusb portaudio fftw boost hamlib pfunit >> "$GITHUB_STEP_SUMMARY"
|