Skip to content

Commit d651660

Browse files
committed
fix(release): restore 2.5.21 cross builds
1 parent 3b3026c commit d651660

4 files changed

Lines changed: 56 additions & 19 deletions

File tree

.github/workflows/release-auto.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
paths:
77
- Cargo.toml
88
- pyproject.toml
9+
# An incomplete release must be retried when its release machinery is
10+
# repaired without forcing another public version bump.
11+
- .github/workflows/release-auto.yml
12+
- .github/workflows/template_native_build.yml
913
workflow_dispatch:
1014
inputs:
1115
publish:

.github/workflows/template_native_build.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ env:
4747
# GitHub Actions owns the outer deadline instead of soldr killing the
4848
# build early.
4949
SOLDR_CARGO_WAIT_TIMEOUT_SECS: "2700"
50+
# Keep every soldr invocation in this reusable job on the same catalogue.
51+
# soldr >= 0.9.5 consumes its multipart v2 assets, including Apple SDKs
52+
# whose legacy direct-LFS URLs are no longer anonymously downloadable.
53+
SOLDR_TOOLCHAIN_ORIGIN: https://zackees.github.io/soldr-toolchain
5054
# cc-rs env vars for the xwin lanes. ring's build.rs uses cc-rs;
5155
# without these, cc-rs invokes plain `clang` and the curve25519.c
5256
# compile fails with `error: no such file or directory: '/imsvc'`
@@ -93,15 +97,13 @@ jobs:
9397
# v0.7.85/v0.7.87 were broken releases that shipped silent
9498
# binaries (no output at all), which setup-soldr@v0.9.63
9599
# surfaced as a version-JSON parse failure.
96-
# Pin the latest published soldr release; setup-soldr's current
97-
# default can briefly lead a release that has not been published yet.
98-
# soldr v0.8.0 is the
99-
# known-good floor for the Apple SDK URL fix, soldr-clang-shim
100-
# in every release archive, cargo:rustc-env wrapper forwarding,
101-
# and managed cmake/ninja.
100+
# Pin a fully published soldr release. v0.9.5 is the first version
101+
# that consumes catalogue-v2 multipart assets; v0.8.23 still probes
102+
# the retired direct-LFS Apple SDK URLs even though the SDKs are
103+
# available through the v2 catalogue.
102104
uses: zackees/setup-soldr@v0
103105
with:
104-
version: 0.8.23
106+
version: 0.9.6
105107
cache: true
106108
build-cache: true
107109
target-cache: true
@@ -226,20 +228,12 @@ jobs:
226228
# cargo invocation so the SDKROOT export is debuggable independent
227229
# of the build itself.
228230
#
229-
# SOLDR_TOOLCHAIN_ORIGIN redirects soldr's toolchain catalogue
230-
# fetch away from the retired `manifest` branch of
231-
# zackees/soldr (soldr#988 Phase 5 / soldr#992, merged
232-
# 2026-06-27) at the new soldr-toolchain origin. soldr v0.7.66
233-
# honors this env var via the Phase 2 catalogue-first
234-
# fetch_once (soldr#989); older versions ignore it (and fail
235-
# against the retired manifest branch, which is what we're
236-
# avoiding here).
231+
# SOLDR_TOOLCHAIN_ORIGIN is job-scoped above so this prepare step and
232+
# both following build steps resolve the exact same catalogue.
237233
- name: Prepare Apple SDK (Linux → mac cross)
238234
if: inputs.mac_cross_linux
239235
timeout-minutes: 15
240236
shell: bash
241-
env:
242-
SOLDR_TOOLCHAIN_ORIGIN: https://zackees.github.io/soldr-toolchain
243237
run: soldr prepare --target ${{ inputs.target }}
244238

245239
- name: Build release binaries
@@ -301,7 +295,10 @@ jobs:
301295
# soldr's bin cache, which has been serving a corrupted
302296
# cargo-zigbuild binary (`Syntax error: ")" unexpected` at
303297
# line 10) and blocking PyPI publishes. See #331.
304-
cargo zigbuild --release --target ${{ inputs.target }} \
298+
# mimalloc-pprof's vendored diagnostic banner expands
299+
# __DATE__/__TIME__. Zig promotes that one warning to an error;
300+
# demote only that diagnostic for this C dependency build.
301+
CFLAGS="-Wno-error=date-time" cargo zigbuild --release --target ${{ inputs.target }} \
305302
-p fbuild-cli \
306303
-p fbuild-daemon
307304
else

crates/fbuild-python/tests/pyo3_policy.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,38 @@ fn pyo3_029_policy_stays_target_python_independent() {
9393
);
9494
}
9595
}
96+
97+
#[test]
98+
fn native_release_workflow_uses_current_cross_toolchains() {
99+
let root = repo_root();
100+
let workflow =
101+
fs::read_to_string(root.join(".github/workflows/template_native_build.yml")).unwrap();
102+
let release_workflow =
103+
fs::read_to_string(root.join(".github/workflows/release-auto.yml")).unwrap();
104+
105+
assert!(
106+
workflow.contains("version: 0.9.6"),
107+
"native release builds need soldr >= 0.9.5 for catalogue-v2 Apple SDK assets"
108+
);
109+
assert!(
110+
workflow.contains(
111+
"SOLDR_TOOLCHAIN_ORIGIN: https://zackees.github.io/soldr-toolchain"
112+
),
113+
"Apple SDK prepare and build steps must share the catalogue origin"
114+
);
115+
assert!(
116+
workflow.contains(
117+
"CFLAGS=\"-Wno-error=date-time\" cargo zigbuild --release --target"
118+
),
119+
"musl release builds must demote zig's date-time error for mimalloc-pprof"
120+
);
121+
for release_input in [
122+
"- .github/workflows/release-auto.yml",
123+
"- .github/workflows/template_native_build.yml",
124+
] {
125+
assert!(
126+
release_workflow.contains(release_input),
127+
"release workflow fixes must retrigger an incomplete publication: {release_input}"
128+
);
129+
}
130+
}

python/fbuild/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
find_firmware,
2020
)
2121

22+
2223
__all__ = [
23-
"__version__",
2424
"AsyncDaemon",
2525
"AsyncDaemonConnection",
2626
"Daemon",
2727
"DaemonConnection",
28+
"__version__",
2829
"connect_daemon",
2930
"connect_daemon_async",
3031
"find_firmware",

0 commit comments

Comments
 (0)