Skip to content

Commit efe07f5

Browse files
ci: exercise the PLATFORM_GUI depends knob in a linux64_platform_gui lane
The new lane builds depends with PLATFORM_GUI=1 (producing and hash-verifying the Platform CXX archive offline from vendored crates), then builds dash-qt against that prefix and runs the unit tests. The cache-sources producer generates and caches the platform-cxx vendored-crates archive, handing it to same-run consumers as an artifact on cache miss. The --enable-platform-gui configure flag is added to this lane's BITCOIN_CONFIG by the Platform client library PR; until then the lane proves the depends knob and prefix link-compatibility. build.yml runs PR validation from the base branch (pull_request_target), so the lane first runs on push CI for this branch and takes effect for PRs after merge.
1 parent 97c428a commit efe07f5

5 files changed

Lines changed: 129 additions & 2 deletions

File tree

‎.github/workflows/build-depends.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
description: "Short hash of the CI base image manifest for cache busting"
1616
required: true
1717
type: string
18+
rust-vendor-artifact:
19+
description: "Artifact holding freshly generated Rust vendor archives"
20+
required: false
21+
type: string
22+
default: ""
1823
runs-on:
1924
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2025
required: true
@@ -144,6 +149,28 @@ jobs:
144149
key: depends-sources-${{ hashFiles('depends/packages/*') }}
145150
restore-keys: depends-sources-
146151

152+
- name: Restore Rust vendor sources
153+
id: rust-vendor-cache
154+
if: inputs.build-target == 'linux64_platform_gui'
155+
uses: actions/cache/restore@v5
156+
with:
157+
path: depends/sources/platform-cxx-*-vendored.tar.gz
158+
key: depends-rust-vendor-sources-${{ hashFiles('depends/Makefile', 'depends/funcs.mk', 'depends/packages/native_rust.mk', 'depends/packages/platform_cxx.mk', 'depends/patches/platform_cxx/cargo-config.toml') }}
159+
160+
- name: Download Rust vendor sources
161+
if: inputs.build-target == 'linux64_platform_gui' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact != ''
162+
uses: actions/download-artifact@v8
163+
with:
164+
name: ${{ inputs.rust-vendor-artifact }}
165+
path: depends/sources
166+
167+
- name: Check Rust vendor sources are present
168+
if: inputs.build-target == 'linux64_platform_gui' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact == ''
169+
run: |
170+
echo "::error::Rust vendor source cache missed and no same-run artifact was provided"
171+
exit 1
172+
shell: bash
173+
147174
- name: Restore SDKs cache
148175
id: sdk-cache
149176
uses: actions/cache/restore@v5

‎.github/workflows/build.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ jobs:
165165
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
166166
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
167167

168+
depends-linux64_platform_gui:
169+
name: x86_64-pc-linux-gnu_platform_gui
170+
uses: ./.github/workflows/build-depends.yml
171+
needs: [check-skip, container, cache-sources]
172+
if: ${{ vars.SKIP_LINUX64_PLATFORM_GUI == '' }}
173+
with:
174+
build-target: linux64_platform_gui
175+
container-path: ${{ needs.container.outputs.path }}
176+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
177+
rust-vendor-artifact: ${{ needs.cache-sources.outputs.rust-vendor-artifact }}
178+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
179+
168180
depends-mac:
169181
name: x86_64-apple-darwin
170182
uses: ./.github/workflows/build-depends.yml
@@ -277,6 +289,20 @@ jobs:
277289
depends-artifact: ${{ needs.depends-linux64_nowallet.outputs.built-artifact }}
278290
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
279291

292+
src-linux64_platform_gui:
293+
name: linux64_platform_gui-build
294+
uses: ./.github/workflows/build-src.yml
295+
needs: [check-skip, container, depends-linux64_platform_gui]
296+
if: ${{ vars.SKIP_LINUX64_PLATFORM_GUI == '' }}
297+
with:
298+
build-target: linux64_platform_gui
299+
container-path: ${{ needs.container.outputs.path }}
300+
depends-key: ${{ needs.depends-linux64_platform_gui.outputs.key }}
301+
depends-host: ${{ needs.depends-linux64_platform_gui.outputs.host }}
302+
depends-dep-opts: ${{ needs.depends-linux64_platform_gui.outputs.dep-opts }}
303+
depends-artifact: ${{ needs.depends-linux64_platform_gui.outputs.built-artifact }}
304+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
305+
280306
src-linux64_sqlite:
281307
name: linux64_sqlite-build
282308
uses: ./.github/workflows/build-src.yml
@@ -372,6 +398,17 @@ jobs:
372398
container-path: ${{ needs.container-slim.outputs.path }}
373399
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
374400

401+
test-linux64_platform_gui:
402+
name: linux64_platform_gui-test
403+
uses: ./.github/workflows/test-src.yml
404+
needs: [check-skip, container-slim, src-linux64_platform_gui, lint]
405+
if: ${{ vars.SKIP_LINUX64_PLATFORM_GUI == '' }}
406+
with:
407+
bundle-key: ${{ needs.src-linux64_platform_gui.outputs.key }}
408+
build-target: linux64_platform_gui
409+
container-path: ${{ needs.container-slim.outputs.path }}
410+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
411+
375412
test-linux64_sqlite:
376413
name: linux64_sqlite-test
377414
uses: ./.github/workflows/test-src.yml

