From a207477dcb6f911df03f8254ef3cdf42fc809b09 Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Sat, 24 Feb 2024 16:28:11 -0800 Subject: [PATCH] Speed up CI runs (#2158) --- .github/workflows/rust.yml | 3 ++- tests/truncate_images.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1a70f7f1a1..848d176c9e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -81,10 +81,11 @@ jobs: 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 }} --verbose -v + run: cross test --target ${{ matrix.arch }} test_avif_decoding: runs-on: ubuntu-latest diff --git a/tests/truncate_images.rs b/tests/truncate_images.rs index 7fc4f07afd..3347f2296c 100644 --- a/tests/truncate_images.rs +++ b/tests/truncate_images.rs @@ -44,7 +44,7 @@ fn truncate_images(decoder: &str) { let max_length = 1000; let mut buf = Vec::with_capacity(max_length); fin.take(max_length as u64).read_to_end(&mut buf).unwrap(); - for i in 0..buf.len() { + for i in (0..buf.len()).step_by(37) { image::load_from_memory(&buf[..i + 1]).ok(); } })