Skip to content

Commit 204ab42

Browse files
committed
Set VDF_MODE according to the passed env var, and make it 1 on the CI test workflows.
1 parent f31b096 commit 204ab42

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/test.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ jobs:
3636
run: |
3737
sudo apt-get install libgmp-dev libboost-python-dev libpython3-dev libboost-system-dev build-essential -y
3838
cd src
39-
make ${{ matrix.config }} -f Makefile.vdf-client
39+
VDF_MODE=1 make ${{ matrix.config }} -f Makefile.vdf-client
4040
4141
- name: Build vdf-client on Mac
4242
if: startsWith(matrix.os, 'mac')
4343
run: |
4444
brew install boost
4545
cd src
46+
# TODO: Are we expected to fail to compile with VDF_MODE=1 on macOS
4647
make ${{ matrix.config }} -f Makefile.vdf-client
4748
4849
- name: Test vdf-client

src/Makefile.vdf-client

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ endif
88

99
LDFLAGS += -flto $(NOPIE) -g
1010
LDLIBS += -lgmpxx -lgmp -lboost_system -pthread
11-
CXXFLAGS += -flto -std=c++1z -D VDF_MODE=0 -D FAST_MACHINE=1 -pthread $(NOPIE) -fvisibility=hidden
11+
12+
VDF_MODE ?= 0
13+
CXXFLAGS += -flto -std=c++1z -D VDF_MODE=$(VDF_MODE) -D FAST_MACHINE=1 -pthread $(NOPIE) -fvisibility=hidden
1214
ifeq ($(UNAME),Darwin)
1315
CXXFLAGS += -D CHIAOSX=1
1416
endif

0 commit comments

Comments
 (0)