‎.github/workflows/cache-depends-sources.yml‎

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: false
99
type: string
1010
default: ubuntu-24.04-arm
11+
outputs:
12+
rust-vendor-artifact:
13+
description: "Artifact holding freshly generated Rust vendor archives"
14+
value: ${{ jobs.cache-sources.outputs.rust-vendor-artifact }}
1115
schedule:
1216
# Run daily at 6 AM UTC on the default branch to keep cache warm
1317
- cron: '0 6 * * *'
@@ -18,6 +22,8 @@ jobs:
1822
# Intentionally keep scheduled cache warming on GitHub-hosted ARM runners.
1923
# Blacksmith caches are expected to persist long enough without a warmup cron.
2024
runs-on: ${{ inputs.runs-on || 'ubuntu-24.04-arm' }}
25+
outputs:
26+
rust-vendor-artifact: ${{ steps.vendor-artifact.outputs.name }}
2127
steps:
2228
- name: Checkout code
2329
uses: actions/checkout@v6
@@ -35,6 +41,36 @@ jobs:
3541
restore-keys: depends-sources-
3642
lookup-only: true
3743

44+
- name: Cache Rust vendor sources
45+
id: rust-vendor-cache
46+
uses: actions/cache@v5
47+
with:
48+
path: depends/sources/platform-cxx-*-vendored.tar.gz
49+
key: depends-rust-vendor-sources-${{ hashFiles('depends/Makefile', 'depends/funcs.mk', 'depends/packages/native_rust.mk', 'depends/packages/platform_cxx.mk', 'depends/patches/platform_cxx/cargo-config.toml') }}
50+
3851
- name: Download sources
39-
if: steps.cache-check.outputs.cache-hit != 'true'
40-
run: make -C depends download
52+
if: |
53+
steps.cache-check.outputs.cache-hit != 'true' ||
54+
steps.rust-vendor-cache.outputs.cache-hit != 'true'
55+
run: |
56+
make -C depends PLATFORM_GUI=1 download
57+
make -C depends PLATFORM_GUI=1 vendor-platform_cxx-crates
58+
# The cache producer normally runs on ARM, while the platform_gui
59+
# consumer runs on x86_64. Native Rust is selected from the build
60+
# architecture, so fetch the x86_64 compiler archive explicitly too.
61+
make -C depends BUILD=x86_64-pc-linux-gnu PLATFORM_GUI=1 download-one
62+
63+
- name: Select Rust vendor artifact
64+
id: vendor-artifact
65+
if: github.event_name != 'schedule' && steps.rust-vendor-cache.outputs.cache-hit != 'true'
66+
run: echo "name=depends-rust-vendor-sources-${{ github.run_id }}" >> "$GITHUB_OUTPUT"
67+
68+
- name: Upload Rust vendor sources
69+
if: steps.vendor-artifact.outputs.name != ''
70+
uses: actions/upload-artifact@v6
71+
with:
72+
name: ${{ steps.vendor-artifact.outputs.name }}
73+
path: depends/sources/platform-cxx-*-vendored.tar.gz
74+
compression-level: 0
75+
retention-days: 1
76+
overwrite: true

‎ci/dash/matrix.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ elif [ "$BUILD_TARGET" = "linux64_multiprocess" ]; then
2828
source ./ci/test/00_setup_env_native_multiprocess.sh
2929
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
3030
source ./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
31+
elif [ "$BUILD_TARGET" = "linux64_platform_gui" ]; then
32+
source ./ci/test/00_setup_env_native_platform_gui.sh
3133
elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then
3234
source ./ci/test/00_setup_env_native_sqlite.sh
3335
elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2026 The Dash Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
# Builds depends with PLATFORM_GUI=1 so mbedtls and the Platform-owned CXX
10+
# binding archive (libdash_platform_cxx.a, built offline from vendored crates)
11+
# are produced, hash-verified and installed into the depends prefix, then
12+
# builds dash-qt against that prefix. The --enable-platform-gui configure flag
13+
# and the platform_* unit-test suites arrive with the Platform client library
14+
# and are added to BITCOIN_CONFIG there; until then this lane proves the
15+
# depends knob end to end and that the enriched prefix stays link-compatible.
16+
# Functional tests are skipped: there is no dashd-only surface to drive.
17+
export CONTAINER_NAME=ci_native_platform_gui
18+
export HOST=x86_64-pc-linux-gnu
19+
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
20+
export DEP_OPTS="PLATFORM_GUI=1"
21+
export RUN_UNIT_TESTS="true"
22+
export RUN_UNIT_TESTS_SEQUENTIAL="false"
23+
export RUN_FUNCTIONAL_TESTS="false"
24+
export GOAL="install"
25+
export BITCOIN_CONFIG="--with-gui=qt5 --enable-zmq --with-libs=no --enable-reduce-exports LDFLAGS=-static-libstdc++"

0 commit comments

Comments
 (0)