Skip to content

Commit

Permalink
make vendored optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Isotr0py committed Sep 28, 2023
1 parent e5ab9ed commit 26d21a4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 26d21a4

Please sign in to comment.