mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
ci: Migrate CI scripts to CMake
This commit is contained in:
parent
c360837ca5
commit
9730288a0c
21 changed files with 125 additions and 177 deletions
153
.github/workflows/ci.yml
vendored
153
.github/workflows/ci.yml
vendored
|
@ -67,12 +67,12 @@ jobs:
|
|||
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV"
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
|
||||
sudo apt-get install clang ccache build-essential cmake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
|
||||
- name: Compile and run tests
|
||||
run: |
|
||||
# Run tests on commits after the last merge commit and before the PR head commit
|
||||
# Use clang++, because it is a bit faster and uses less memory than g++
|
||||
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure --with-incompatible-bdb && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
|
||||
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_NATPMP=ON -DWITH_MINIUPNPC=ON -DWITH_USDT=ON && cmake --build build -j $(nproc) && ctest --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
|
||||
|
||||
macos-native-x86_64:
|
||||
name: 'macOS 13 native, x86_64, no depends, sqlite only, gui'
|
||||
|
@ -139,11 +139,6 @@ jobs:
|
|||
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
|
||||
|
||||
env:
|
||||
CCACHE_MAXSIZE: '200M'
|
||||
CI_CCACHE_VERSION: '4.7.5'
|
||||
CI_QT_CONF: '-release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
|
||||
CI_QT_DIR: 'qt-everywhere-src-5.15.11'
|
||||
CI_QT_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip'
|
||||
PYTHONUTF8: 1
|
||||
TEST_RUNNER_TIMEOUT_FACTOR: 40
|
||||
|
||||
|
@ -151,6 +146,10 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Remove non-MSVC tool installations
|
||||
run: |
|
||||
Remove-Item -Path "$env:ProgramFiles/CMake" -Recurse -Force
|
||||
|
||||
- name: Configure Developer Command Prompt for Microsoft Visual C++
|
||||
# Using microsoft/setup-msbuild is not enough.
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
@ -159,94 +158,18 @@ jobs:
|
|||
|
||||
- name: Get tool information
|
||||
run: |
|
||||
cmake -version | Tee-Object -FilePath "cmake_version"
|
||||
Write-Output "---"
|
||||
msbuild -version | Tee-Object -FilePath "msbuild_version"
|
||||
$env:VCToolsVersion | Tee-Object -FilePath "toolset_version"
|
||||
$env:CI_QT_URL | Out-File -FilePath "qt_url"
|
||||
$env:CI_QT_CONF | Out-File -FilePath "qt_conf"
|
||||
py -3 --version
|
||||
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
|
||||
|
||||
- name: Restore static Qt cache
|
||||
id: static-qt-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: C:\Qt_static
|
||||
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
|
||||
|
||||
- name: Build static Qt. Download
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: |
|
||||
curl --location --output C:\qt-src.zip %CI_QT_URL%
|
||||
choco install --yes --no-progress jom
|
||||
|
||||
- name: Build static Qt. Expand source archive
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: tar -xf C:\qt-src.zip -C C:\
|
||||
|
||||
- name: Build static Qt. Create build directory
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
Rename-Item -Path "C:\$env:CI_QT_DIR" -NewName "C:\qt-src"
|
||||
New-Item -ItemType Directory -Path "C:\qt-src\build"
|
||||
|
||||
- name: Build static Qt. Configure
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: ..\configure %CI_QT_CONF% -prefix C:\Qt_static
|
||||
|
||||
- name: Build static Qt. Build
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: jom
|
||||
|
||||
- name: Build static Qt. Install
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: jom install
|
||||
|
||||
- name: Save static Qt cache
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: C:\Qt_static
|
||||
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
|
||||
|
||||
- name: Ccache installation cache
|
||||
id: ccache-installation-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
C:\ProgramData\chocolatey\lib\ccache
|
||||
C:\ProgramData\chocolatey\bin\ccache.exe
|
||||
C:\ccache\cl.exe
|
||||
key: ${{ github.job }}-ccache-installation-${{ env.CI_CCACHE_VERSION }}
|
||||
|
||||
- name: Install Ccache
|
||||
if: steps.ccache-installation-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
choco install --yes --no-progress ccache --version=$env:CI_CCACHE_VERSION
|
||||
New-Item -ItemType Directory -Path "C:\ccache"
|
||||
Copy-Item -Path "$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -Destination "C:\ccache\cl.exe"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/AppData/Local/ccache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
restore-keys: ${{ github.job }}-ccache-
|
||||
|
||||
- name: Using vcpkg with MSBuild
|
||||
run: |
|
||||
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
|
||||
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
|
||||
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
|
||||
.\vcpkg.exe --vcpkg-root "$env:VCPKG_INSTALLATION_ROOT" integrate install
|
||||
git rev-parse HEAD | Tee-Object -FilePath "$env:GITHUB_WORKSPACE\vcpkg_commit"
|
||||
|
||||
- name: vcpkg tools cache
|
||||
uses: actions/cache@v4
|
||||
|
@ -254,46 +177,41 @@ jobs:
|
|||
path: C:/vcpkg/downloads/tools
|
||||
key: ${{ github.job }}-vcpkg-tools
|
||||
|
||||
- name: vcpkg binary cache
|
||||
uses: actions/cache@v4
|
||||
- name: Restore vcpkg binary cache
|
||||
uses: actions/cache/restore@v4
|
||||
id: vcpkg-binary-cache
|
||||
with:
|
||||
path: ~/AppData/Local/vcpkg/archives
|
||||
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }}
|
||||
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
|
||||
|
||||
- name: Generate project files
|
||||
run: py -3 build_msvc\msvc-autogen.py
|
||||
- name: Generate build system
|
||||
run: |
|
||||
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
|
||||
|
||||
- name: Save vcpkg binary cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/AppData/Local/vcpkg/archives
|
||||
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
working-directory: build
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
msbuild build_msvc\bitcoin.sln -property:CLToolPath=C:\ccache;CLToolExe=cl.exe;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
|
||||
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
|
||||
|
||||
- name: Ccache stats
|
||||
run: ccache --show-stats
|
||||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/AppData/Local/ccache
|
||||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
|
||||
- name: Run unit tests
|
||||
run: src\test_bitcoin.exe -l test_suite
|
||||
|
||||
- name: Run benchmarks
|
||||
run: src\bench_bitcoin.exe -sanity-check
|
||||
|
||||
- name: Run util tests
|
||||
run: py -3 test\util\test_runner.py
|
||||
|
||||
- name: Run rpcauth test
|
||||
run: py -3 test\util\rpcauth-test.py
|
||||
- name: Run test suite
|
||||
working-directory: build
|
||||
run: |
|
||||
ctest -j $env:NUMBER_OF_PROCESSORS -C Release
|
||||
|
||||
- name: Run functional tests
|
||||
working-directory: build
|
||||
env:
|
||||
BITCOIND: '${{ github.workspace }}\build\src\Release\bitcoind.exe'
|
||||
BITCOINCLI: '${{ github.workspace }}\build\src\Release\bitcoin-cli.exe'
|
||||
BITCOINUTIL: '${{ github.workspace }}\build\src\Release\bitcoin-util.exe'
|
||||
BITCOINWALLET: '${{ github.workspace }}\build\src\Release\bitcoin-wallet.exe'
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
shell: cmd
|
||||
run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
|
||||
|
@ -306,8 +224,9 @@ jobs:
|
|||
git log -1
|
||||
|
||||
- name: Run fuzz binaries
|
||||
working-directory: build
|
||||
env:
|
||||
BITCOINFUZZ: "${{ github.workspace}}\\src\\fuzz.exe"
|
||||
BITCOINFUZZ: '${{ github.workspace }}\build\src\test\fuzz\Release\fuzz.exe'
|
||||
shell: cmd
|
||||
run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_seed_corpus
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@ export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
|||
export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
|
||||
# Folder where the build result is put (bin and lib).
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
|
||||
# Folder where the build is done (dist and out-of-tree build).
|
||||
export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
|
||||
# The folder for previous release binaries.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
|
||||
|
|
|
@ -17,4 +17,4 @@ export RUN_FUNCTIONAL_TESTS=false
|
|||
export GOAL="install"
|
||||
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
|
||||
# This could be removed once the ABI change warning does not show up by default
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports CXXFLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"
|
||||
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'"
|
||||
|
|
|
@ -13,5 +13,5 @@ export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc
|
|||
export PIP_PACKAGES="pyzmq"
|
||||
export GOAL="install"
|
||||
export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
|
||||
export CONFIG_SHELL="/bin/dash"
|
||||
|
|
|
@ -13,6 +13,11 @@ export PACKAGES="llvm clang g++-multilib"
|
|||
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
||||
export GOAL="install"
|
||||
export TEST_RUNNER_EXTRA="--v2transport"
|
||||
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \
|
||||
CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='-Wno-error=documentation'"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_C_COMPILER='clang;-m32' \
|
||||
-DCMAKE_CXX_COMPILER='clang++;-m32' \
|
||||
-DCMAKE_CXX_FLAGS='-Wno-error=documentation' \
|
||||
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
|
||||
"
|
||||
export BITCOIND=bitcoin-node # Used in functional tests
|
||||
|
|
|
@ -17,4 +17,4 @@ export XCODE_BUILD_ID=15A240d
|
|||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"
|
||||
|
|
|
@ -11,7 +11,7 @@ export HOST=x86_64-apple-darwin
|
|||
# Therefore, `--break-system-packages` is needed.
|
||||
export PIP_PACKAGES="--break-system-packages zmq"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_MINIUPNPC=ON -DWITH_NATPMP=ON -DREDUCE_EXPORTS=ON"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
|
|
|
@ -22,8 +22,13 @@ export CONTAINER_NAME=ci_native_asan
|
|||
export PACKAGES="systemtap-sdt-dev clang-18 llvm-18 libclang-rt-18-dev python3-zmq qtbase5-dev qttools5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
|
||||
export NO_DEPENDS=1
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 \
|
||||
CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
|
||||
--with-sanitizers=address,float-divide-by-zero,integer,undefined \
|
||||
CC='clang-18 -ftrivial-auto-var-init=pattern' CXX='clang++-18 -ftrivial-auto-var-init=pattern'"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
|
||||
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
|
||||
-DCMAKE_C_COMPILER=clang-18 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-18 \
|
||||
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
|
||||
"
|
||||
export CCACHE_MAXSIZE=300M
|
||||
|
|
|
@ -15,7 +15,13 @@ export RUN_FUNCTIONAL_TESTS=false
|
|||
export RUN_FUZZ_TESTS=true
|
||||
export GOAL="install"
|
||||
export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \
|
||||
CC='clang-18 -ftrivial-auto-var-init=pattern' CXX='clang++-18 -ftrivial-auto-var-init=pattern'"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DBUILD_FOR_FUZZING=ON \
|
||||
-DSANITIZERS=fuzzer,address,undefined,float-divide-by-zero,integer \
|
||||
-DCMAKE_C_COMPILER=clang-18 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-18 \
|
||||
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \
|
||||
"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-18"
|
||||
|
|
|
@ -18,7 +18,11 @@ export PACKAGES="ninja-build"
|
|||
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export GOAL="install"
|
||||
# _FORTIFY_SOURCE is not compatible with MSAN.
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -U_FORTIFY_SOURCE'"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DBUILD_FOR_FUZZING=ON \
|
||||
-DSANITIZERS=fuzzer,memory \
|
||||
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -U_FORTIFY_SOURCE' \
|
||||
"
|
||||
export USE_MEMORY_SANITIZER="true"
|
||||
export RUN_UNIT_TESTS="false"
|
||||
export RUN_FUNCTIONAL_TESTS="false"
|
||||
|
|
|
@ -15,5 +15,10 @@ export RUN_FUNCTIONAL_TESTS=false
|
|||
export RUN_FUZZ_TESTS=true
|
||||
export FUZZ_TESTS_CONFIG="--valgrind"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang-16 CXX=clang++-16"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DBUILD_FOR_FUZZING=ON \
|
||||
-DSANITIZERS=fuzzer \
|
||||
-DCMAKE_C_COMPILER=clang-16 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-16 \
|
||||
"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
|
|
|
@ -18,7 +18,7 @@ export PACKAGES="ninja-build"
|
|||
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export GOAL="install"
|
||||
# _FORTIFY_SOURCE is not compatible with MSAN.
|
||||
export BITCOIN_CONFIG="--with-sanitizers=memory CPPFLAGS='-U_FORTIFY_SOURCE'"
|
||||
export BITCOIN_CONFIG="-DSANITIZERS=memory -DAPPEND_CPPFLAGS='-U_FORTIFY_SOURCE'"
|
||||
export USE_MEMORY_SANITIZER="true"
|
||||
export RUN_FUNCTIONAL_TESTS="false"
|
||||
export CCACHE_MAXSIZE=250M
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
|
||||
export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
|
||||
# Use minimum supported python3.9 and clang-16, see doc/dependencies.md
|
||||
export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm"
|
||||
# Use minimum supported python3.9 (or best-effort 3.11) and clang-16, see doc/dependencies.md
|
||||
export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
|
||||
export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
|
||||
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON"
|
||||
|
|
|
@ -16,5 +16,12 @@ export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
|||
export RUN_UNIT_TESTS="false"
|
||||
export GOAL="install"
|
||||
export DOWNLOAD_PREVIOUS_RELEASES="true"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports --enable-debug \
|
||||
CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\""
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_C_FLAGS='-funsigned-char' \
|
||||
-DCMAKE_C_FLAGS_DEBUG='-g0 -O2' \
|
||||
-DCMAKE_CXX_FLAGS='-funsigned-char' \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG='-g0 -O2' \
|
||||
-DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \
|
||||
"
|
||||
|
|
|
@ -9,12 +9,18 @@ export LC_ALL=C.UTF-8
|
|||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
export CONTAINER_NAME=ci_native_tidy
|
||||
export TIDY_LLVM_V="18"
|
||||
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
|
||||
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export RUN_FUZZ_TESTS=false
|
||||
export RUN_TIDY=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="CC=clang-${TIDY_LLVM_V} CXX=clang++-${TIDY_LLVM_V} --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWARN_INCOMPATIBLE_BDB=OFF -DENABLE_HARDENING=OFF \
|
||||
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
|
||||
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O0 -g0' \
|
||||
"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
|
|
|
@ -11,4 +11,5 @@ export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
|||
export PACKAGES="clang-18 llvm-18 libclang-rt-18-dev libc++abi-18-dev libc++-18-dev python3-zmq"
|
||||
export DEP_OPTS="CC=clang-18 CXX='clang++-18 -stdlib=libc++'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES' --with-sanitizers=thread"
|
||||
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \
|
||||
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'"
|
||||
|
|
|
@ -13,4 +13,9 @@ export USE_VALGRIND=1
|
|||
export NO_DEPENDS=1
|
||||
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang-16 CXX=clang++-16" # TODO enable GUI
|
||||
# TODO enable GUI
|
||||
export BITCOIN_CONFIG="\
|
||||
-DWITH_ZMQ=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \
|
||||
-DCMAKE_C_COMPILER=clang-16 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-16 \
|
||||
"
|
||||
|
|
|
@ -13,4 +13,4 @@ export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
|
|||
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export RUN_FUNCTIONAL_TESTS=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON"
|
||||
|
|
|
@ -16,4 +16,5 @@ export GOAL="deploy"
|
|||
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
|
||||
# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/
|
||||
# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests CXXFLAGS='-Wno-return-type -Wno-error=maybe-uninitialized -Wno-error=array-bounds'"
|
||||
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF \
|
||||
-DCMAKE_CXX_FLAGS='-Wno-error=return-type -Wno-error=maybe-uninitialized -Wno-error=array-bounds'"
|
||||
|
|
|
@ -99,51 +99,37 @@ if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
|
|||
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="--disable-dependency-tracking"
|
||||
BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON"
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DCMAKE_TOOLCHAIN_FILE=$DEPENDS_DIR/$HOST/toolchain.cmake"
|
||||
fi
|
||||
if [ -z "$NO_WERROR" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DWERROR=ON"
|
||||
fi
|
||||
|
||||
ccache --zero-stats
|
||||
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
|
||||
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
|
||||
|
||||
if [ -n "$CONFIG_SHELL" ]; then
|
||||
"$CONFIG_SHELL" -c "./autogen.sh"
|
||||
else
|
||||
./autogen.sh
|
||||
fi
|
||||
|
||||
# Folder where the build is done.
|
||||
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
||||
mkdir -p "${BASE_BUILD_DIR}"
|
||||
cd "${BASE_BUILD_DIR}"
|
||||
|
||||
bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
|
||||
|
||||
make distdir VERSION="$HOST"
|
||||
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST"
|
||||
|
||||
bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
|
||||
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DENABLE_EXTERNAL_SIGNER=ON -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
MAYBE_BEAR="bear --config src/.bear-tidy-config"
|
||||
MAYBE_TOKEN="--"
|
||||
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
fi
|
||||
|
||||
bash -c "${MAYBE_BEAR} ${MAYBE_TOKEN} make $MAKEJOBS $GOAL" || ( echo "Build failure. Verbose build follows." && make "$GOAL" V=1 ; false )
|
||||
bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log) && false)"
|
||||
|
||||
bash -c "make $MAKEJOBS all $GOAL" || ( echo "Build failure. Verbose build follows." && make all "$GOAL" V=1 ; false )
|
||||
|
||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
||||
du -sh "${DEPENDS_DIR}"/*/
|
||||
du -sh "${PREVIOUS_RELEASES_DIR}"
|
||||
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
# Generate all binaries, so that they can be wrapped
|
||||
make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1
|
||||
"${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
|
||||
fi
|
||||
|
||||
|
@ -152,7 +138,7 @@ if [ -n "$USE_VALGRIND" ]; then
|
|||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "${MAKEJOBS}" check VERBOSE=1
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest "${MAKEJOBS}"
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
|
@ -170,7 +156,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
|
|||
cmake --build /tidy-build --target bitcoin-tidy-tests "$MAKEJOBS"
|
||||
|
||||
set -eo pipefail
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
|
||||
cd "${BASE_BUILD_DIR}/src/"
|
||||
if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
|
||||
grep -C5 "error: " tmp.tidy-out.txt
|
||||
echo "^^^ ⚠️ Failure generated from clang-tidy"
|
||||
|
@ -180,12 +166,12 @@ if [ "${RUN_TIDY}" = "true" ]; then
|
|||
# accepted in src/.bear-tidy-config
|
||||
# Filter out:
|
||||
# * qt qrc and moc generated files
|
||||
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json
|
||||
mv tmp.json ../compile_commands.json
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
|
||||
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' "${BASE_BUILD_DIR}/compile_commands.json" > tmp.json
|
||||
mv tmp.json "${BASE_BUILD_DIR}/compile_commands.json"
|
||||
cd "${BASE_ROOT_DIR}"
|
||||
python3 "/include-what-you-use/iwyu_tool.py" \
|
||||
-p . "${MAKEJOBS}" \
|
||||
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
|
||||
-p "${BASE_BUILD_DIR}" "${MAKEJOBS}" \
|
||||
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_ROOT_DIR}/contrib/devtools/iwyu/bitcoin.core.imp" \
|
||||
-Xiwyu --max_line_length=160 \
|
||||
2>&1 | tee /tmp/iwyu_ci.out
|
||||
cd "${BASE_ROOT_DIR}/src"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}.exe; do
|
||||
for b_name in {"${BASE_OUTDIR}/bin"/*,src/univalue/{test_json,unitester,object}}.exe; do
|
||||
# shellcheck disable=SC2044
|
||||
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do
|
||||
if (file "$b" | grep "Windows"); then
|
||||
|
|
Loading…
Reference in a new issue