From 2da27d4798dee41626f77f8fd30ad036e4bb76d0 Mon Sep 17 00:00:00 2001 From: Laurenz Stampfl Date: Sat, 30 Mar 2024 19:09:18 +0100 Subject: [PATCH] Use cargo hack for CI --- .github/workflows/ci.yml | 3 +++ src/util/helper.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb7ad5c5..94787d86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - run: cargo clippy --all-targets - run: cargo fmt --check --all - run: cargo doc --workspace --no-deps + - run: cargo hack check --each-feature -p svg2pdf + - run: cargo hack check --each-feature -p svg2pdf-cli diff --git a/src/util/helper.rs b/src/util/helper.rs index 8e520627..aabe3405 100644 --- a/src/util/helper.rs +++ b/src/util/helper.rs @@ -1,6 +1,8 @@ use pdf_writer::types::{BlendMode, LineCapStyle, LineJoinStyle, MaskType}; use pdf_writer::{Content, Name, Rect}; -use usvg::{LineCap, LineJoin, NonZeroRect, Size, Transform}; +use usvg::{LineCap, LineJoin, NonZeroRect, Transform}; +#[cfg(feature = "image")] +use usvg::Size; use crate::render::gradient::Stop;