What changed, and why it matters
This commit adds a new automated build test for Bitcoin Core that compiles the software for FreeBSD from a Linux machine. It does not change any Bitcoin code, wallet logic, networking, or security behavior. It only affects internal continuous integration (CI) scripts.
No security action required. Treat as routine CI/infrastructure maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch introduces a FreeBSD cross-compilation CI job. It adds a GitHub Actions matrix entry, an environment setup script selecting clang/llvm/lld for x86_64-unknown-freebsd, and logic in 01_base_install.sh to download and extract the FreeBSD base.txz SDK. No source code, consensus, cryptography, or runtime behavior is modified.
Changed components
.github/workflows/ci.ymlci/test/00_setup_env_freebsd_cross.shci/test/01_base_install.shInspect captured patch +41 / −0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 914b29ca..dd262282 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -486,6 +486,12 @@ jobs:
timeout-minutes: 120
file-env: './ci/test/00_setup_env_mac_cross_intel.sh'
+ - name: 'FreeBSD Cross'
+ cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
+ fallback-runner: 'ubuntu-24.04'
+ timeout-minutes: 120
+ file-env: './ci/test/00_setup_env_freebsd_cross.sh'
+
- name: 'No wallet'
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
fallback-runner: 'ubuntu-24.04'
diff --git a/ci/test/00_setup_env_freebsd_cross.sh b/ci/test/00_setup_env_freebsd_cross.sh
new file mode 100755
index 00000000..da7304d1
--- /dev/null
+++ b/ci/test/00_setup_env_freebsd_cross.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or https://opensource.org/license/mit.
+
+export LC_ALL=C.UTF-8
+
+export CONTAINER_NAME=ci_freebsd_cross
+export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
+export APT_LLVM_V="22"
+export FREEBSD_VERSION=15.0
+export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld"
+export HOST=x86_64-unknown-freebsd
+export DEP_OPTS="build_CC=clang build_CXX=clang++ AR=llvm-ar-${APT_LLVM_V} STRIP=llvm-strip-${APT_LLVM_V} NM=llvm-nm-${APT_LLVM_V} RANLIB=llvm-ranlib-${APT_LLVM_V}"
+export GOAL="install"
+export BITCOIN_CONFIG="\
+ --preset=dev-mode \
+ -DREDUCE_EXPORTS=ON \
+ -DWITH_USDT=OFF \
+"
+export RUN_UNIT_TESTS=false
+export RUN_FUNCTIONAL_TESTS=false
diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh
index 308f7abe..0debf36f 100755
--- a/ci/test/01_base_install.sh
+++ b/ci/test/01_base_install.sh
@@ -104,4 +104,16 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
fi
+FREEBSD_SDK_BASENAME="freebsd-${HOST}-${FREEBSD_VERSION}"
+
+if [ -n "$FREEBSD_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}" ]; then
+ FREEBSD_SDK_FILENAME="base-${FREEBSD_VERSION}.txz"
+ FREEBSD_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${FREEBSD_SDK_FILENAME}"
+ if [ ! -f "$FREEBSD_SDK_PATH" ]; then
+ ${CI_RETRY_EXE} curl --location --fail "https://download.freebsd.org/releases/amd64/${FREEBSD_VERSION}-RELEASE/base.txz" -o "$FREEBSD_SDK_PATH"
+ fi
+ mkdir -p "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}"
+ tar -C "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}" -xf "$FREEBSD_SDK_PATH"
+fi
+
echo -n "done" > "${CFG_DONE}"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.