Skip to content

ci: nothing compiles the Linux Rust shell until release time #531

Closed

Description

@thcp

Found while verifying #518, whose fix lives entirely inside #[cfg(all(unix, not(target_os = "macos")))].

Nothing compiles the Linux Rust shell before release

  • ci.yml does not build desktop/src-tauri at all -- grep -n "cargo\|src-tauri" .github/workflows/ci.yml returns nothing.
  • macos-check.yml and windows-check.yml cover their platforms.
  • Linux Rust is compiled only by linux-release.yml, via scripts/linux/make-portable.sh, on release publish.

So a type error, a borrow error, or a missing symbol in Linux-only Rust first surfaces during a release build, after the tag exists and the other platforms may already have uploaded assets.

This is precisely the gap #421 identified. That issue added macos-check.yml and windows-check.yml because ci.yml is 100% ubuntu-latest and a Linux runner cannot type-check code behind #[cfg(target_os = "macos")] or #[cfg(windows)]. Linux was skipped -- presumably because the CI runner is already ubuntu, so it looked covered. It is not: ci.yml never invokes cargo.

Why it bites

The Linux-only surface is not small. download_linux_ffmpeg, extract_update_archive's tar branch, stop_backend_and_wait, and several helpers are all behind Linux cfg gates.

Verifying #518 locally meant temporarily rewriting its cfg gate to #[cfg(unix)], running cargo check, then restoring 7 gates by hand. That is not a procedure anyone should have to repeat, and it is easy to leave a gate widened by accident.

Cross-compiling from macOS is not an option either -- cargo check --target x86_64-unknown-linux-musl fails in glib-sys / gobject-sys / gio-sys build scripts for want of the GTK system libraries.

Fix

Add a linux-check job. Unlike the macOS and Windows checks it needs no self-hosted runner -- ubuntu-latest is the right platform, so it can live in ci.yml alongside the existing jobs, or as its own linux-check.yml mirroring the other two.

It needs the Tauri system dependencies (libwebkit2gtk-4.1-dev, libgtk-3-dev, libayatana-appindicator3-dev, librsvg2-dev, patchelf or whatever make-portable.sh already relies on), then:

cargo fmt --check
cargo build
cargo clippy -- -D warnings
cargo test

Scoping it to paths: ["desktop/src-tauri/**"] matches what the other two check workflows already do.

Worth doing before the next release, since #518 ships an unexercised change to exactly this code path.

Metadata

Metadata

Assignees

Labels

ciCI/CD pipeline and automation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions