diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 082235c..c807a38 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,20 +33,20 @@ jobs: with: python-version: '3.10' - # - name: Install dependencys - # run: | - # sudo apt --fix-broken install - # sudo apt update - # sudo apt install cmake clang doxygen g++ extra-cmake-modules libgif-dev libjpeg-dev ninja-build libgoogle-perftools-dev libunwind-dev - # - name: Build and install libjxl - # run: | - # git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules - # cd libjxl - # mkdir build - # cd build - # cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. - # cmake --build . -- -j$(nproc) - # sudo cmake --install . + - name: Install dependencys + run: | + sudo apt --fix-broken install + sudo apt update + sudo apt install cmake clang doxygen g++ extra-cmake-modules libgif-dev libjpeg-dev ninja-build libgoogle-perftools-dev libunwind-dev + - name: Build and install libjxl + run: | + git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules + cd libjxl + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. + cmake --build . -- -j$(nproc) + sudo cmake --install . - name: Build wheels uses: PyO3/maturin-action@v1 @@ -57,8 +57,9 @@ jobs: manylinux: auto docker-options: | -e RUST_BACKTRACE=1 - before-script-linux: | - yum install -y cmake clang doxygen extra-cmake-modules ninja-build + -e DEP_JXL_LIB=${{ github.workspace }}/libjxl/build/lib + # before-script-linux: | + # yum install -y cmake clang doxygen extra-cmake-modules ninja-build - name: Upload wheels uses: actions/upload-artifact@v3 @@ -96,7 +97,7 @@ jobs: with: rust-toolchain: stable-x86_64-pc-windows-gnu target: x86_64-pc-windows-gnu - args: --release --out dist --find-interpreter + args: --release --out dist --find-interpreter --cargo-extra-args="--features vendored" sccache: 'true' - name: Upload wheels diff --git a/Cargo.toml b/Cargo.toml index 40765fa..b41a381 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,4 +10,8 @@ crate-type = ["cdylib"] [dependencies] pyo3 = "0.19.2" -jpegxl-rs = { version = "0.8.2", default-features = false, features = ["vendored", "threads"] } +jpegxl-rs = { version = "0.8.2", default-features = false, features = ["threads"] } + +[features] +# Enables parallel processing support by enabling the "rayon" feature of jpeg-decoder. +vendored = ["jpegxl-rs/vendored"] \ No newline at end of file