Skip to content

fix(ci): use cargo build for dioxus example#411

Merged
FabianLars-crabnebula merged 2 commits intomainfrom
fix/ci-dioxus-example
Mar 3, 2026
Merged

fix(ci): use cargo build for dioxus example#411
FabianLars-crabnebula merged 2 commits intomainfrom
fix/ci-dioxus-example

Conversation

@james-crabnebula
Copy link
Copy Markdown
Contributor

Summary

  • Replace dx build --platform desktop --release with cargo build --release in the dioxus example's before-packaging-command
  • Remove the cargo binstall dioxus-cli step from build-examples.yml (no longer needed)

Why

The dioxus example is a plain desktop app (20 lines, no manganis assets or dx-specific features). dx build outputs to target/dx/dioxus-example/release/ instead of target/release/, causing cargo-packager to fail finding the binary. On Ubuntu 22.04, dx also requires GLIBC 2.38+ which isn't available.

Every other Rust example (wry, egui, slint) already uses cargo build --release.

Test plan

  • Local build: cargo build --release -p dioxus-example produces binary at target/release/dioxus-example
  • Full packaging pipeline: all 7 examples package successfully (21 packages, 14 signatures)
  • macOS: unit tests, E2E updater, audit, deny — all pass
  • Linux: unit tests, E2E updater, audit, deny — all pass
  • Windows: unit tests, E2E updater — all pass

The dioxus example is a plain desktop app with no dx-specific features.
Replace `dx build` with `cargo build --release` so the binary lands in
`target/release/` where cargo-packager expects it.

This fixes the package CI job on all three platforms:
- macOS/Windows: binary now at the expected path
- Ubuntu: no longer requires GLIBC 2.38+ from the dx binary

Remove the `cargo binstall dioxus-cli` CI step (no longer needed).
@FabianLars-crabnebula
Copy link
Copy Markdown
Contributor

i think getting rid of the cli is good for build times but if we were to keep it (or re-add it later) we could do this

binaries = [{ path = "wails_example", main = true }]

@FabianLars-crabnebula
Copy link
Copy Markdown
Contributor

Actuallyyyyy, perhaps we should do that since these are examples for users and not just CI? 🤔
For the glibc requirement we could update the runners to 24.04 🤷

@james-crabnebula
Copy link
Copy Markdown
Contributor Author

Closing this in favour of a proper fix later. After discussion, the right approach here is target-specific packager config (relates to #360) or $TARGET_OS template variables in binaries-dir, rather than working around the dioxus build system in CI.

Will revisit after the current dependency update work is complete.

@FabianLars-crabnebula
Copy link
Copy Markdown
Contributor

I'm gonna merge this for the time being with a comment inside so the checks are green again.

@FabianLars-crabnebula FabianLars-crabnebula merged commit 0d3f083 into main Mar 3, 2026
20 checks passed
@FabianLars-crabnebula FabianLars-crabnebula deleted the fix/ci-dioxus-example branch March 3, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants