mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
## Additional Information * Based on suggestions by @knst made [here](https://github.com/dashpay/dash/pull/5449#issuecomment-1609937147) and [here](https://github.com/dashpay/dash/pull/5426#discussion_r1241789033)
This commit is contained in:
parent
d97ec350f0
commit
63c4e2456b
17
.github/workflows/guix-build.yml
vendored
17
.github/workflows/guix-build.yml
vendored
@ -51,11 +51,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker run --privileged -d --rm -t \
|
docker run --privileged -d --rm -t \
|
||||||
--name guix-daemon \
|
--name guix-daemon \
|
||||||
-e ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=32' \
|
-e ADDITIONAL_GUIX_COMMON_FLAGS="--max-jobs=$(nproc --all)" \
|
||||||
-v ${{ github.workspace }}:/src/dash \
|
-v ${{ github.workspace }}:/src/dash \
|
||||||
-w /src/dash \
|
-w /src/dash \
|
||||||
guix_ubuntu:latest && \
|
guix_ubuntu:latest && \
|
||||||
docker exec guix-daemon bash -c "/usr/local/bin/guix-start"
|
docker exec guix-daemon bash -c '/usr/local/bin/guix-start'
|
||||||
|
|
||||||
- name: Ensure build passes
|
- name: Ensure build passes
|
||||||
run: |
|
run: |
|
||||||
@ -63,14 +63,7 @@ jobs:
|
|||||||
echo "Guix build failed!"
|
echo "Guix build failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Compute SHA256 checksums for binaries
|
|
||||||
|
- name: Compute SHA256 checksums
|
||||||
run: |
|
run: |
|
||||||
( \
|
./contrib/containers/guix/scripts/guix-check ${{ github.workspace }}
|
||||||
SRC_PATH_PREFIX=guix-build-$(git rev-parse --short=12 HEAD)/distsrc- && \
|
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/dash{d,-cli,-tx,-wallet}{,.exe} && \
|
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/qt/dash-qt{,.exe} && \
|
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/test/test_dash{,.exe} \
|
|
||||||
) | sort -k 2
|
|
||||||
- name: Compute SHA256 checksums for archives
|
|
||||||
run: |
|
|
||||||
find guix-build-"$(git rev-parse --short=12 HEAD)"/output -type f | grep -v SHA256 | xargs sha256sum | sort -k 2
|
|
||||||
|
@ -2,16 +2,27 @@
|
|||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
cd /src/dash
|
if [[ -n "${1}" ]]; then
|
||||||
COMMIT_ID=$(git rev-parse --short=12 HEAD)
|
WORKSPACE_PATH="$1"
|
||||||
|
else
|
||||||
|
WORKSPACE_PATH="/src/dash"
|
||||||
|
fi
|
||||||
|
|
||||||
printf "Binaries:\n"
|
if [[ ! -d "$WORKSPACE_PATH" ]]; then
|
||||||
|
echo "$0: $WORKSPACE_PATH is not a valid directory, exiting!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$WORKSPACE_PATH"
|
||||||
|
COMMIT_ID="$(git rev-parse --short=12 HEAD)"
|
||||||
|
|
||||||
|
printf "\nBinaries:\n\n"
|
||||||
( \
|
( \
|
||||||
SRC_PATH_PREFIX=guix-build-${COMMIT_ID}/distsrc- && \
|
SRC_PATH_PREFIX="guix-build-${COMMIT_ID}/distsrc-" && \
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/dash{d,-cli,-tx,-wallet}{,.exe} && \
|
sha256sum ${SRC_PATH_PREFIX}*/src/dash{d,-cli,-tx,-wallet}{,.exe} && \
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/qt/dash-qt{,.exe} && \
|
sha256sum ${SRC_PATH_PREFIX}*/src/qt/dash-qt{,.exe} && \
|
||||||
sha256sum ${SRC_PATH_PREFIX}*/src/test/test_dash{,.exe} \
|
sha256sum ${SRC_PATH_PREFIX}*/src/test/test_dash{,.exe} \
|
||||||
) | sort -k 2
|
) | sort -k 2
|
||||||
|
|
||||||
printf "Archives:\n"
|
printf "\nArchives:\n\n"
|
||||||
find guix-build-"${COMMIT_ID}"/output -type f | grep -v SHA256 | xargs sha256sum | sort -k 2
|
find "guix-build-${COMMIT_ID}/output" -type f | grep -v SHA256 | xargs sha256sum | sort -k 2
|
||||||
|
@ -2,19 +2,30 @@
|
|||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
if [[ -n "${1}" ]]; then
|
||||||
|
WORKSPACE_PATH="$1"
|
||||||
|
else
|
||||||
|
WORKSPACE_PATH="/src/dash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -d "$WORKSPACE_PATH" ]]; then
|
||||||
|
echo "$0: $WORKSPACE_PATH is not a valid directory, exiting!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
XCODE_VERSION="12.1"
|
XCODE_VERSION="12.1"
|
||||||
XCODE_RELEASE="12A7403"
|
XCODE_RELEASE="12A7403"
|
||||||
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
|
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
|
||||||
|
|
||||||
# Check if macOS SDK is present, if not, download it
|
# Check if macOS SDK is present, if not, download it
|
||||||
if [ ! -d "/src/dash/depends/SDKs/${XCODE_ARCHIVE}" ]
|
if [ ! -d "${WORKSPACE_PATH}/depends/SDKs/${XCODE_ARCHIVE}" ]
|
||||||
then
|
then
|
||||||
mkdir -p /src/dash/depends/SDKs
|
mkdir -p "${WORKSPACE_PATH}/depends/SDKs"
|
||||||
curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C /src/dash/depends/SDKs
|
curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C "${WORKSPACE_PATH}/depends/SDKs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /src/dash
|
cd "${WORKSPACE_PATH}"
|
||||||
|
git config --global --add safe.directory "${WORKSPACE_PATH}"
|
||||||
git status >> /dev/null
|
git status >> /dev/null
|
||||||
git config --global --add safe.directory /src/dash
|
|
||||||
|
|
||||||
./contrib/guix/guix-build
|
./contrib/guix/guix-build
|
||||||
|
Loading…
Reference in New Issue
Block a user