Skip to content

Commit b25e846

Browse files
committed
ci: handle space exhaustion by deleting files we don't need
1 parent 0a1e635 commit b25e846

File tree

3 files changed

+44
-7
lines changed

3 files changed

+44
-7
lines changed

.github/workflows/test-src.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
export BUILD_TARGET="${{ inputs.build-target }}"
4545
export BUNDLE_KEY="${{ inputs.bundle-key }}"
4646
./ci/dash/bundle-artifacts.sh extract
47+
./ci/dash/slim-workspace.sh
4748
source ./ci/dash/matrix.sh
4849
./ci/dash/test_integrationtests.sh ${INTEGRATION_TESTS_ARGS}
4950
shell: bash

ci/dash/bundle-artifacts.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@ if [ "${VERB}" = "create" ]; then
4040
EXCLUSIONS=(
4141
"*.a"
4242
"*.o"
43-
"build-ci/dashcore-${BUILD_TARGET}/src/bench/bench_dash"
44-
"build-ci/dashcore-${BUILD_TARGET}/src/bench/bench_dash.exe"
45-
"build-ci/dashcore-${BUILD_TARGET}/src/qt/test/test_dash-qt"
46-
"build-ci/dashcore-${BUILD_TARGET}/src/qt/test/test_dash-qt.exe"
47-
"build-ci/dashcore-${BUILD_TARGET}/src/test/test_dash"
48-
"build-ci/dashcore-${BUILD_TARGET}/src/test/test_dash.exe"
49-
"build-ci/dashcore-${BUILD_TARGET}/src/test/fuzz/fuzz"
43+
".deps"
44+
".libs"
5045
)
5146
EXCLUSIONS_ARG=""
5247
for excl in "${EXCLUSIONS[@]}"

ci/dash/slim-workspace.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2025 The Dash Core developers
3+
# Distributed under the MIT software license, see the accompanying
4+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5+
6+
export LC_ALL=C.UTF-8
7+
8+
set -eo pipefail
9+
10+
SH_NAME="$(basename "${0}")"
11+
12+
if [ -z "${BUILD_TARGET}" ]; then
13+
echo "${SH_NAME}: BUILD_TARGET not defined, cannot continue!";
14+
exit 1;
15+
elif [ -z "${BUNDLE_KEY}" ]; then
16+
echo "${SH_NAME}: BUNDLE_KEY not defined, cannot continue!";
17+
exit 1;
18+
fi
19+
20+
TARGETS=(
21+
# Bundle restored from artifact
22+
"${BUNDLE_KEY}.tar.zst"
23+
# Binaries not needed by functional tests
24+
"build-ci/dashcore-${BUILD_TARGET}/src/dash-tx"
25+
"build-ci/dashcore-${BUILD_TARGET}/src/bench/bench_dash"
26+
"build-ci/dashcore-${BUILD_TARGET}/src/qt/dash-qt"
27+
"build-ci/dashcore-${BUILD_TARGET}/src/qt/test/test_dash-qt"
28+
"build-ci/dashcore-${BUILD_TARGET}/src/test/test_dash"
29+
"build-ci/dashcore-${BUILD_TARGET}/src/test/fuzz/fuzz"
30+
# Misc. files that can be heavy
31+
"build-ci/dashcore-${BUILD_TARGET}/src/qt/qrc_bitcoin.cpp"
32+
"build-ci/dashcore-${BUILD_TARGET}/src/qt/qrc_dash_locale.cpp"
33+
)
34+
35+
# Delete directories we don't need
36+
for target in "${TARGETS[@]}"
37+
do
38+
if [[ -d "${target}" ]] || [[ -f "${target}" ]]; then
39+
rm -rf "${target}";
40+
fi
41+
done

0 commit comments

Comments
 (0)