From de9545a23bd1fdb59d27cf6e6826cdbf5452057d Mon Sep 17 00:00:00 2001 From: marpme Date: Thu, 7 Nov 2019 09:17:26 +0100 Subject: [PATCH] Check if wallet is enabled and add wallet inclusion (#997) * Check if wallet is enabled and add wallet inclusion * Add new test cases for the wallet tests * Add ubuntu repo updates for github workflows * Disable bdb compiling for no wallet --- .../workflows/build-test-ubuntu-no-wallet.yml | 31 +++++++++++++ .github/workflows/build-test-ubuntu.yml | 46 ++++++++++--------- src/rpc/mining.cpp | 4 ++ 3 files changed, 59 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/build-test-ubuntu-no-wallet.yml diff --git a/.github/workflows/build-test-ubuntu-no-wallet.yml b/.github/workflows/build-test-ubuntu-no-wallet.yml new file mode 100644 index 000000000..ed9f831fd --- /dev/null +++ b/.github/workflows/build-test-ubuntu-no-wallet.yml @@ -0,0 +1,31 @@ +name: '[NO WALLET] Ubuntu 18.04.' + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Update apt repos + run: sudo apt-get update + + - name: Install base dependencies + run: sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils libattr1-dev make automake cmake curl g++-multilib binutils-gold python3 + + - name: Build depends + run: cd depends/ && make -j4 HOST=x86_64-linux-gnu NO_WALLET=0 + + - name: Auto generate + run: ./autogen.sh + + - name: configure + run: ./configure --disable-wallet --disable-dependency-tracking --disable-werror --prefix=`pwd`/depends/x86_64-linux-gnu --bindir=`pwd`/release/bin --libdir=`pwd`/release/lib + + - name: make + run: make -j4 + + - name: make check + run: make check -j4 diff --git a/.github/workflows/build-test-ubuntu.yml b/.github/workflows/build-test-ubuntu.yml index 9dae55ed6..5d3298a4c 100644 --- a/.github/workflows/build-test-ubuntu.yml +++ b/.github/workflows/build-test-ubuntu.yml @@ -1,29 +1,31 @@ -name: Build and Test on Ubuntu +name: '[FULL] Ubuntu 18.04.' on: [push] jobs: build: - runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v1 - - - name: Install base dependencies - run: sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils libattr1-dev make automake cmake curl g++-multilib binutils-gold python3 - - - name: Build depends - run: cd depends/ && make -j4 HOST=x86_64-linux-gnu - - - name: Auto generate - run: ./autogen.sh - - - name: configure - run: ./configure --disable-bench --disable-dependency-tracking --disable-werror --prefix=`pwd`/depends/x86_64-linux-gnu --bindir=`pwd`/release/bin --libdir=`pwd`/release/lib - - - name: make - run: make -j4 - - - name: make check - run: make check -j4 + - uses: actions/checkout@v1 + + - name: Update apt repos + run: sudo apt-get update + + - name: Install base dependencies + run: sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils libattr1-dev make automake cmake curl g++-multilib binutils-gold python3 + + - name: Build depends + run: cd depends/ && make -j4 HOST=x86_64-linux-gnu + + - name: Auto generate + run: ./autogen.sh + + - name: configure + run: ./configure --disable-dependency-tracking --disable-werror --prefix=`pwd`/depends/x86_64-linux-gnu --bindir=`pwd`/release/bin --libdir=`pwd`/release/lib + + - name: make + run: make -j4 + + - name: make check + run: make check -j4 diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 0d8baef5c..4b5ee44a4 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -10,7 +10,11 @@ #include #include #include + +#ifdef ENABLE_WALLET #include +#endif + #include #include #include