Skip to content

Nightly Tests

Nightly Tests #210

Workflow file for this run

name: Nightly Tests
on:
pull_request:
schedule:
- cron: '22 02 * * *'
workflow_dispatch:
inputs:
skip_functional_tests:
description: 'Skip functional tests'
required: true
default: false
type: boolean
concurrency:
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true
env:
CCACHE_COMPILERCHECK: content
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXFILES: 2500
DEPENDS_CACHE_DIR: ${{ github.workspace }}/depends/built
# See https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
CI_NCPU: 4
jobs:
freebsd-syslibs:
name: 'FreeBSD: system libs, no BDB, no GUI'
runs-on: ubuntu-latest
defaults:
run:
shell: freebsd {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: pkg install -y cmake-core git pkgconf ccache boost-libs libevent sqlite3 libzmq4 python3 databases/py-sqlite3 net/py-pyzmq
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
cmake -B build -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -j ${{ env.CI_NCPU }}
ccache --version
ccache --show-stats
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
ldd ./build/src/bitcoind
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --timeout-factor=8
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats freebsd:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}
freebsd-depends:
name: 'FreeBSD: depends, MP'
runs-on: ubuntu-latest
defaults:
run:
shell: freebsd {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Depends cache
uses: actions/cache@v4
with:
path: ${{ env.DEPENDS_CACHE_DIR }}
key: ${{ github.job }}-depends-${{ hashFiles('depends/**') }}
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: pkg install -y bash curl gmake cmake-core git perl5 pkgconf ccache python3 databases/py-sqlite3 net/py-pyzmq
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Build depends
run: |
cd ${{ github.workspace }}
gmake -C depends -j ${{ env.CI_NCPU }} MULTIPROCESS=1 LOG=1
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
cmake -B build --toolchain depends/$(./depends/config.guess)/toolchain.cmake -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -j ${{ env.CI_NCPU }}
ccache --version
ccache --show-stats
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
ldd ./build/src/bitcoind
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --timeout-factor=8
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats freebsd:${{ env.DEPENDS_CACHE_DIR }}/ ${{ env.DEPENDS_CACHE_DIR }}
rsync --archive --stats freebsd:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}
openbsd-syslibs:
name: 'OpenBSD: system libs, no BDB, no GUI'
runs-on: ubuntu-latest
defaults:
run:
shell: openbsd {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start OpenBSD VM
uses: vmactions/openbsd-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: pkg_add -v cmake git ccache boost libevent sqlite3 zeromq python py3-zmq
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
cmake -B build -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -j ${{ env.CI_NCPU }}
ccache --show-stats --verbose
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
ldd ./build/src/bitcoind
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats openbsd:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}
openbsd-depends:
name: 'OpenBSD: depends, no MP'
runs-on: ubuntu-latest
defaults:
run:
shell: openbsd {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Depends cache
uses: actions/cache@v4
with:
path: ${{ env.DEPENDS_CACHE_DIR }}
key: ${{ github.job }}-depends-${{ hashFiles('depends/**') }}
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start OpenBSD VM
uses: vmactions/openbsd-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: pkg_add bash curl gmake gtar-- cmake git ccache python py3-zmq
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Build depends
# TODO: Fix capnp compilation and enable MULTIPROCESS.
run: |
cd ${{ github.workspace }}
gmake -C depends -j ${{ env.CI_NCPU }} LOG=1
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
cmake -B build --toolchain depends/$(./depends/config.guess)/toolchain.cmake -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -j ${{ env.CI_NCPU }}
ccache --show-stats --verbose
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
ldd ./build/src/bitcoind
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats openbsd:${{ env.DEPENDS_CACHE_DIR }}/ ${{ env.DEPENDS_CACHE_DIR }}
rsync --archive --stats openbsd:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}
netbsd:
name: 'NetBSD: system libs, no GUI'
runs-on: ubuntu-latest
defaults:
run:
shell: netbsd {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start NetBSD VM
uses: vmactions/netbsd-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: |
/usr/sbin/pkg_info > packages_before
/usr/sbin/pkg_add cmake git-base gcc14 pkg-config ccache boost-headers libevent sqlite3 db4 zeromq
/usr/sbin/pkg_add http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.0_2024Q3/All/python312-3.12.6.tgz py312-zmq
/usr/sbin/pkg_info > packages_after
diff -w packages_before packages_after | grep '^>'
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
cmake -B build -DCMAKE_C_COMPILER="/usr/pkg/gcc14/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/pkg/gcc14/bin/g++" -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -j ${{ env.CI_NCPU }}
ccache --show-stats --verbose
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
# FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD.
ldd ./build/src/bitcoind || true
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
# TODO: Fix and enable the following tests: rpc_signer.py, tool_wallet.py, wallet_signer.py.
python3.12 build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 --exclude=rpc_signer.py,tool_wallet.py,wallet_signer.py
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats netbsd:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}
omnios:
name: 'OmniOS: system libs, no BDB, no GUI'
runs-on: ubuntu-latest
defaults:
run:
shell: omnios {0}
steps:
- name: Checkout Bitcoin Core repo
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-
- name: Start OmniOS VM
uses: vmactions/omnios-vm@v1
with:
envs: 'CCACHE_COMPILERCHECK CCACHE_DIR CCACHE_MAXFILES'
prepare: |
pkg list -H -o name,publisher,version > packages_before
pkg install cmake git gcc14 pkg-config ccache sqlite-3 python-312
pkg set-publisher -g https://sfe.opencsw.org/localhostomnios localhostomnios
pkg install boost/header-boost libevent2
pkg list -H -o name,publisher,version > packages_after
diff -w packages_before packages_after | grep '^>'
run: git config --global --add safe.directory ${{ github.workspace }}
sync: 'rsync'
copyback: false
- name: Generate buildsystem
run: |
cd ${{ github.workspace }}
export CMAKE_PREFIX_PATH="/usr/g++" # For boost/header-boost package.
export PKG_CONFIG_PATH="/usr/gnu/lib/amd64/pkgconfig" # For libevent2 package.
# Workaround for a bug in the FindThreads module.
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/26063
export CXXFLAGS="-pthread"
cmake -B build -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
- name: Build
run: |
set -e
cd ${{ github.workspace }}
ccache --zero-stats
cmake --build build -- -j ${{ env.CI_NCPU }}
ccache --version
ccache --show-stats
- name: Check 'bitcoind' executable
run: |
set -e
cd ${{ github.workspace }}
export LD_LIBRARY_PATH="/opt/gcc-14/lib/amd64:/usr/gnu/lib/amd64"
ls -l ./build/src/bitcoind
file ./build/src/bitcoind
ldd ./build/src/bitcoind
./build/src/bitcoind -version
- name: Run test suite
run: |
cd ${{ github.workspace }}
export LD_LIBRARY_PATH="/opt/gcc-14/lib/amd64:/usr/gnu/lib/amd64"
# TODO: https://github.com/bitcoin/bitcoin/pull/31580
# TODO: Fix the code, then enable system_tests.
ctest --test-dir build -j ${{ env.CI_NCPU }} --output-on-failure --exclude-regex "^(net_tests|system_tests)$"
- name: Run functional tests
if: ${{ ! inputs.skip_functional_tests }}
run: |
cd ${{ github.workspace }}
export LD_LIBRARY_PATH="/opt/gcc-14/lib/amd64:/usr/gnu/lib/amd64"
./build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8
- name: Sync caches back from VM
shell: bash -e {0}
run: |
rsync --archive --stats omnios:${{ env.CCACHE_DIR }}/ ${{ env.CCACHE_DIR }}