forked from willcl-ark/bitcoin-core-nightly
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (79 loc) · 2.67 KB
/
linux-ci.yml
File metadata and controls
88 lines (79 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build and Test Bitcoin on Linux
on:
workflow_call:
inputs:
ctest_model:
required: true
type: string
default: Experimental
ctest_build_name_suffix:
required: false
type: string
workflow_dispatch:
jobs:
tests:
name: ${{ matrix.system }} - ${{ matrix.config }}
runs-on: ${{ matrix.runner_label }}
outputs:
bitcoin-commit: ${{ steps.bitcoin-commit.outputs.commit }}
strategy:
fail-fast: false
matrix:
include:
- system: x86_64-linux
runner_label: ubuntu-latest
cmake_flags: ""
ctest_extra: ""
config: llvm-default
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CC: clang-20
CXX: clang++-20
project:
- name: Bitcoin
repository: brandonodiwuor/bitcoin
path: 'bitcoin'
branch: 'will-repo-changes'
dependencies: libsqlite3-dev capnproto libboost-dev libcapnp-dev libevent-dev
env: ${{ matrix.env }}
steps:
- name: Checkout Nightly Repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Checkout Project Repo
uses: actions/checkout@v4
with:
repository: ${{ matrix.project.repository }}
path: ${{ matrix.project.path }}
ref: ${{ matrix.project.branch }}
fetch-depth: 1
- name: Get Bitcoin commit hash
id: bitcoin-commit
run: |
BITCOIN_COMMIT=$(cd bitcoin && git rev-parse HEAD)
echo "commit=$BITCOIN_COMMIT" >> $GITHUB_OUTPUT
- name: Cache ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.system }}-${{ matrix.config }}-${{ github.run_id }}
restore-keys: |
ccache-${{ matrix.system }}-${{ matrix.config }}-
- name: Install Dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y --no-install-recommends \
build-essential cmake pkgconf python3 clang-20 llvm-20 ninja-build \
${{ matrix.dependencies }} ${{ matrix.project.dependencies }}
- name: Build and test
run: |
set -eux
export CCACHE_DIR=${{ env.CCACHE_DIR }}
ctest --verbose -S \
./scripts/build-unit-test.cmake \
-DCTEST_SOURCE_DIRECTORY=./bitcoin \
-DBUILD_NAME_SUFFIX=${{ matrix.config }}--${{ inputs.ctest_build_name_suffix }} \
${{ matrix.ctest_extra }} \
-DTREAT_WARNINGS_AS_ERRORS=ON \
-DMODEL=${{ inputs.ctest_model }}