diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11156350e..497096a7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ test_asan_ubsan_gcc: image: greenaddress/wallycore@sha256:956b107d688f549c6e3884424991b7d3d34d84173990d43046fd760d7918db7c parallel: matrix: - - CONFIGURE_ARGS: [--enable-elements=yes, --enable-elements=no,--enable-minimal=yes] + - CONFIGURE_ARGS: [ --enable-elements=no, --enable-elements=no --enable-minimal=yes, "", --enable-minimal=yes ] tags: - ga script: @@ -48,19 +48,19 @@ test_scan_build_clang: image: greenaddress/wallycore@sha256:956b107d688f549c6e3884424991b7d3d34d84173990d43046fd760d7918db7c parallel: matrix: - - CONFIGURE_ARGS: [--enable-elements=yes, --enable-elements=no,--enable-minimal=yes] + - CONFIGURE_ARGS: [ --enable-elements=no, --enable-elements=no --enable-minimal=yes, "", --enable-minimal=yes ] tags: - ga script: - ./tools/cleanup.sh && ./tools/autogen.sh - - CC=clang scan-build-11 ./configure --enable-export-all --enable-swig-python --enable-swig-java --disable-clear-tests --disable-asm - - scan-build-11 --keep-cc --exclude src/secp256k1/ --status-bugs --keep-empty -o scan-build$CONFIGURE_ARGS make -j $(($(grep ^processor /proc/cpuinfo | wc -l) / 2)) + - CC=clang scan-build-11 ./configure --enable-export-all --enable-swig-python --enable-swig-java --disable-clear-tests --disable-asm $CONFIGURE_ARGS + - scan-build-11 --keep-cc --exclude src/secp256k1/ --status-bugs --keep-empty -o scan-build-output make -j $(($(grep ^processor /proc/cpuinfo | wc -l) / 2)) artifacts: expire_in: 3 days - name: scan-build$CONFIGURE_ARGS + name: scan-build-output when: on_success paths: - - scan-build$CONFIGURE_ARGS/* + - scan-build-output/ test_cmake: stage: test @@ -95,16 +95,15 @@ test_cmake: test_amalgamation: stage: test image: greenaddress/wallycore@sha256:956b107d688f549c6e3884424991b7d3d34d84173990d43046fd760d7918db7c + parallel: + matrix: + - CC: [gcc, clang ] + BUILD_ARGS: [ "", -DBUILD_MINIMAL, -DBUILD_ELEMENTS, -DBUILD_ELEMENTS -DBUILD_MINIMAL ] tags: - ga script: - touch config.h - - gcc -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c - - gcc -DBUILD_ELEMENTS -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c - - gcc -DBUILD_ELEMENTS -DBUILD_MINIMAL -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c - - clang -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c - - clang -DBUILD_ELEMENTS -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c - - clang -DBUILD_ELEMENTS -DBUILD_MINIMAL -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c + - $CC $BUILD_ARGS -Wall -W -Wextra -Werror -I. -I./src -I./src/ccan -I./src/secp256k1/include src/ctest/amalgamation_compile_test.c test_mingw_static_build: stage: test diff --git a/configure.ac b/configure.ac index d1c154c34..0aecb2751 100644 --- a/configure.ac +++ b/configure.ac @@ -149,9 +149,6 @@ if test "x$standard_secp" = "xyes"; then fi if test "x$minimal" = "xyes"; then - if test "x$elements" = "xno"; then - AC_MSG_FAILURE([ERROR: Minimal mode requires Elements support to be enabled]) - fi AX_CHECK_COMPILE_FLAG([-DBUILD_MINIMAL=1], [AM_CFLAGS="$AM_CFLAGS -DBUILD_MINIMAL=1"]) fi diff --git a/src/transaction.c b/src/transaction.c index d168a8a55..b5e6e2777 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -2111,6 +2111,8 @@ static int tx_to_bytes(const struct wally_tx *tx, p += varbuff_to_bytes(output->rangeproof, output->rangeproof_len, p); } } +#else + (void)p; /* Prevent scan-build warning in non-elements builds */ #endif *written = n; return WALLY_OK;