Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,40 +197,40 @@ jobs:
working-directory: ${{ github.workspace }}
run: |
if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors"
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors
fi
if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors"
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors
fi
if [[ -e "libbitcoin-system/obj/test.log" ]]; then
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors"
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors
fi
if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors"
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors
fi
if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors"
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors
fi
if [[ -e "libbitcoin-database/obj/test.log" ]]; then
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors"
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors
fi
if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors"
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors
fi
if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors"
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors
fi
if [[ -e "libbitcoin-network/obj/test.log" ]]; then
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors"
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors
fi
if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors"
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors
fi
if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors"
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors
fi
if [[ -e "libbitcoin-node/obj/test.log" ]]; then
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors"
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors
fi

- name: Test artifact upload
Expand Down Expand Up @@ -428,40 +428,40 @@ jobs:
working-directory: ${{ github.workspace }}
run: |
if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors"
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors
fi
if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors"
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors
fi
if [[ -e "libbitcoin-system/obj/test.log" ]]; then
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors"
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors
fi
if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors"
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors
fi
if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors"
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors
fi
if [[ -e "libbitcoin-database/obj/test.log" ]]; then
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors"
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors
fi
if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors"
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors
fi
if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors"
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors
fi
if [[ -e "libbitcoin-network/obj/test.log" ]]; then
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors"
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors
fi
if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors"
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors
fi
if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors"
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors
fi
if [[ -e "libbitcoin-node/obj/test.log" ]]; then
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors"
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors
fi

- name: Test artifact upload
Expand Down Expand Up @@ -618,40 +618,40 @@ jobs:
working-directory: ${{ github.workspace }}
run: |
if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors"
cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors
fi
if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors"
cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors
fi
if [[ -e "libbitcoin-system/obj/test.log" ]]; then
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors"
cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors
fi
if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors"
cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors
fi
if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors"
cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors
fi
if [[ -e "libbitcoin-database/obj/test.log" ]]; then
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors"
cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors
fi
if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors"
cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors
fi
if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors"
cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors
fi
if [[ -e "libbitcoin-network/obj/test.log" ]]; then
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors"
cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors
fi
if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors"
cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors
fi
if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors"
cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors
fi
if [[ -e "libbitcoin-node/obj/test.log" ]]; then
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors"
cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors
fi

- name: Test artifact upload
Expand Down
51 changes: 45 additions & 6 deletions builds/cmake/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
# --build-use-local-src Use existing sources in relevant paths.
# --prefix=<path> Installation destination.
# Default: /usr/local
# --noninteractive Disable any prompt using default.
# --verbose Display verbose script output.
# --help, -h Display usage, overriding script execution.
#
Expand Down Expand Up @@ -115,6 +116,7 @@ main()
(--build-parallel=*) PARALLEL="${OPTION#*=}";;
(--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";;
(--prefix=*) PREFIX="${OPTION#*=}";;
(--noninteractive) NONINTERACTIVE="yes";;
(--verbose) DISPLAY_VERBOSE="yes";;
(--help|-h) DISPLAY_HELP="yes";;
(-DCMAKE_PREFIX_PATH=*) CMAKE_PREFIX_PATH="${OPTION#*=}";;
Expand All @@ -139,6 +141,7 @@ main()
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--prefix=*/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/-h/}")
Expand Down Expand Up @@ -539,8 +542,19 @@ source_archive()
fi

if [ -d "${PROJECT}" ]; then
msg_warn "Encountered existing '${PROJECT}' directory, removing..."
remove_directory_force "${PROJECT}"
msg_warn "Encountered existing '${PROJECT}' directory..."
if [[ "${NONINTERACTIVE}" == "yes" ]]; then
CONFIRM="N"
else
read -p "Replace '${PROJECT}' directory with intended contents? [y/N] " CONFIRM
fi

if [[ "${CONFIRM,,}" == "y" ]]; then
remove_directory_force "${PROJECT}"
else
msg_error "Aborted installation."
exit 0
fi
fi

msg "Retrieving ${PROJECT}..."
Expand Down Expand Up @@ -568,6 +582,18 @@ source_archive()
msg_success "Completed download and extraction successfully."
}

github_repository_status()
{
local REPOSITORY="$1"

push_directory "${REPOSITORY}"
local DISCOVERED_COMMIT=$(git rev-parse HEAD)
local DISCOVERED_URL=$(git config --get remote.origin.url)
pop_directory # REPOSITORY
msg_warn " commit : ${DISCOVERED_COMMIT}"
msg_warn " url : ${DISCOVERED_URL}"
}

