From cbfef2731bd3265b7c8e569c096e55882f1e4959 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Wed, 4 Oct 2023 19:28:24 +0800 Subject: [PATCH 1/5] add aarch64 --- .github/workflows/CI.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6c2ba01..4578161 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -32,6 +32,8 @@ jobs: docker_image: quay.io/pypa/manylinux2014_x86_64:latest - target: x86 docker_image: quay.io/pypa/manylinux2014_i686:latest + - target: aarch64 + distro: ubuntu_latest steps: - uses: actions/checkout@v3 @@ -56,6 +58,58 @@ jobs: -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_OPENEXR=OFF cmake --build build cmake --install build + + - name: Build libjxl (non-x86) + if: ${{ !contains(matrix.target, 'x86')}} + uses: uraimo/run-on-arch-action@v2.5.1 + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + + # Not required, but speeds up builds + githubToken: ${{ github.token }} + + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume "${{ github.workspace }}:/workspace" + + # The shell to run commands with in the container + shell: /bin/sh + + # Install some dependencies in the container. This speeds up builds if + # you are also using githubToken. Any dependencies installed here will + # be part of the container image that gets cached, so subsequent + # builds don't have to re-install them. The image layer is cached + # publicly in your project's package repository, so it is vital that + # no secrets are present in the container state or logs. + install: | + case "${{ matrix.distro }}" in + ubuntu*|jessie|stretch|buster|bullseye) + apt-get update -q -y + apt-get install -q -y git + ;; + fedora*) + dnf -y update + dnf -y install git which + ;; + alpine*) + apk update + apk add git + ;; + esac + + # Produce a binary artifact and place it in the mounted volume + run: | + cd /workspace + apt-get install -y clang cmake git libbrotli-dev nasm pkg-config ninja-build + git clone --recurse-submodules --depth 1 -b v0.8.2 https://github.com/libjxl/libjxl.git + cd libjxl + cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ + -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF \ + -DJPEGXL_ENABLE_BENCHMARKS=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_JNI=OFF \ + -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_OPENEXR=OFF + cmake --build build + cmake --install build - name: Build wheels uses: PyO3/maturin-action@v1 From f91f0737d826ae7a5643af34adbb2b05359350fd Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Wed, 4 Oct 2023 19:45:27 +0800 Subject: [PATCH 2/5] fix a typo --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4578161..4d02ec2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,7 +63,7 @@ jobs: if: ${{ !contains(matrix.target, 'x86')}} uses: uraimo/run-on-arch-action@v2.5.1 with: - arch: ${{ matrix.arch }} + arch: ${{ matrix.target }} distro: ${{ matrix.distro }} # Not required, but speeds up builds From 18be8ebf4b0a9257f6a1e6ef4bacb734b9bbadb4 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Wed, 4 Oct 2023 19:53:30 +0800 Subject: [PATCH 3/5] fix GNU conflicts --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4d02ec2..950b032 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -101,7 +101,7 @@ jobs: # Produce a binary artifact and place it in the mounted volume run: | cd /workspace - apt-get install -y clang cmake git libbrotli-dev nasm pkg-config ninja-build + apt-get install -y cmake git libbrotli-dev nasm pkg-config ninja-build git clone --recurse-submodules --depth 1 -b v0.8.2 https://github.com/libjxl/libjxl.git cd libjxl cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ From cfc591760b772bf4c931fd33b4bf964ddcdb4774 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Wed, 4 Oct 2023 20:00:06 +0800 Subject: [PATCH 4/5] fix GNU conflicts --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 950b032..a1eca23 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -86,7 +86,7 @@ jobs: case "${{ matrix.distro }}" in ubuntu*|jessie|stretch|buster|bullseye) apt-get update -q -y - apt-get install -q -y git + apt-get install -q -y git build-essential ;; fedora*) dnf -y update @@ -101,7 +101,7 @@ jobs: # Produce a binary artifact and place it in the mounted volume run: | cd /workspace - apt-get install -y cmake git libbrotli-dev nasm pkg-config ninja-build + apt-get install -y cmake ninja-build git clone --recurse-submodules --depth 1 -b v0.8.2 https://github.com/libjxl/libjxl.git cd libjxl cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ From d9cc2b410d1c9d3c756b0b176971256d1246f163 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Wed, 4 Oct 2023 20:11:51 +0800 Subject: [PATCH 5/5] use ninja on aarch64 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1eca23..154982a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -104,7 +104,7 @@ jobs: apt-get install -y cmake ninja-build git clone --recurse-submodules --depth 1 -b v0.8.2 https://github.com/libjxl/libjxl.git cd libjxl - cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \ -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF \ -DJPEGXL_ENABLE_BENCHMARKS=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_JNI=OFF \ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_OPENEXR=OFF