Skip to content

Commit

Permalink
Merge pull request #117 from pmienk/version3
Browse files Browse the repository at this point in the history
Regenerate artifacts.
  • Loading branch information
evoskuil committed Nov 21, 2022
2 parents c6d3f0f + 54145e5 commit 0120e80
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 30 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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' }}
Expand Down Expand Up @@ -139,6 +143,7 @@ jobs:
- name: Execute install.sh
run: >
./install.sh
--enable-isystem
--build-dir=${{ github.workspace }}/build
--prefix=${{ github.workspace }}/prefixenv
${{ env.LINKAGE }}
Expand All @@ -155,7 +160,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 }}
Expand Down Expand Up @@ -305,7 +310,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' }}
Expand Down Expand Up @@ -356,7 +365,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 }}
Expand Down Expand Up @@ -456,7 +465,7 @@ jobs:
uses: microsoft/setup-msbuild@v1.1

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize SDK
shell: powershell
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
34 changes: 23 additions & 11 deletions install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# --prefix=<absolute-path> 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.
Expand All @@ -36,17 +37,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-consensus"

# Git clone parameters.
#------------------------------------------------------------------------------
GIT_CLONE_PARAMS="--depth 1 --single-branch"

PRESUMED_CI_PROJECT_PATH=$(pwd)

# Boost archive.
Expand Down Expand Up @@ -141,12 +138,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
}

Expand Down Expand Up @@ -220,6 +222,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#*=}";;
Expand Down Expand Up @@ -290,7 +293,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
Expand Down Expand Up @@ -474,9 +477,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
}

Expand Down Expand Up @@ -716,7 +728,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"
Expand Down
34 changes: 23 additions & 11 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# --prefix=<absolute-path> 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.
Expand All @@ -36,17 +37,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-consensus"

# Git clone parameters.
#------------------------------------------------------------------------------
GIT_CLONE_PARAMS="--depth 1 --single-branch"

PRESUMED_CI_PROJECT_PATH=$(pwd)

# Boost archive.
Expand Down Expand Up @@ -141,12 +138,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
}

Expand Down Expand Up @@ -220,6 +222,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#*=}";;
Expand Down Expand Up @@ -285,7 +288,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
Expand Down Expand Up @@ -417,9 +420,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
}

Expand Down Expand Up @@ -596,7 +608,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"
Expand Down

0 comments on commit 0120e80

Please sign in to comment.