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
58 changes: 0 additions & 58 deletions .github/workflows/build-depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ on:
built-artifact:
description: "Artifact holding freshly built depends (empty when restored from cache)"
value: ${{ jobs.build.outputs.built-artifact }}
sdk-artifact:
description: "Artifact holding prepared SDKs (empty when restored from cache)"
value: ${{ jobs.check-cache.outputs.sdk-artifact }}

jobs:
check-cache:
Expand All @@ -55,7 +52,6 @@ jobs:
cache-key-prefix: ${{ steps.setup.outputs.cache-key-prefix }}
host: ${{ steps.setup.outputs.HOST }}
dep-opts: ${{ steps.setup.outputs.DEP_OPTS }}
sdk-artifact: ${{ steps.prepare-sdks.outputs.artifact }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -69,7 +65,6 @@ jobs:
depends
contrib/containers/ci/ci.Dockerfile
contrib/containers/ci/ci-slim.Dockerfile
contrib/containers/guix/scripts/setup-sdk

- name: Compute cache key
id: setup
Expand Down Expand Up @@ -104,36 +99,6 @@ jobs:
key: ${{ steps.setup.outputs.cache-key }}
lookup-only: true

- name: Cache SDKs
id: cache-sdk-check
uses: actions/cache@v5
if: inputs.build-target == 'mac'
with:
path: depends/SDKs
key: depends-sdks-${{ hashFiles('depends/hosts/darwin.mk') }}
restore-keys: depends-sdks-

- name: Prepare SDKs
id: prepare-sdks
if: inputs.build-target == 'mac' && steps.cache-sdk-check.outputs.cache-hit != 'true'
env:
BUILD_TARGET: ${{ inputs.build-target }}
run: |
./contrib/containers/guix/scripts/setup-sdk
echo "artifact=depends-sdks-${BUILD_TARGET}" >> "${GITHUB_OUTPUT}"

- name: Upload prepared SDKs
# This originates in check-cache so both Build depends (when needed)
# and Build source can use it even when a PR cannot save the cache.
if: steps.prepare-sdks.outputs.artifact != ''
uses: actions/upload-artifact@v6
with:
name: ${{ steps.prepare-sdks.outputs.artifact }}
path: depends/SDKs
compression-level: 0
retention-days: 1
overwrite: true

build:
name: Build depends
needs: [check-cache]
Expand Down Expand Up @@ -173,29 +138,6 @@ jobs:
key: depends-sources-${{ hashFiles('depends/packages/*') }}
restore-keys: depends-sources-

- name: Restore SDKs cache
id: sdk-cache
uses: actions/cache/restore@v5
if: inputs.build-target == 'mac'
with:
path: depends/SDKs
key: depends-sdks-${{ hashFiles('depends/hosts/darwin.mk') }}
restore-keys: depends-sdks-

- name: Download prepared SDKs
if: inputs.build-target == 'mac' && steps.sdk-cache.outputs.cache-hit != 'true' && needs.check-cache.outputs.sdk-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ needs.check-cache.outputs.sdk-artifact }}
path: depends/SDKs

- name: Check prepared SDKs are present
if: inputs.build-target == 'mac' && steps.sdk-cache.outputs.cache-hit != 'true' && needs.check-cache.outputs.sdk-artifact == ''
run: |
echo "::error::SDK cache restore missed and no prepared SDK artifact was provided"
exit 1
shell: bash

- name: Restore cached depends
uses: actions/cache/restore@v5
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/build-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ on:
required: false
type: string
default: ""
sdk-artifact:
description: "Artifact holding prepared SDKs, used if the cache restore misses"
required: false
type: string
default: ""
runs-on:
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
required: true
Expand Down Expand Up @@ -84,29 +79,6 @@ jobs:
echo "PR_BASE_SHA=${PR_BASE_SHA}" >> $GITHUB_OUTPUT
shell: bash

- name: Restore SDKs cache
id: sdk-cache
uses: actions/cache/restore@v5
if: inputs.build-target == 'mac'
with:
path: |
depends/SDKs
key: depends-sdks-${{ hashFiles('depends/hosts/darwin.mk') }}

- name: Download prepared SDKs
if: inputs.build-target == 'mac' && steps.sdk-cache.outputs.cache-hit != 'true' && inputs.sdk-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ inputs.sdk-artifact }}
path: depends/SDKs

- name: Check prepared SDKs are present
if: inputs.build-target == 'mac' && steps.sdk-cache.outputs.cache-hit != 'true' && inputs.sdk-artifact == ''
run: |
echo "::error::SDK cache restore missed and no prepared SDK artifact was provided"
exit 1
shell: bash

