Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/dashpay/dash into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Oct 29, 2024
2 parents 59d82be + 79ced62 commit cb16aec
Show file tree
Hide file tree
Showing 462 changed files with 15,274 additions and 3,066 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,24 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}


- name: Cache depends sources
uses: actions/cache@v4
with:
path: |
depends/sources
key: depends-sources-${{ hashFiles('depends/packages/*') }}
restore-keys: |
depends-sources-
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
depends/built
depends/${{ matrix.host }}
depends/sdk-sources
# We don't care about no specific key as depends system will handle that for us
key: ${{ runner.os }}-depends-${{ matrix.host }}-${{ github.sha }}
key: ${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
restore-keys: |
${{ runner.os }}-depends-${{ matrix.host }}-${{ github.sha }}
${{ runner.os }}-depends-${{ matrix.host }}
${{ runner.os }}-depends
${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
${{ runner.os }}-depends-${{ matrix.build_target }}
- name: Build dependencies
run: make -j$(nproc) -C depends HOST=${{ matrix.host }}
Expand Down Expand Up @@ -146,26 +151,27 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
depends/built
depends/${{ matrix.host }}
depends/sdk-sources
# We don't care about no specific key as depends system will handle that for us
key: ${{ runner.os }}-depends-${{ matrix.host }}-${{ github.sha }}
key: ${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
restore-keys: |
${{ runner.os }}-depends-${{ matrix.host }}-${{ github.sha }}
${{ runner.os }}-depends-${{ matrix.host }}
${{ runner.os }}-depends
${{ runner.os }}-depends-${{ matrix.build_target }}-${{ hashFiles('depends/packages/*') }}
${{ runner.os }}-depends-${{ matrix.build_target }}
- name: Determine PR Base SHA
id: vars
run: |
echo "PR_BASE_SHA=${{ github.event.pull_request.base.sha || '' }}" >> $GITHUB_OUTPUT
- name: CCache
uses: actions/cache@v4
with:
path: |
/cache
key: ${{ runner.os }}-${{ matrix.host }}-${{ github.sha }}
key: ${{ runner.os }}-${{ matrix.build_target }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.host }}-${{ github.sha }}
${{ runner.os }}-${{ matrix.host }}
${{ runner.os }}
${{ runner.os }}-${{ matrix.build_target }}-${{ github.sha }}
${{ runner.os }}-${{ matrix.build_target }}-${{ steps.vars.outputs.PR_BASE_SHA }}
${{ runner.os }}-${{ matrix.build_target }}
- name: Build source and run tests
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,21 @@ jobs:
path: dash
fetch-depth: 0

- name: Cache depends sources
uses: actions/cache@v4
with:
path: dash/depends/sources
key: depends-sources-${{ hashFiles('dash/depends/packages/*') }}
restore-keys: |
depends-sources-
- name: Cache Guix and depends
id: guix-cache-restore
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
${{ github.workspace }}/dash/depends/sources
${{ github.workspace }}/dash/depends/work
/gnu/store
key: ${{ runner.os }}-guix-${{ matrix.build_target }}-${{ github.sha }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/merge-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ jobs:
- name: Check merge --ff-only
run: |
git fetch origin master:master
git checkout master
if [ "${{ github.event_name }}" == "pull_request" ]; then
git merge --ff-only ${{ github.event.pull_request.head.sha }}
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then
git fetch origin ${{ github.event.pull_request.base.ref }}:base_branch
git checkout base_branch
git pull --rebase=false origin pull/${{ github.event.pull_request.number }}/head
git checkout master
git merge --ff-only base_branch
else
git checkout master
git merge --ff-only ${{ github.sha }}
fi
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.16
3.9.18
2 changes: 1 addition & 1 deletion .style.yapf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ each_dict_entry_on_separate_line=True
i18n_comment=

# The i18n function call names. The presence of this function stops
# reformattting on that line, because the string it has cannot be moved
# reformatting on that line, because the string it has cannot be moved
# away from the i18n comment.
i18n_function_call=

Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ LCOV_FILTER_PATTERN = \
-p "src/bench/" \
-p "src/univalue" \
-p "src/crypto/ctaes" \
-p "src/minisketch" \
-p "src/secp256k1" \
-p "depends"

Expand Down
13 changes: 13 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@ fi
command -v autoreconf >/dev/null || \
(echo "configuration failed, please install autoconf first" && exit 1)
autoreconf --install --force --warnings=all

if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then
chmod ug+w build-aux/config.guess
chmod ug+w src/secp256k1/build-aux/config.guess
cp depends/config.guess build-aux
cp depends/config.guess src/secp256k1/build-aux
fi
if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then
chmod ug+w build-aux/config.sub
chmod ug+w src/secp256k1/build-aux/config.sub
cp depends/config.sub build-aux
cp depends/config.sub src/secp256k1/build-aux
fi
18 changes: 14 additions & 4 deletions build-aux/m4/l_atomic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ dnl permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved. This file is offered as-is, without any
dnl warranty.

# Some versions of gcc/libstdc++ require linking with -latomic if
# using the C++ atomic library.
# Clang, when building for 32-bit,
# and linking against libstdc++, requires linking with
# -latomic if using the C++ atomic library.
# Can be tested with: clang++ -std=c++20 test.cpp -m32
#
# Sourced from http://bugs.debian.org/797228

Expand All @@ -18,13 +20,18 @@ m4_define([_CHECK_ATOMIC_testbody], [[
int main() {
std::atomic<bool> lock{true};
std::atomic_exchange(&lock, false);
lock.exchange(false);
std::atomic<std::chrono::seconds> t{0s};
t.store(2s);
auto t1 = t.load();
t.compare_exchange_strong(t1, 3s);
std::atomic<int64_t> a{};
std::atomic<double> d{};
d.store(3.14);
auto d1 = d.load();
std::atomic<int64_t> a{};
int64_t v = 5;
int64_t r = a.fetch_add(v);
return static_cast<int>(r);
Expand All @@ -34,6 +41,8 @@ m4_define([_CHECK_ATOMIC_testbody], [[
AC_DEFUN([CHECK_ATOMIC], [
AC_LANG_PUSH(C++)
TEMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
AC_MSG_CHECKING([whether std::atomic can be used without link library])
Expand All @@ -51,5 +60,6 @@ AC_DEFUN([CHECK_ATOMIC], [
])
])
CXXFLAGS="$TEMP_CXXFLAGS"
AC_LANG_POP
])
3 changes: 2 additions & 1 deletion ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ export COMMIT_RANGE
# check with -r to not have to fetch all the remotes.
test/lint/git-subtree-check.sh src/crypto/ctaes
test/lint/git-subtree-check.sh src/secp256k1
test/lint/git-subtree-check.sh src/minisketch
test/lint/git-subtree-check.sh src/univalue
test/lint/git-subtree-check.sh src/leveldb
test/lint/check-doc.py
test/lint/lint-all.sh

if [ "$CIRRUS_REPO_FULL_NAME" = "dashpay/dash" ] && [ -n "$CIRRUS_CRON" ]; then
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
${CI_RETRY_EXE} gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(<contrib/verify-commits/trusted-keys) &&
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys $(<contrib/verify-commits/trusted-keys) &&
./contrib/verify-commits/verify-commits.py --clean-merge=2;
fi

Expand Down
4 changes: 0 additions & 4 deletions ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,3 @@ export RUN_SECURITY_TESTS="false"
export GOAL="deploy"
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --without-boost-process"
export DIRECT_WINE_EXEC_TESTS=true

# Compiler for MinGW-w64 causes false -Wreturn-type warning.
# See https://sourceforge.net/p/mingw-w64/bugs/306/
export NO_WERROR=1
11 changes: 6 additions & 5 deletions ci/test/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ fi
DOCKER_EXEC echo "Free disk space:"
DOCKER_EXEC df -h

if [ ! -d ${DIR_QA_ASSETS} ]; then
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
DOCKER_EXEC git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
fi
if [ "$RUN_FUZZ_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
if [ ! -d ${DIR_QA_ASSETS} ]; then
DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
fi

export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
fi
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/

DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"

Expand Down
2 changes: 1 addition & 1 deletion ci/test/wrap-wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

export LC_ALL=C.UTF-8

for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{no_nul,test_json,unitester,object}}.exe; do
# shellcheck disable=SC2044
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do
if (file "$b" | grep "Windows"); then
Expand Down
Loading

0 comments on commit cb16aec

Please sign in to comment.