summaryrefslogtreecommitdiff
path: root/.github/scripts/build-linux-armhf-cross.sh
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /.github/scripts/build-linux-armhf-cross.sh
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to '.github/scripts/build-linux-armhf-cross.sh')
-rwxr-xr-x.github/scripts/build-linux-armhf-cross.sh62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/scripts/build-linux-armhf-cross.sh b/.github/scripts/build-linux-armhf-cross.sh
new file mode 100755
index 00000000..cfbb2f03
--- /dev/null
+++ b/.github/scripts/build-linux-armhf-cross.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+VERSION="${VERSION:?missing}"
+ARCH="${ARCH:?missing}"
+HAMLIB_BRANCH="${HAMLIB_BRANCH:?missing}"
+WSJT_RELEASE_CHANNEL="${WSJT_RELEASE_CHANNEL:-DEVEL}"
+WSJT_RC_NUMBER="${WSJT_RC_NUMBER:-}"
+if [ "$ARCH" != armhf ]; then
+ echo "build-linux-armhf-cross.sh supports only arch=armhf" >&2
+ exit 2
+fi
+
+unset GITHUB_TOKEN
+cd /work
+# shellcheck source=.github/scripts/armhf-ci-image-config.sh
+source .github/scripts/armhf-ci-image-config.sh
+# shellcheck source=.github/scripts/linux-artifact-validation.sh
+source .github/scripts/linux-artifact-validation.sh
+.github/scripts/verify-armhf-ci-image.sh cross-builder "$ARCH" "$HAMLIB_BRANCH"
+
+export CC="$ARMHF_TOOLCHAIN_PREFIX/bin/$ARMHF_TARGET_TRIPLET-gcc"
+export CXX="$ARMHF_TOOLCHAIN_PREFIX/bin/$ARMHF_TARGET_TRIPLET-g++"
+export FC="$ARMHF_TOOLCHAIN_PREFIX/bin/$ARMHF_TARGET_TRIPLET-gfortran"
+for compiler in "$CC" "$CXX" "$FC"; do
+ version="$("$compiler" -dumpfullversion -dumpversion)"
+ if [ "$version" != "$ARMHF_GCC_VERSION" ]; then
+ echo "Expected GCC $ARMHF_GCC_VERSION, found $version at $compiler" >&2
+ exit 1
+ fi
+done
+
+export CCACHE_DIR="${CCACHE_DIR:-/work/.ccache-armhf}"
+mkdir -p "$CCACHE_DIR"
+ccache --zero-stats
+started="$(date +%s)"
+cmake -S . -B wsjtx-build \
+ -DCMAKE_TOOLCHAIN_FILE=/work/.github/cmake/armhf-toolchain.cmake \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ -DWSJT_SKIP_MANPAGES=ON \
+ -DWSJT_ENABLE_TESTS=ON \
+ -DWSJT_FORTRAN_LIBRARY_VARIANTS=OPENMP_ONLY \
+ -DWSJT_RELEASE_CHANNEL="$WSJT_RELEASE_CHANNEL" \
+ -DWSJT_RC_NUMBER="$WSJT_RC_NUMBER" \
+ -Wno-dev
+cmake --build wsjtx-build --parallel "$(nproc)"
+ended="$(date +%s)"
+{
+ printf 'started_epoch=%s\n' "$started"
+ printf 'ended_epoch=%s\n' "$ended"
+ printf 'duration_seconds=%s\n' "$((ended - started))"
+} > wsjtx-build/armhf-cross-build-timing.env
+ccache --show-stats
+
+validate_linux_build_executables wsjtx-build "$ARCH"
+.github/scripts/audit-armhf-cross-build.sh wsjtx-build
+echo "::group::Prepare ARMHF AppDir"
+cmake --install wsjtx-build --prefix /work/AppDir/usr
+validate_linux_application_tree AppDir appdir "$ARCH"
+echo "::endgroup::"
+echo "ARMHF cross-build complete for version=$VERSION"