- name: Restore depends cache
id: depends-cache
uses: actions/cache/restore@v5
Expand Down Expand Up @@ -206,7 +178,6 @@ jobs:
source ./ci/dash/matrix.sh
./ci/dash/build_src.sh
{ echo "### ccache: ${BUILD_TARGET}"; echo '```'; ccache --show-stats; echo '```'; } >> "${GITHUB_STEP_SUMMARY}"
ccache -X 9
ccache -c
du -hd0 "${BASE_OUTDIR}"
rm -rf "${BASE_OUTDIR}"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ jobs:
depends-host: ${{ needs.depends-mac.outputs.host }}
depends-dep-opts: ${{ needs.depends-mac.outputs.dep-opts }}
depends-artifact: ${{ needs.depends-mac.outputs.built-artifact }}
sdk-artifact: ${{ needs.depends-mac.outputs.sdk-artifact }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
secrets: *remote-ccache-auth

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ jobs:
name: guix-artifacts-${{ matrix.build_target }}
path: |
${{ github.workspace }}/dash/guix-build*/output/${{ matrix.build_target }}/
compression-level: 0

- name: Attest build provenance
uses: actions/attest@v4
Expand Down
8 changes: 8 additions & 0 deletions ci/dash/bundle-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ if [ "${VERB}" = "create" ]; then
"*.o"
".deps"
".libs"
# Test binaries and generated sources that only the unit tests, run
# before bundling, need
"src/bench/bench_dash"
"src/qt/qrc_bitcoin.cpp"
"src/qt/qrc_dash_locale.cpp"
"src/qt/test/test_dash-qt"
"src/test/fuzz/fuzz"
"src/test/test_dash"
Comment on lines +45 to +52

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Exclude Windows .exe test binaries from bundles

The exclusion entries use extensionless names, while Automake appends $(EXEEXT) for the Windows target. The win64 build therefore produces src/bench/bench_dash.exe, src/qt/test/test_dash-qt.exe, src/test/fuzz/fuzz.exe, and src/test/test_dash.exe. Because build-src.yml runs the unit tests and then bundles the build for this target, these files exist when the script runs, and the extensionless patterns do not match them. The win64 artifact consequently still contains the test binaries that this PR says are no longer bundled.

Suggested change
# Test binaries and generated sources that only the unit tests, run
# before bundling, need
"src/bench/bench_dash"
"src/qt/qrc_bitcoin.cpp"
"src/qt/qrc_dash_locale.cpp"
"src/qt/test/test_dash-qt"
"src/test/fuzz/fuzz"
"src/test/test_dash"
# Test binaries and generated sources that only the unit tests, run
# before bundling, need
"src/bench/bench_dash"
"src/bench/bench_dash.exe"
"src/qt/qrc_bitcoin.cpp"
"src/qt/qrc_dash_locale.cpp"
"src/qt/test/test_dash-qt"
"src/qt/test/test_dash-qt.exe"
"src/test/fuzz/fuzz"
"src/test/fuzz/fuzz.exe"
"src/test/test_dash"
"src/test/test_dash.exe"

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general, dash-core-commit-history)

)
EXCLUSIONS_ARG=""
for excl in "${EXCLUSIONS[@]}"
Expand Down
2 changes: 1 addition & 1 deletion ci/dash/bundle-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ if [ -f "${LOG_ARCHIVE}" ]; then
exit 1;
fi

tar --use-compress-program="zstd -T0 -5" -cf "${LOG_ARCHIVE}" "${LOG_DIRECTORY}"
tar --use-compress-program="zstd -T0 -9" -cf "${LOG_ARCHIVE}" "${LOG_DIRECTORY}"
sha256sum "${LOG_ARCHIVE}" > "${LOG_ARCHIVE}.sha256";
7 changes: 0 additions & 7 deletions ci/dash/slim-workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ TARGETS=(
"${BUNDLE_KEY}.tar.zst"
# Binaries not needed by functional tests
"build-ci/dashcore-${BUILD_TARGET}/src/dash-tx"
"build-ci/dashcore-${BUILD_TARGET}/src/bench/bench_dash"
"build-ci/dashcore-${BUILD_TARGET}/src/qt/dash-qt"
"build-ci/dashcore-${BUILD_TARGET}/src/qt/test/test_dash-qt"
"build-ci/dashcore-${BUILD_TARGET}/src/test/test_dash"
"build-ci/dashcore-${BUILD_TARGET}/src/test/fuzz/fuzz"
# Misc. files that can be heavy
"build-ci/dashcore-${BUILD_TARGET}/src/qt/qrc_bitcoin.cpp"
"build-ci/dashcore-${BUILD_TARGET}/src/qt/qrc_dash_locale.cpp"
)

# Delete what we don't need
Expand Down
1 change: 1 addition & 0 deletions ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export CACHE_DIR=${CACHE_DIR:-$HOST_CACHE_DIR}
export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-100M}
export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
export CCACHE_COMPRESSLEVEL=${CCACHE_COMPRESSLEVEL:-9}
# The cache dir.
# This folder exists only on the ci guest, and on the ci host as a volume.
export CCACHE_DIR=${CCACHE_DIR:-$CACHE_DIR/ccache}
Expand Down
15 changes: 15 additions & 0 deletions contrib/containers/ci/ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,21 @@ RUN set -ex; \
-o /usr/local/bin/clang-tidy-cache; \
chmod +x /usr/local/bin/clang-tidy-cache;

# The SDK lives in the image rather than in a per-run cache. depends/Makefile
# looks for it under depends/SDKs, inside the checkout, so point it here.
# Keep the version in sync with depends/hosts/darwin.mk.
ARG XCODE_VERSION=26.1.1
ARG XCODE_BUILD_ID=17B100
ARG OSX_SDK_SHA256=9600fa93644df674ee916b5e2c8a6ba8dacf631996a65dc922d003b98b5ea3b1
ENV SDK_PATH=/opt/SDKs
RUN set -ex; \
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers"; \
curl -fL "https://bitcoincore.org/depends-sources/sdks/${OSX_SDK_BASENAME}.tar" -o /tmp/sdk.tar; \
echo "${OSX_SDK_SHA256} /tmp/sdk.tar" | sha256sum -c -; \
mkdir -p "${SDK_PATH}"; \
tar -C "${SDK_PATH}" -xf /tmp/sdk.tar; \
rm -f /tmp/sdk.tar

RUN \
mkdir -p /cache/ccache && \
mkdir /cache/ctcache && \
Expand Down
Loading