forked from CryptoCoderz/DigitalNote
-
Notifications
You must be signed in to change notification settings - Fork 21
499 lines (468 loc) · 24.4 KB
/
Copy pathci-linux-aarch64.yml
File metadata and controls
499 lines (468 loc) · 24.4 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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
name: CI - Linux aarch64
on:
workflow_dispatch:
inputs:
branch:
description: "Branch to build (leave empty / blank choice to use the branch from 'Use workflow from' above)"
required: false
type: choice
options:
- ""
- master
- 2.0.0.7-testing
- 2.0.0.8-testing
default: ""
workflow_call: # called by release.yml on tag push
inputs:
branch:
description: "Branch / ref to build (passed by release.yml)"
required: false
type: string
default: ""
env:
BUILDER_REPO: https://github.com/DigitalNoteXDN/DigitalNote-Builder.git
JOBS: 4
# Multiarch package list — the aarch64 cross-compile needs arm64-side
# versions of every dev library Qt's configure probes for. apt's :arm64
# suffix selects the foreign arch package after dpkg --add-architecture.
AARCH64_DEV_PACKAGES: >-
libfreetype-dev:arm64
libfontconfig1-dev:arm64
libx11-dev:arm64
libxcb1-dev:arm64
libxext-dev:arm64
libxfixes-dev:arm64
libxi-dev:arm64
libxrender-dev:arm64
libxkbcommon-dev:arm64
libxkbcommon-x11-dev:arm64
libxcb-glx0-dev:arm64
libxcb-keysyms1-dev:arm64
libxcb-image0-dev:arm64
libxcb-shm0-dev:arm64
libxcb-icccm4-dev:arm64
libxcb-sync-dev:arm64
libxcb-xfixes0-dev:arm64
libxcb-shape0-dev:arm64
libxcb-randr0-dev:arm64
libxcb-render-util0-dev:arm64
libxcb-util-dev:arm64
libxcb-xinerama0-dev:arm64
libxcb-xkb-dev:arm64
jobs:
# ── Job 1: Fast libs ──────────────────────────────────────────────────────────
libs-fast-aarch64:
name: Compile fast libraries aarch64 (~30 min)
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
submodules: false
- name: Cache fast libraries
uses: actions/cache@v4
id: fast-cache
with:
path: |
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/db-6.2.32.NC
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/boost_1_80_0
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/openssl-1.1.1w
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/libevent-2.1.12-stable
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/miniupnpc-2.2.8
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/qrencode-4.1.1
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/gmp-6.3.0
key: linux-aarch64-fast-libs-${{ hashFiles('include/libs.pri', 'include/libs/bip39.pri') }}-v3
restore-keys: linux-aarch64-fast-libs-
- name: Set up QEMU for arm64 emulation
if: steps.fast-cache.outputs.cache-hit != 'true'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install cross-compile toolchain
if: steps.fast-cache.outputs.cache-hit != 'true'
run: |
# Ubuntu's main archive hosts only amd64/i386. arm64 packages live on
# ports.ubuntu.com. Without separating arch->mirror mapping, apt
# tries to fetch arm64 Package indexes from the main archive and
# gets 404s. We rewrite all source files to constrain to amd64
# (covers both old-style .list files AND deb822 .sources files
# used by ubuntu-22.04+ runners), then add arm64-only entries
# pointing at ports.ubuntu.com.
echo "--- apt sources before fix ---"
ls -la /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
# Patch one-line .list format
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' /etc/apt/sources.list 2>/dev/null || true
for f in /etc/apt/sources.list.d/*.list; do
[ -e "$f" ] || continue
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' "$f"
done
# Patch deb822 .sources format (Ubuntu 22.04+/24.04+)
for f in /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
if ! grep -q '^Architectures:' "$f"; then
sudo sed -i '/^Types:/a Architectures: amd64' "$f"
fi
done
# Add arm64 ports sources (auto-detect codename)
CODENAME=$(. /etc/os-release && echo "$VERSION_CODENAME")
printf '%s\n' \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME} main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-updates main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-backports main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-security main restricted universe multiverse" \
| sudo tee /etc/apt/sources.list.d/arm64-ports.list >/dev/null
echo "--- apt sources after fix ---"
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
echo "## $f"; sudo cat "$f"
done
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
crossbuild-essential-arm64 qemu-user-static
sudo bash ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/update.sh \
2>/dev/null || true
- name: Clone DigitalNote-Builder
if: steps.fast-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/..
run: |
# Retry the clone up to 3 times to ride out transient network
# blips. Loud failure on real errors — no fallback that masks
# the actual problem. Each job runs on a fresh runner, so the
# destination dir is guaranteed not to pre-exist.
for attempt in 1 2 3; do
rm -rf DigitalNote-Builder
if git clone --depth 1 \
https://github.com/DigitalNoteXDN/DigitalNote-Builder.git; then
break
fi
echo "Clone attempt $attempt failed; sleeping 10s before retry..."
sleep 10
done
[ -d DigitalNote-Builder/.git ] || {
echo "ERROR: clone failed after 3 attempts"; exit 1; }
- name: Download library source archives
if: steps.fast-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.workspace }}/DigitalNote-Builder
run: |
mkdir -p download && cd download
# --tries=3 --timeout=60 fails fast on flaky CDNs (esp. miniupnp.free.fr,
# gmplib.org) instead of hanging the whole job. Keeping output verbose
# so a future failure shows the actual URL/HTTP code.
WGET="wget --tries=3 --timeout=60 --no-verbose"
$WGET https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz
$WGET https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz
$WGET http://download.oracle.com/berkeley-db/db-6.2.32.NC.tar.gz
$WGET https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
$WGET "http://miniupnp.free.fr/files/download.php?file=miniupnpc-2.2.8.tar.gz" -O miniupnpc-2.2.8.tar.gz
$WGET https://github.com/fukuchi/libqrencode/archive/refs/tags/v4.1.1.tar.gz
# GNU's mirror is more reliable from GitHub Actions IP ranges than gmplib.org
$WGET https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz
- name: Compile fast libraries (cross-compile aarch64)
if: steps.fast-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64
run: |
mkdir -p temp libs config
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
echo 'using gcc : aarch64 : aarch64-linux-gnu-g++ ;' > config/user-config.jam
CPUS=$(nproc)
../../compile/berkeleydb.sh "build_unix" "--host aarch64-linux-gnu" "-j $CPUS"
../../compile/boost.sh "--user-config=../../config/user-config.jam toolset=gcc-aarch64 architecture=arm address-model=64 target-os=linux -j $CPUS"
../../compile/openssl.sh "linux-aarch64" "-j $CPUS"
../../compile/libevent.sh "--host aarch64-linux-gnu" "-j $CPUS"
../../compile/miniupnpc.sh "libminiupnpc.a" "-j $CPUS"
../../compile/qrencode.sh "--host aarch64-linux-gnu" "-j $CPUS"
# GMP cross-compiled for aarch64. --disable-assembly avoids
# gmp's hand-tuned aarch64 asm needing a newer host as/ld than
# ubuntu-22.04 ships. Slight perf hit, but a static .a we can
# actually link.
../../compile/gmp.sh "--host=aarch64-linux-gnu --disable-assembly" "-j $CPUS"
# ── Job 2: Qt aarch64 ─────────────────────────────────────────────────────────
libs-qt-aarch64:
name: Compile Qt 5.15.7 aarch64 (up to 6hrs)
runs-on: ubuntu-22.04
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
submodules: false
- name: Cache Qt aarch64
uses: actions/cache@v4
id: qt-cache
with:
path: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/qt-5.15.7
key: linux-aarch64-qt-5.15.7-v2
restore-keys: linux-aarch64-qt-5.15.7-
- name: Install cross-compile toolchain + Qt deps (host + arm64 multiarch)
if: steps.qt-cache.outputs.cache-hit != 'true'
run: |
# Ubuntu's main archive hosts only amd64/i386. arm64 packages live on
# ports.ubuntu.com. Without separating arch->mirror mapping, apt
# tries to fetch arm64 Package indexes from the main archive and
# gets 404s. We rewrite all source files to constrain to amd64
# (covers both old-style .list files AND deb822 .sources files
# used by ubuntu-22.04+ runners), then add arm64-only entries
# pointing at ports.ubuntu.com.
echo "--- apt sources before fix ---"
ls -la /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
# Patch one-line .list format
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' /etc/apt/sources.list 2>/dev/null || true
for f in /etc/apt/sources.list.d/*.list; do
[ -e "$f" ] || continue
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' "$f"
done
# Patch deb822 .sources format (Ubuntu 22.04+/24.04+)
for f in /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
if ! grep -q '^Architectures:' "$f"; then
sudo sed -i '/^Types:/a Architectures: amd64' "$f"
fi
done
# Add arm64 ports sources (auto-detect codename)
CODENAME=$(. /etc/os-release && echo "$VERSION_CODENAME")
printf '%s\n' \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME} main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-updates main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-backports main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-security main restricted universe multiverse" \
| sudo tee /etc/apt/sources.list.d/arm64-ports.list >/dev/null
echo "--- apt sources after fix ---"
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
echo "## $f"; sudo cat "$f"
done
sudo dpkg --add-architecture arm64
sudo apt-get update
# Cross-compiler + host-side build tools
sudo apt-get install -y \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
crossbuild-essential-arm64
# arm64 multiarch dev libs Qt configure probes for. The :arm64
# suffix selects the foreign-arch package version. apt installs
# these to /usr/lib/aarch64-linux-gnu/ where the cross-toolchain's
# sysroot finds them.
sudo apt-get install -y ${{ env.AARCH64_DEV_PACKAGES }}
- name: Clone DigitalNote-Builder
if: steps.qt-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/..
run: |
# Retry the clone up to 3 times to ride out transient network
# blips. Loud failure on real errors — no fallback that masks
# the actual problem. Each job runs on a fresh runner, so the
# destination dir is guaranteed not to pre-exist.
for attempt in 1 2 3; do
rm -rf DigitalNote-Builder
if git clone --depth 1 \
https://github.com/DigitalNoteXDN/DigitalNote-Builder.git; then
break
fi
echo "Clone attempt $attempt failed; sleeping 10s before retry..."
sleep 10
done
[ -d DigitalNote-Builder/.git ] || {
echo "ERROR: clone failed after 3 attempts"; exit 1; }
- name: Download Qt source
if: steps.qt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ${{ runner.workspace }}/DigitalNote-Builder/download
wget -q https://download.qt.io/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz \
-O ${{ runner.workspace }}/DigitalNote-Builder/download/qt-everywhere-opensource-src-5.15.7.tar.xz
- name: Compile Qt (cross-compile aarch64)
if: steps.qt-cache.outputs.cache-hit != 'true'
working-directory: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64
run: |
mkdir -p temp libs
echo "Compiling Qt for aarch64 — this takes 1-3 hours"
# PKG_CONFIG_LIBDIR points pkg-config at the arm64 multiarch
# paths so configure tests succeed. PKG_CONFIG_SYSROOT_DIR=/
# avoids accidental path rewriting on this same-rootfs setup.
export PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=/
../../compile/qt.sh "-platform linux-g++ -xplatform linux-aarch64-gnu-g++ -bundled-xcb-xinput -fontconfig -system-freetype" ""
# ── Job 3: Build + Test aarch64 ───────────────────────────────────────────────
build-linux-aarch64:
name: Linux aarch64 — Build + Version Check
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: [ libs-fast-aarch64, libs-qt-aarch64 ]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
submodules: false
- name: Set up QEMU for arm64 emulation
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Clone DigitalNote-Builder
working-directory: ${{ github.workspace }}/..
run: |
# Retry the clone up to 3 times to ride out transient network
# blips. Loud failure on real errors — no fallback that masks
# the actual problem. Each job runs on a fresh runner, so the
# destination dir is guaranteed not to pre-exist.
for attempt in 1 2 3; do
rm -rf DigitalNote-Builder
if git clone --depth 1 \
https://github.com/DigitalNoteXDN/DigitalNote-Builder.git; then
break
fi
echo "Clone attempt $attempt failed; sleeping 10s before retry..."
sleep 10
done
[ -d DigitalNote-Builder/.git ] || {
echo "ERROR: clone failed after 3 attempts"; exit 1; }
mkdir -p DigitalNote-Builder/linux/aarch64/libs
- name: Restore fast libraries from cache
uses: actions/cache@v4
with:
path: |
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/db-6.2.32.NC
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/boost_1_80_0
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/openssl-1.1.1w
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/libevent-2.1.12-stable
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/miniupnpc-2.2.8
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/qrencode-4.1.1
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/gmp-6.3.0
key: linux-aarch64-fast-libs-${{ hashFiles('include/libs.pri', 'include/libs/bip39.pri') }}-v3
restore-keys: linux-aarch64-fast-libs-
- name: Restore Qt from cache
uses: actions/cache@v4
with:
path: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs/qt-5.15.7
key: linux-aarch64-qt-5.15.7-v2
restore-keys: linux-aarch64-qt-5.15.7-
- name: Install cross-compile toolchain + arm64 runtime libs
run: |
# Ubuntu's main archive hosts only amd64/i386. arm64 packages live on
# ports.ubuntu.com. Without separating arch->mirror mapping, apt
# tries to fetch arm64 Package indexes from the main archive and
# gets 404s. We rewrite all source files to constrain to amd64
# (covers both old-style .list files AND deb822 .sources files
# used by ubuntu-22.04+ runners), then add arm64-only entries
# pointing at ports.ubuntu.com.
echo "--- apt sources before fix ---"
ls -la /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
# Patch one-line .list format
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' /etc/apt/sources.list 2>/dev/null || true
for f in /etc/apt/sources.list.d/*.list; do
[ -e "$f" ] || continue
sudo sed -i -E 's|^deb (\[[^]]*\] )?([^ ])|deb [arch=amd64] \2|' "$f"
done
# Patch deb822 .sources format (Ubuntu 22.04+/24.04+)
for f in /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
if ! grep -q '^Architectures:' "$f"; then
sudo sed -i '/^Types:/a Architectures: amd64' "$f"
fi
done
# Add arm64 ports sources (auto-detect codename)
CODENAME=$(. /etc/os-release && echo "$VERSION_CODENAME")
printf '%s\n' \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME} main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-updates main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-backports main restricted universe multiverse" \
"deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ ${CODENAME}-security main restricted universe multiverse" \
| sudo tee /etc/apt/sources.list.d/arm64-ports.list >/dev/null
echo "--- apt sources after fix ---"
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[ -e "$f" ] || continue
echo "## $f"; sudo cat "$f"
done
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install -y \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
crossbuild-essential-arm64 qemu-user-static
# The build job also needs the arm64 runtime/dev libs for
# qmake's own probes during the daemon/wallet compile.
sudo apt-get install -y ${{ env.AARCH64_DEV_PACKAGES }}
sudo bash ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/update.sh \
2>/dev/null || true
- name: Link source tree
run: |
# Link source into Builder (for compile scripts)
ln -sfn ${{ github.workspace }} \
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/DigitalNote-2
# Link libs next to DigitalNote-2 so $$PWD/../libs resolves correctly.
# qmake's $$PWD resolves symlinks, so it returns github.workspace
# (the real source path), not the Builder symlink. Without this
# second symlink, ${DIGITALNOTE_PATH}/../libs in config.pri would
# resolve to /home/runner/work/DigitalNote-2/libs which is empty.
ln -sfn ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/libs \
${{ github.workspace }}/../libs
- name: Compile daemon (aarch64)
working-directory: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64
run: |
export PATH="$PWD/libs/qt-5.15.7/bin:$PATH"
cd DigitalNote-2
rm -rf build Makefile
# TARGET_ARCH=aarch64 lets config.pri pick the cross-compiled
# GMP at Builder/linux/aarch64/libs/gmp-6.3.0/ instead of the
# default x86_64 multiarch path.
qmake DigitalNote.daemon.pro \
-spec linux-aarch64-gnu-g++ \
TARGET_ARCH=aarch64 \
USE_UPNP=1 USE_BUILD_INFO=0 RELEASE=1
make -j${{ env.JOBS }} 2>&1 | tee ${{ github.workspace }}/build-daemon-aarch64.log
exit ${PIPESTATUS[0]}
- name: Compile Qt wallet (aarch64)
working-directory: ${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64
run: |
export PATH="$PWD/libs/qt-5.15.7/bin:$PATH"
cd DigitalNote-2
rm -rf build Makefile
qmake DigitalNote.app.pro \
-spec linux-aarch64-gnu-g++ \
TARGET_ARCH=aarch64 \
USE_UPNP=1 USE_DBUS=1 USE_QRCODE=1 USE_BUILD_INFO=0 \
RELEASE=1
make -j${{ env.JOBS }} 2>&1 | tee ${{ github.workspace }}/build-app-aarch64.log
exit ${PIPESTATUS[0]}
- name: Report version constants
run: |
# Extract the version constants from source and print them.
# No assertion — if the source is wrong, the binary will be
# wrong too, and that's a source-review problem, not a CI one.
BUILD=$(grep -oE 'CLIENT_VERSION_BUILD[[:space:]]+[0-9]+' src/clientversion.h | awk '{print $NF}')
PROTOCOL=$(grep -oE 'PROTOCOL_VERSION[[:space:]]*=[[:space:]]*[0-9]+' src/version.h | awk '{print $NF}')
MIN_PEER=$(grep -oE 'MIN_PEER_PROTO_VERSION[[:space:]]*=[[:space:]]*[0-9]+' src/version.h | awk '{print $NF}')
echo "Building with:"
echo " CLIENT_VERSION_BUILD = $BUILD"
echo " PROTOCOL_VERSION = $PROTOCOL"
echo " MIN_PEER_PROTO_VERSION = $MIN_PEER"
- name: Warning analysis
if: always()
run: |
for log in build-app-aarch64.log build-daemon-aarch64.log; do
if [ -f "${{ github.workspace }}/$log" ]; then
W=$(grep -c ": warning:" "${{ github.workspace }}/$log" 2>/dev/null || echo 0)
E=$(grep -c ": error:" "${{ github.workspace }}/$log" 2>/dev/null || echo 0)
echo "=== $log: $W warning(s), $E error(s) ==="
fi
done
- name: Upload aarch64 binaries
uses: actions/upload-artifact@v4
timeout-minutes: 10
with:
name: digitalnote-linux-aarch64
# Explicit paths — NOT **/ globs. The Builder dir contains a
# symlink back to the workspace root which causes upload-artifact
# to walk symlink cycles (see ci-macos-x64.yml comment).
path: |
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/DigitalNote-2/DigitalNoted
${{ runner.workspace }}/DigitalNote-Builder/linux/aarch64/DigitalNote-2/DigitalNote-qt
retention-days: 14
- name: Upload build logs
uses: actions/upload-artifact@v4
if: always()
with:
name: build-logs-linux-aarch64-${{ github.sha }}
path: |
${{ github.workspace }}/build-app-aarch64.log
${{ github.workspace }}/build-daemon-aarch64.log
retention-days: 14