diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..be664f6 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,30 @@ +name: 🐧 Linux +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + linux-cli: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Install basic libraries + run: sudo apt update || true; sudo apt install git -y + + - name: Clone rawloader and multicache + run: | + - git clone https://github.com/pedrocr/rawloader.git ../rawloader/ + - git clone https://github.com/pedrocr/multicache.git ../multicache/ + + - name: Setup rust version + run: rustup default stable + + - name: Build + run: cargo build + + - name: Test + run: cargo test diff --git a/Cargo.toml b/Cargo.toml index d2b52ec..9b56f05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,12 +15,12 @@ lazy_static = "1" rayon = "1" serde = "1" serde_derive = "1" -serde_yaml = "0.8" +serde_yaml = "0.9.33" bincode = "1" blake3 = "1" log = "0.4" num-traits = "0.2" -image = "0.24" +image = { version = "0.25", default-features = false, features = ["jpeg"] } [dependencies.rawloader] version = "0.37" diff --git a/src/bin/converter.rs b/src/bin/converter.rs index 9e357f0..e9a9be6 100644 --- a/src/bin/converter.rs +++ b/src/bin/converter.rs @@ -2,7 +2,7 @@ use std::env; use std::fs::File; use std::io::BufWriter; //use std::time::Instant; -use image::ColorType; +use image::ExtendedColorType; extern crate imagepipe; extern crate rawloader; @@ -67,6 +67,6 @@ fn main() { let mut jpg_encoder = image::codecs::jpeg::JpegEncoder::new_with_quality(&mut f, 90); jpg_encoder - .encode(&decoded.data, decoded.width as u32, decoded.height as u32, ColorType::Rgb8) + .encode(&decoded.data, decoded.width as u32, decoded.height as u32, ExtendedColorType::Rgb8) .expect("Encoding image in JPEG format failed."); }