Repository navigation
fix(ci): preserve baseline x86-64 Linux compatibility - #195
Merged
Merged
Conversation
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/build-desktop-tauri.yml" line_range="171" />
<code_context>
+ env:
+ # Keep both Rust and native dependencies compatible with pre-AVX CPUs.
+ # Target-scoped flags leave the arm64 build unchanged.
+ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: '-C target-cpu=x86-64'
+ CFLAGS_x86_64_unknown_linux_gnu: '-march=x86-64 -mtune=generic'
+ CXXFLAGS_x86_64_unknown_linux_gnu: '-march=x86-64 -mtune=generic'
</code_context>
<issue_to_address>
**Rust builds miss CPU baseline**
When the Linux build runs with its current targetless Tauri command, cargo does not apply target-specific Rust flags to host builds when no `--target` is specified, so the Tauri build compiles Rust crates without this explicit baseline constraint; a dependency that emits above-baseline instructions then remains incompatible with pre-AVX CPUs.
Pass `--target x86_64-unknown-linux-gnu` to the amd64 Tauri build, or apply `RUSTFLAGS` conditionally to the amd64 matrix entry and test the effective Rust compilation flags.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and these settings change the CPU instructions and native-library baseline used in Linux x86-64 release artifacts. If the resulting binaries regress on supported machines, reverting will fix future builds, but already published artifacts would need to be replaced with a corrected release.
Blocking findings: .github/workflows/build-desktop-tauri.yml:171
Member
Author
|
@sourcery-ai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Linux amd64 release builds use
ubuntu-latest, allowing a runner image migration to raise the effective CPU baseline without a source or dependency change. In the builds associated with #192, v4.29.3 used Ubuntu 24.04, while v4.29.4 used Ubuntu 26.04 and installed amd64v3 packages.The official v4.29.4 shell contains unconditional BMI2 instructions in generic native
ringroutines such asfe_loose_invert; the corresponding v4.29.3 routine does not. Merely finding SIMD instructions anywhere in the executable would not establish this problem, since runtime-dispatched optimized routines are legitimate. Rust flags alone also cannot constrain code compiled by the native C compiler.Changes
ubuntu-24.04, keeping the compiler and system library environment on the compatible baseline.-C target-cpu=x86-64and native C/C++ flags to-march=x86-64 -mtune=genericforx86_64-unknown-linux-gnuthroughout the Linux build job. Other target architectures and platform jobs keep their existing configuration.x86-64-v3control and then verify that the workflow flags disable AVX/AVX2, BMI/BMI2, FMA and other above-baseline features while retaining SSE2. The probe runs on Linux x64 and macOS with an explicit Linux x86_64 target.Validation
node --test scripts/ci/build-desktop-tauri-workflow.test.mjs: 12 passed.pnpm run test:prepare-resources: 221 passed.python3 -m unittest discover -s scripts/ci -p 'test_*.py': 95 passed.git diff --check: passed.Final Linux installer generation and GUI startup on an Ivy Bridge CPU or equivalent emulator have not been exercised in this change. The compiler probes verify the effective native compilation baseline, not every instruction or dynamic dependency in a final release. Keep #192 open until a newly built artifact is validated on the affected class of machine.
Refs #192.
Summary by Sourcery
Preserve pre-AVX Linux amd64 release compatibility by pinning the build environment and enforcing an x86-64 CPU baseline.
Bug Fixes:
CI: