-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from hebasto/250120-clang-snapshot
Add "Clang-SNAPSHOT" workflow
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Clang SNAPSHOT | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/actions/**' | ||
- '.github/workflows/clang.yml' | ||
schedule: | ||
- cron: '22 02 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
skip_functional_tests: | ||
description: 'Skip functional tests' | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
clang: | ||
name: 'Clang-SNAPSHOT, ${{ matrix.configuration.stdlib }}: system libs, no BDB, no GUI' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: | ||
- stdlib: libstdc++ | ||
- stdlib: libc++ | ||
dependencies: libc++-${LLVM_VERSION}-dev libc++abi-${LLVM_VERSION}-dev | ||
|
||
steps: | ||
- name: Checkout Bitcoin Core repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: bitcoin/bitcoin | ||
|
||
- name: Install dependencies | ||
run: | | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
. /etc/os-release | ||
REPO_NAME="deb http://apt.llvm.org/${VERSION_CODENAME} llvm-toolchain-${VERSION_CODENAME} main" | ||
sudo add-apt-repository -y "${REPO_NAME}" | ||
sudo apt-get update | ||
LLVM_VERSION=$(apt-cache search --names-only '^clang-[0-9]+$' | sort -V | tail -1 | cut -f1 -d" " | cut -f2 -d"-" ) | ||
echo "LLVM_VERSION=${LLVM_VERSION}" >> "$GITHUB_ENV" | ||
sudo apt-get install clang-${LLVM_VERSION} ${{ matrix.configuration.dependencies }} libboost-dev libevent-dev libsqlite3-dev libzmq3-dev systemtap-sdt-dev | ||
- name: Clang version | ||
run: clang-${LLVM_VERSION} -v | ||
|
||
- name: Generate buildsystem | ||
run: > | ||
cmake -B build \ | ||
-DCMAKE_C_COMPILER="clang-${LLVM_VERSION}" \ | ||
-DCMAKE_CXX_COMPILER="clang++-${LLVM_VERSION};-stdlib=${{ matrix.configuration.stdlib }}" \ | ||
-DBUILD_BENCH=ON \ | ||
-DBUILD_FUZZ_BINARY=ON \ | ||
-DWITH_ZMQ=ON \ | ||
-DWITH_USDT=ON \ | ||
-DWERROR=ON | ||
- name: Build | ||
run: cmake --build build -j $(nproc) | ||
|
||
- name: Check 'bitcoind' executable | ||
run: | | ||
ls -l ./build/src/bitcoind | ||
file ./build/src/bitcoind | ||
ldd ./build/src/bitcoind | ||
./build/src/bitcoind -version | ||
- name: Run test suite | ||
run: ctest --test-dir build -j $(nproc) |