From 488da716d7c1a6d82182cf8f6ca8a23443495e09 Mon Sep 17 00:00:00 2001 From: Lilith River Date: Mon, 23 Mar 2026 18:55:24 -0600 Subject: [PATCH 1/2] ci: expand platform coverage, enforce clippy warnings, add MSRV check - Upgrade actions/checkout from v2/v4 to v6 - Add test-platforms job: ubuntu, ubuntu-arm, macos-arm, macos-intel, windows, windows-arm - Add MSRV job using cargo-hack check --rust-version - Replace baptiste0928/cargo-install with taiki-e/install-action@cross for cross-compilation - Remove unnecessary Docker start step (cross handles container lifecycle) - Enable clippy -D warnings with --all-targets (was disabled with TODO) --- .github/workflows/rust.yml | 44 +++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3462807..bfbac02 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,7 @@ jobs: matrix: rust: ["1.88.0", stable, beta, nightly] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@nightly if: ${{ matrix.rust == '1.88.0' }} @@ -32,13 +32,29 @@ jobs: if: ${{ matrix.rust != '1.88.0' }} run: cargo test -v && cargo doc -v + test-platforms: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-26-intel, windows-latest, windows-11-arm] + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@stable + - name: Cache Cargo Dependencies + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: test + run: cargo test -v + features: runs-on: ubuntu-latest strategy: matrix: feature: ["", deflate, jpeg, lzw, zstd, default, "default,zstd"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: components: clippy @@ -59,25 +75,29 @@ jobs: matrix: arch: [powerpc-unknown-linux-gnu, i686-unknown-linux-gnu] steps: - - uses: actions/checkout@v4 - - name: Install or use cached cross-rs/cross - uses: baptiste0928/cargo-install@v2 - with: - crate: cross + - uses: actions/checkout@v6 + - uses: taiki-e/install-action@cross - name: Cache Cargo Dependencies uses: Swatinem/rust-cache@v2 with: cache-on-failure: true key: ${{ matrix.arch }} - - name: Start Docker (required for cross-rs) - run: sudo systemctl start docker - name: Cross-Run Tests using QEMU run: cross test --target ${{ matrix.arch }} + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@stable + - uses: taiki-e/install-action@cargo-hack + - name: Check MSRV + run: cargo hack check --rust-version + rustfmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt @@ -87,8 +107,8 @@ jobs: clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: components: clippy - - run: cargo clippy --all-features # TODO: enable "-- -D warnings" once all outstanding clippy lints are fixed + - run: cargo clippy --all-features --all-targets -- -D warnings From be5802612544e3189d4673d0fa1c5e0425a7491f Mon Sep 17 00:00:00 2001 From: Lilith River Date: Mon, 23 Mar 2026 19:50:43 -0600 Subject: [PATCH 2/2] fix: demote off_l16.tif to smoke test (LogLuv exp() platform variance) log16_to_y() uses f32::exp() which is not required to be correctly rounded by IEEE 754. Apple libm on arm64 differs by 1 ULP from glibc on x86_64, producing different CRC32 checksums for the decoded output. Same issue as off_luv32.tif which was already demoted in commit 617dc6e. A deterministic LUT-based approach could fix both in a follow-up. --- tests/decode_libtiffpic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/decode_libtiffpic.rs b/tests/decode_libtiffpic.rs index 2479fd7..3bcd888 100644 --- a/tests/decode_libtiffpic.rs +++ b/tests/decode_libtiffpic.rs @@ -184,7 +184,7 @@ const FILES: &[(&str, Option)] = &[ ("tests/libtiffpic/jim___dg.tif", Some(0x8c6a5e8f)), ("tests/libtiffpic/jim___gg.tif", Some(0x8c6a5e8f)), ("tests/libtiffpic/ladoga.tif", Some(0x9b118511)), - ("tests/libtiffpic/off_l16.tif", Some(0xd434a2d9)), + ("tests/libtiffpic/off_l16.tif", Some(0)), // LogLuv decoder output varies across platforms ("tests/libtiffpic/off_luv24.tif", Some(0x2bee71a2)), ("tests/libtiffpic/off_luv32.tif", Some(0)), // LogLuv decoder output varies across platforms ("tests/libtiffpic/oxford.tif", Some(0x355d2e3e)),