diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47e3490..3df7869 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Prepare toolchain [generic] + run: | + git config --global init.defaultBranch master - name: Prepare toolchain [apt] if: ${{ matrix.packager == 'apt' }} @@ -151,6 +155,7 @@ jobs: - name: Execute install.sh run: > ./install.sh + --enable-isystem --build-dir=${{ github.workspace }}/build --prefix=${{ github.workspace }}/prefixenv ${{ env.LINKAGE }} @@ -169,7 +174,7 @@ jobs: - name: Coveralls.io Upload if: ${{ matrix.coverage == 'cov' }} - uses: coverallsapp/github-action@master + uses: pmienk/coveralls-github-action@master with: path-to-lcov: "./coverage.info" github-token: ${{ secrets.github_token }} @@ -331,7 +336,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Prepare toolchain [generic] + run: | + git config --global init.defaultBranch master - name: Prepare toolchain [apt] if: ${{ matrix.packager == 'apt' }} @@ -384,7 +393,7 @@ jobs: - name: Coveralls.io Upload if: ${{ matrix.coverage == 'cov' }} - uses: coverallsapp/github-action@master + uses: pmienk/coveralls-github-action@master with: path-to-lcov: "./coverage.info" github-token: ${{ secrets.github_token }} @@ -484,7 +493,7 @@ jobs: uses: microsoft/setup-msbuild@v1.1 - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize SDK shell: powershell diff --git a/configure.ac b/configure.ac index db6d67b..fac70ae 100644 --- a/configure.ac +++ b/configure.ac @@ -37,14 +37,14 @@ AM_PROG_AR # Initialize libtool. LT_PREREQ(2.4.2) + +# Enable shared libraries if available, and static if they don't conflict. LT_INIT +AC_SUBST([LIBTOOL_DEPS]) # Determine C++ compiler to use. AC_PROG_CXX -# Enable shared libraries if available, and static if they don't conflict. -AC_PROG_LIBTOOL - # Enable sed for substitution. AC_PROG_SED diff --git a/install-cmake.sh b/install-cmake.sh index 6f881dd..a2d4f1f 100755 --- a/install-cmake.sh +++ b/install-cmake.sh @@ -24,6 +24,7 @@ # --prefix= Library install location (defaults to /usr/local). # --disable-shared Disables shared library builds. # --disable-static Disables static library builds. +# --verbose Display verbose output (defaults to quiet on called tooling). # --help Display usage, overriding script execution. # # Verified on Ubuntu 14.04, requires gcc-4.8 or newer. @@ -47,17 +48,13 @@ SEQUENTIAL=1 if [[ $GIT_CLONE_PARAMS ]]; then display_message "Using shell-defined GIT_CLONE_PARAMS value." else - GIT_CLONE_PARAMS="" + GIT_CLONE_PARAMS="--depth 1 --single-branch" fi # The default build directory. #------------------------------------------------------------------------------ BUILD_DIR="build-libbitcoin-protocol" -# Git clone parameters. -#------------------------------------------------------------------------------ -GIT_CLONE_PARAMS="--depth 1 --single-branch" - PRESUMED_CI_PROJECT_PATH=$(pwd) # ICU archive. @@ -162,12 +159,17 @@ make_jobs() local JOBS=$1 shift 1 + VERBOSITY="" + if [[ DISPLAY_VERBOSE ]]; then + VERBOSITY="VERBOSE=1" + fi + SEQUENTIAL=1 # Avoid setting -j1 (causes problems on single threaded systems [TRAVIS]). if [[ $JOBS > $SEQUENTIAL ]]; then - make -j"$JOBS" "$@" + make -j"$JOBS" "$@" $VERBOSITY else - make "$@" + make "$@" $VERBOSITY fi } @@ -252,6 +254,7 @@ parse_command_line_options() case $OPTION in # Standard script options. (--help) DISPLAY_HELP="yes";; + (--verbose) DISPLAY_VERBOSE="yes";; # Standard build options. (--prefix=*) PREFIX="${OPTION#*=}";; @@ -325,7 +328,7 @@ set_os_specific_compiler_settings() link_to_standard_library() { - if [[ ($OS == Linux && $CC == "clang") || ($OS == OpenBSD) ]]; then + if [[ ($OS == Linux && $CC == clang*) || ($OS == OpenBSD) ]]; then export LDLIBS="-l$STDLIB $LDLIBS" export CXXFLAGS="-stdlib=lib$STDLIB $CXXFLAGS" fi @@ -518,9 +521,18 @@ extract_from_tarball() push_directory "$TARGET_DIR" # Extract the source locally. - wget --output-document "$ARCHIVE" "$URL" - tar --extract --file "$ARCHIVE" "--$COMPRESSION" --strip-components=1 + WGET="wget --quiet" + TAR="tar" + + if [[ $DISPLAY_VERBOSE ]]; then + WGET="wget --verbose" + TAR="tar --verbose" + fi + + $WGET --output-document "$ARCHIVE" "$URL" + $TAR --extract --file "$ARCHIVE" "--$COMPRESSION" --strip-components=1 + display_message "Completed download and extraction successfully." pop_directory } @@ -760,7 +772,7 @@ initialize_boost_configuration() BOOST_TOOLSET="toolset=$CC" fi - if [[ ($OS == Linux && $CC == "clang") || ($OS == OpenBSD) ]]; then + if [[ ($OS == Linux && $CC == clang*) || ($OS == OpenBSD) ]]; then STDLIB_FLAG="-stdlib=lib$STDLIB" BOOST_CXXFLAGS="cxxflags=$STDLIB_FLAG" BOOST_LINKFLAGS="linkflags=$STDLIB_FLAG" diff --git a/install.sh b/install.sh index a1e839d..cadd76c 100755 --- a/install.sh +++ b/install.sh @@ -24,6 +24,7 @@ # --prefix= Library install location (defaults to /usr/local). # --disable-shared Disables shared library builds. # --disable-static Disables static library builds. +# --verbose Display verbose output (defaults to quiet on called tooling). # --help Display usage, overriding script execution. # # Verified on Ubuntu 14.04, requires gcc-4.8 or newer. @@ -47,17 +48,13 @@ SEQUENTIAL=1 if [[ $GIT_CLONE_PARAMS ]]; then display_message "Using shell-defined GIT_CLONE_PARAMS value." else - GIT_CLONE_PARAMS="" + GIT_CLONE_PARAMS="--depth 1 --single-branch" fi # The default build directory. #------------------------------------------------------------------------------ BUILD_DIR="build-libbitcoin-protocol" -# Git clone parameters. -#------------------------------------------------------------------------------ -GIT_CLONE_PARAMS="--depth 1 --single-branch" - PRESUMED_CI_PROJECT_PATH=$(pwd) # ICU archive. @@ -162,12 +159,17 @@ make_jobs() local JOBS=$1 shift 1 + VERBOSITY="" + if [[ DISPLAY_VERBOSE ]]; then + VERBOSITY="VERBOSE=1" + fi + SEQUENTIAL=1 # Avoid setting -j1 (causes problems on single threaded systems [TRAVIS]). if [[ $JOBS > $SEQUENTIAL ]]; then - make -j"$JOBS" "$@" + make -j"$JOBS" "$@" $VERBOSITY else - make "$@" + make "$@" $VERBOSITY fi } @@ -252,6 +254,7 @@ parse_command_line_options() case $OPTION in # Standard script options. (--help) DISPLAY_HELP="yes";; + (--verbose) DISPLAY_VERBOSE="yes";; # Standard build options. (--prefix=*) PREFIX="${OPTION#*=}";; @@ -320,7 +323,7 @@ set_os_specific_compiler_settings() link_to_standard_library() { - if [[ ($OS == Linux && $CC == "clang") || ($OS == OpenBSD) ]]; then + if [[ ($OS == Linux && $CC == clang*) || ($OS == OpenBSD) ]]; then export LDLIBS="-l$STDLIB $LDLIBS" export CXXFLAGS="-stdlib=lib$STDLIB $CXXFLAGS" fi @@ -455,9 +458,18 @@ extract_from_tarball() push_directory "$TARGET_DIR" # Extract the source locally. - wget --output-document "$ARCHIVE" "$URL" - tar --extract --file "$ARCHIVE" "--$COMPRESSION" --strip-components=1 + WGET="wget --quiet" + TAR="tar" + + if [[ $DISPLAY_VERBOSE ]]; then + WGET="wget --verbose" + TAR="tar --verbose" + fi + + $WGET --output-document "$ARCHIVE" "$URL" + $TAR --extract --file "$ARCHIVE" "--$COMPRESSION" --strip-components=1 + display_message "Completed download and extraction successfully." pop_directory } @@ -634,7 +646,7 @@ initialize_boost_configuration() BOOST_TOOLSET="toolset=$CC" fi - if [[ ($OS == Linux && $CC == "clang") || ($OS == OpenBSD) ]]; then + if [[ ($OS == Linux && $CC == clang*) || ($OS == OpenBSD) ]]; then STDLIB_FLAG="-stdlib=lib$STDLIB" BOOST_CXXFLAGS="cxxflags=$STDLIB_FLAG" BOOST_LINKFLAGS="linkflags=$STDLIB_FLAG"