File tree Expand file tree Collapse file tree 2 files changed +93
-3
lines changed Expand file tree Collapse file tree 2 files changed +93
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Go CI
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ jobs :
8
+ ubuntu :
9
+ name : Build and Test on Ubuntu
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - name : Set up Go
16
+ uses : actions/setup-go@v5
17
+ with :
18
+ go-version : ' 1.23.3'
19
+
20
+ - name : Install Boost library
21
+ run : |
22
+ sudo apt-get update
23
+ sudo apt-get install -y libboost-all-dev
24
+
25
+ - name : Build Kernel
26
+ run : make build-kernel
27
+
28
+ - name : Build
29
+ run : make build
30
+
31
+ - name : Run tests
32
+ run : make test
33
+
34
+ macos :
35
+ name : Build and Test on macOS
36
+ runs-on : macos-latest
37
+
38
+ steps :
39
+ - uses : actions/checkout@v4
40
+
41
+ - name : Set up Go
42
+ uses : actions/setup-go@v5
43
+ with :
44
+ go-version : ' 1.23.3'
45
+
46
+ - name : Install Boost library
47
+ run : |
48
+ brew install boost
49
+
50
+ - name : Build Kernel
51
+ run : make build-kernel
52
+
53
+ - name : Build
54
+ run : make build
55
+
56
+ - name : Run tests
57
+ run : make test
58
+
59
+ lint :
60
+ name : Lint
61
+ runs-on : ubuntu-latest
62
+
63
+ steps :
64
+ - uses : actions/checkout@v4
65
+
66
+ - name : Set up Go
67
+ uses : actions/setup-go@v5
68
+ with :
69
+ go-version : ' 1.23.3'
70
+
71
+ - name : Run linter
72
+ uses : golangci/golangci-lint-action@v4
73
+ with :
74
+ version : latest
Original file line number Diff line number Diff line change 1
1
# Makefile for go-bitcoinkernel
2
2
3
- .PHONY : all build-kernel test clean help
3
+ .PHONY : all build-kernel build test clean help
4
4
5
5
all : build-kernel test
6
6
7
7
build-kernel :
8
8
cd depend/bitcoin && \
9
- cmake -B build -DBUILD_SHARED_LIBS=ON -DBUILD_KERNEL_LIB=ON -DBUILD_BENCH=OFF -DBUILD_CLI=OFF -DBUILD_DAEMON=OFF -DBUILD_FOR_FUZZING=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_GUI=OFF -DBUILD_KERNEL_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_UTIL_CHAINSTATE=OFF -DBUILD_WALLET_TOOL=OFF -DENABLE_WALLET=OFF && \
9
+ cmake -B build \
10
+ -DBUILD_SHARED_LIBS=ON \
11
+ -DBUILD_KERNEL_LIB=ON \
12
+ -DBUILD_TESTS=OFF \
13
+ -DBUILD_TX=OFF \
14
+ -DBUILD_WALLET_TOOL=OFF \
15
+ -DENABLE_WALLET=OFF \
16
+ -DENABLE_EXTERNAL_SIGNER=OFF \
17
+ -DBUILD_UTIL=OFF \
18
+ -DBUILD_BITCOIN_BIN=OFF \
19
+ -DBUILD_DAEMON=OFF \
20
+ -DBUILD_UTIL_CHAINSTATE=OFF \
21
+ -DBUILD_CLI=OFF && \
10
22
cmake --build build --target bitcoinkernel -j $(shell nproc 2>/dev/null || echo 4)
11
23
12
- test : build-kernel
24
+ build :
25
+ go build ./...
26
+
27
+ test :
13
28
go test -v ./...
14
29
15
30
clean :
26
41
@echo " Available targets:"
27
42
@echo " all - Build kernel library and run tests (default)"
28
43
@echo " build-kernel - Build Bitcoin kernel library"
44
+ @echo " build - Compile Go code"
29
45
@echo " test - Run Go tests"
30
46
@echo " clean - Clean build artifacts"
31
47
@echo " lint - Lint Go code"
You can’t perform that action at this time.
0 commit comments