source_github()
{
local OWNER="$1"
Expand All @@ -589,21 +615,33 @@ source_github()
if [ -d "${REPOSITORY}" ] &&
[[ "${BUILD_USE_LOCAL_SRC}" == "yes" ]]; then
msg_warn "Reusing existing '${REPOSITORY}'..."
github_repository_status "${REPOSITORY}"
pop_directory # BUILD_SRC_DIR
return 0
fi

if [ -d "${REPOSITORY}" ]; then
msg_warn "Encountered existing '${REPOSITORY}' directory, removing..."
remove_directory_force "${REPOSITORY}"
msg_warn "Encountered existing '${REPOSITORY}' directory..."
if [[ "${NONINTERACTIVE}" == "yes" ]]; then
CONFIRM="N"
else
read -p "Replace '${REPOSITORY}' directory with intended contents? [y/N] " CONFIRM
fi

if [[ "${CONFIRM,,}" == "y" ]]; then
remove_directory_force "${REPOSITORY}"
else
msg_error "Aborted installation."
exit 0
fi
fi

msg "Cloning ${OWNER}/${REPOSITORY}/${TAG}..."

${GIT_CLONE} ${CLONE_OPTIONS} --branch "${TAG}" "https://github.com/${OWNER}/${REPOSITORY}"

# pop BUILD_SRC_DIR
pop_directory
github_repository_status "${REPOSITORY}"
pop_directory # pop BUILD_SRC_DIR
}

install_make()
Expand Down Expand Up @@ -952,6 +990,7 @@ help()
msg "--build-use-local-src Use existing sources in relevant paths."
msg "--prefix=<path> Installation destination."
msg " Default: /usr/local"
msg "--noninteractive Disable any prompt using default."
msg "--verbose Display verbose script output."
msg "--help, -h Display usage, overriding script execution."
msg ""
Expand Down
51 changes: 45 additions & 6 deletions builds/cmake/install-presets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# --build-parallel=<int> Number of jobs to run simultaneously.
# Default: supported platforms use nproc/sysctl
# --build-use-local-src Use existing sources in relevant paths.
# --noninteractive Disable any prompt using default.
# --verbose Display verbose script output.
# --help, -h Display usage, overriding script execution.
#
Expand Down Expand Up @@ -101,6 +102,7 @@ main()
(--build-skip-tests) BUILD_SKIP_TESTS="yes";;
(--build-parallel=*) PARALLEL="${OPTION#*=}";;
(--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";;
(--noninteractive) NONINTERACTIVE="yes";;
(--verbose) DISPLAY_VERBOSE="yes";;
(--help|-h) DISPLAY_HELP="yes";;
(-DCMAKE_PREFIX_PATH=*) CMAKE_PREFIX_PATH="${OPTION#*=}";;
Expand All @@ -121,6 +123,7 @@ main()
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-skip-tests/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}")
CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/-h/}")
Expand Down Expand Up @@ -555,8 +558,19 @@ source_archive()
fi

if [ -d "${PROJECT}" ]; then
msg_warn "Encountered existing '${PROJECT}' directory, removing..."
remove_directory_force "${PROJECT}"
msg_warn "Encountered existing '${PROJECT}' directory..."
if [[ "${NONINTERACTIVE}" == "yes" ]]; then
CONFIRM="N"
else
read -p "Replace '${PROJECT}' directory with intended contents? [y/N] " CONFIRM
fi

if [[ "${CONFIRM,,}" == "y" ]]; then
remove_directory_force "${PROJECT}"
else
msg_error "Aborted installation."
exit 0
fi
fi

msg "Retrieving ${PROJECT}..."
Expand Down Expand Up @@ -584,6 +598,18 @@ source_archive()
msg_success "Completed download and extraction successfully."
}

github_repository_status()
{
local REPOSITORY="$1"

push_directory "${REPOSITORY}"
local DISCOVERED_COMMIT=$(git rev-parse HEAD)
local DISCOVERED_URL=$(git config --get remote.origin.url)
pop_directory # REPOSITORY
msg_warn " commit : ${DISCOVERED_COMMIT}"
msg_warn " url : ${DISCOVERED_URL}"
}

source_github()
{
local OWNER="$1"
Expand All @@ -605,21 +631,33 @@ source_github()
if [ -d "${REPOSITORY}" ] &&
[[ "${BUILD_USE_LOCAL_SRC}" == "yes" ]]; then
msg_warn "Reusing existing '${REPOSITORY}'..."
github_repository_status "${REPOSITORY}"
pop_directory # BUILD_SRC_DIR
return 0
fi

if [ -d "${REPOSITORY}" ]; then
msg_warn "Encountered existing '${REPOSITORY}' directory, removing..."
remove_directory_force "${REPOSITORY}"
msg_warn "Encountered existing '${REPOSITORY}' directory..."
if [[ "${NONINTERACTIVE}" == "yes" ]]; then
CONFIRM="N"
else
read -p "Replace '${REPOSITORY}' directory with intended contents? [y/N] " CONFIRM
fi

if [[ "${CONFIRM,,}" == "y" ]]; then
remove_directory_force "${REPOSITORY}"
else
msg_error "Aborted installation."
exit 0
fi
fi

msg "Cloning ${OWNER}/${REPOSITORY}/${TAG}..."

${GIT_CLONE} ${CLONE_OPTIONS} --branch "${TAG}" "https://github.com/${OWNER}/${REPOSITORY}"

# pop BUILD_SRC_DIR
pop_directory
github_repository_status "${REPOSITORY}"
pop_directory # pop BUILD_SRC_DIR
}

install_make()
Expand Down Expand Up @@ -1009,6 +1047,7 @@ help()
msg "--build-parallel=<int> Number of jobs to run simultaneously."
msg " Default: supported platforms use nproc/sysctl"
msg "--build-use-local-src Use existing sources in relevant paths."
msg "--noninteractive Disable any prompt using default."
msg "--verbose Display verbose script output."
msg "--help, -h Display usage, overriding script execution."
msg ""
Expand Down
Loading