ci: add FreeBSD cross CI job

This commit is contained in:
fanquake
2026-02-03 11:58:43 +00:00
parent f44191f163
commit 65379bb8d0
3 changed files with 41 additions and 0 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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}"