Skip to content

Commit 3f3aede

Browse files
committed
Fix CI failures from the HDR export deps
The HDR encoders pulled in build-time native requirements that the CI matrix couldn't satisfy, breaking clippy and every x86_64/Windows-arm build job (ARM Linux and Apple Silicon happened to pass). rav1e "asm" feature Needs nasm at build time on x86_64 (missing on the Ubuntu/macOS-intel runners) and fails to link on aarch64-pc-windows-msvc (LNK1181). Drop it for a pure-Rust encode: builds everywhere with no system deps, which also matches the "no C/system deps" promise in the comment. Cargo.lock loses nasm-rs/cc accordingly. clippy --all-features --all-features enabled the optional hdr_jxl feature, which links system libjxl (>= 0.11.2); the Ubuntu runners only ship far older libjxl, so the job died compiling jpegxl-sys. Lint the default feature set instead, which matches what the release builds actually compile. Windows MSI version error The matrix sets `builds-args: --bundles nsis`, but the reusable workflow reads `matrix.args`, so the flag was never passed and tauri also built an MSI bundle — which rejects the non-numeric `1.5.7-hdr` pre-release. Read `matrix.builds-args` (falling back to `matrix.args` for the Android row) so Windows builds NSIS only, as intended; the MSI was never uploaded anyway (the artifact step only collects *.exe). New clippy findings that surfaced once clippy could reach the crate: - removed a dead `MAX_MASK_BINDINGS` const added to GpuProcessor::new - #[allow(too_many_arguments)] on GpuProcessor::run (now 8 args w/ output_hdr) - #[allow(field_reassign_with_default)] on encode_avif_hdr (rav1e idiom)
1 parent 93edcc3 commit 3f3aede

8 files changed

Lines changed: 14 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
platform: ${{ matrix.platform }}
4848
target: ${{ matrix.target }}
49-
build-args: ${{ matrix.args }}
49+
build-args: ${{ matrix.builds-args || matrix.args }}
5050
asset-prefix: ${{ matrix.asset-prefix }}
5151
mobile: ${{ matrix.mobile }}
5252
secrets: inherit

.github/workflows/lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@ jobs:
7272
7373
- name: Clippy
7474
working-directory: src-tauri
75-
run: cargo clippy --all-targets --all-features -- -D warnings
75+
# Not `--all-features`: the `hdr_jxl` feature links system libjxl (>= 0.11.2), which the
76+
# Ubuntu runners don't provide. Lint the default feature set, which matches the shipped build.
77+
run: cargo clippy --all-targets -- -D warnings

.github/workflows/pr-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
with:
4545
platform: ${{ matrix.platform }}
4646
target: ${{ matrix.target }}
47-
build-args: ${{ matrix.args }}
47+
build-args: ${{ matrix.builds-args || matrix.args }}
4848
asset-prefix: ${{ matrix.asset-prefix }}
4949
mobile: ${{ matrix.mobile }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
release-id: ${{ github.event.release.id }}
4747
platform: ${{ matrix.platform }}
4848
target: ${{ matrix.target }}
49-
build-args: ${{ matrix.args }}
49+
build-args: ${{ matrix.builds-args || matrix.args }}
5050
asset-name-pattern: '[name]_v[version]_[platform]_[arch][ext]'
5151
asset-prefix: ${{ matrix.asset-prefix }}
5252
mobile: ${{ matrix.mobile }}

src-tauri/Cargo.lock

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ sysinfo = "0.39.3"
6969

7070
# --- HDR export encoders ---
7171
# AVIF (PQ/HLG, 10/12-bit, CICP nclx): pure-Rust AV1 encoder + ISOBMFF muxer. No C/system deps.
72-
# `asm` needs nasm at build time; drop it for a pure-Rust (slower) encode if nasm is unavailable.
73-
rav1e = { version = "0.8.1", default-features = false, features = ["asm", "threading"] }
72+
# The `asm` feature is intentionally NOT enabled: it needs nasm at build time on x86_64 and fails
73+
# to link on aarch64-pc-windows-msvc, which would break those CI targets. Pure-Rust encode keeps the
74+
# "no system deps" build promise across every platform at the cost of a slower AVIF encode.
75+
rav1e = { version = "0.8.1", default-features = false, features = ["threading"] }
7476
avif-serialize = "0.8.9"
7577
# JPEG XL (PQ/HLG, >=10-bit float): bindings to system libjxl. Optional (see `hdr_jxl` feature)
7678
# because it requires libjxl (`brew install jpeg-xl`) at build+runtime. GPL-3.0-or-later bindings;

src-tauri/src/gpu_processing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ const FLARE_MAP_SIZE: u32 = 512;
761761
impl GpuProcessor {
762762
pub fn new(context: GpuContext, max_width: u32, max_height: u32) -> Result<Self, String> {
763763
let device = &context.device;
764-
const MAX_MASK_BINDINGS: u32 = 1;
765764

766765
let blur_shader_module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
767766
label: Some("Blur Shader"),
@@ -1166,6 +1165,7 @@ impl GpuProcessor {
11661165
.get_or_init(|| build_hdr_resources(&self.context.device, self.tile_dims))
11671166
}
11681167

1168+
#[allow(clippy::too_many_arguments)]
11691169
pub fn run(
11701170
&self,
11711171
input_texture_view: &wgpu::TextureView,

src-tauri/src/hdr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,9 @@ fn content_light_levels(
654654
/// chroma subsampling) so the round-trip is exact for every color; YCbCr converts to
655655
/// non-constant-luminance Y'CbCr and supports 4:2:2 / 4:2:0 subsampling. CICP tags
656656
/// (primaries / transfer / matrix / range) are written to both the AV1 stream and the container.
657+
// rav1e's EncoderConfig is configured by mutating a Default (its own examples do the same); the
658+
// nested color_description makes a struct-literal initializer far less readable.
659+
#[allow(clippy::field_reassign_with_default)]
657660
pub fn encode_avif_hdr(
658661
img: &ImageBuffer<Rgba<f32>, Vec<f32>>,
659662
cfg: &HdrEncodeConfig,

0 commit comments

Comments
 (0)