Skip to content

Commit 7e86ad5

Browse files
committed
ci: build the DGB module in CI (-DCOIN_DGB=ON) + add dgb_share_test target
Two coupled fixes so the Phase-B DGB stack is actually build-verified by CI: 1. Set -DCOIN_DGB=ON in the Linux and ASan configure steps. The dgb coin module (src/impl/dgb) is gated behind if(COIN_DGB); no option() defaults it ON, so CI never compiled the module. test_dgb_subsidy passed only because it lives in the global test/ dir, outside the gate. Enabling the flag compiles the dgb OBJECT lib + dgb_coin + pool/share TU for the first time under CI (Linux + ASan/UBSan). 2. Add dgb_share_test to the --target allowlist in both jobs. It is defined in src/impl/dgb/test (inside the COIN_DGB gate) and links the dgb OBJECT lib, so it only exists once (1) sets the flag. Mirrors the #137 NOT_BUILT lesson: a gtest target must be in the build allowlist.
1 parent ac795e2 commit 7e86ad5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: conan install . --build=missing --output-folder=build_ci --settings=build_type=Release
4545

4646
- name: Configure
47-
run: cmake -S . -B build_ci -DCMAKE_TOOLCHAIN_FILE=build_ci/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
47+
run: cmake -S . -B build_ci -DCMAKE_TOOLCHAIN_FILE=build_ci/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCOIN_DGB=ON
4848

4949
- name: Build
5050
run: cmake --build build_ci --target c2pool -j$(nproc)
@@ -67,7 +67,7 @@ jobs:
6767
test_phase4_embedded \
6868
test_mweb_builder \
6969
test_address_resolution test_compute_share_target \
70-
test_utxo test_dgb_subsidy \
70+
test_utxo test_dgb_subsidy dgb_share_test \
7171
v37_test \
7272
-j$(nproc)
7373
@@ -171,6 +171,7 @@ jobs:
171171
cmake -S . -B build_asan \
172172
-DCMAKE_TOOLCHAIN_FILE=build_asan/conan_toolchain.cmake \
173173
-DCMAKE_BUILD_TYPE=Release \
174+
-DCOIN_DGB=ON \
174175
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-sanitize=vptr -fno-omit-frame-pointer -fno-sanitize-recover=undefined -g" \
175176
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined -fno-sanitize=vptr" \
176177
-DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,undefined -fno-sanitize=vptr"
@@ -193,7 +194,7 @@ jobs:
193194
test_phase4_embedded \
194195
test_mweb_builder \
195196
test_address_resolution test_compute_share_target \
196-
test_utxo test_dgb_subsidy \
197+
test_utxo test_dgb_subsidy dgb_share_test \
197198
test_coin_broadcaster test_multiaddress_pplns test_pplns_stress \
198199
v37_test \
199200
-j$(nproc)

0 commit comments

Comments
 (0)