Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 36 additions & 62 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run_bench: true
test_in_pr: true
cmake_args: >-
-DJPEGXL_TEST_TOOLS=ON
-DJPEGLI_TEST_TOOLS=ON
-DJPEGLI_LIBJPEG_LIBRARY_VERSION="8.2.2"
-DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="8"
# Track static stack size on build and check it doesn't exceed 3 kB.
Expand All @@ -48,23 +48,17 @@ jobs:
# Conformance tooling test requires numpy.
# jpegli tests require imagemagick and libjpeg-turbo-progs
apt_pkgs: imagemagick libjpeg-turbo-progs python3-numpy
- name: lowprecision
mode: release
run_bench: true
test_in_pr: true
cmake_args: -DCMAKE_CXX_FLAGS=-DJXL_HIGH_PRECISION=0
- name: debug
# Build scalar-only hwy instructions.
- name: scalar
mode: release
cxxflags: -DHWY_COMPILE_ONLY_SCALAR -DFJXL_ENABLE_AVX2=0 -DFJXL_ENABLE_AVX512=0
cxxflags: -DHWY_COMPILE_ONLY_SCALAR
# Disabling optional features to speed up MSAN build a little bit.
- name: msan
os: ubuntu-24.04
skip_install: true
cmake_args: >-
-DJPEGXL_ENABLE_DEVTOOLS=OFF -DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
-DJPEGLI_ENABLE_DEVTOOLS=OFF
cc: clang-18
cxx: clang++-18
- name: asan
Expand All @@ -75,24 +69,16 @@ jobs:
skip_install: true
disable_tests:
- test_jpegli_jni_wrapper # TODO: why this does not work?
# Build with support for decoding to JPEG bytes disabled. Produces a
# smaller build if only decoding to pixels is needed.
- name: release-nojpeg
mode: release
cmake_args: >-
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
# Build with jxl_cms based on lcms2 library.
# Build with jpegli_cms based on lcms2 library.
- name: release-lcms2
mode: release
cmake_args: >-
-DJPEGXL_ENABLE_SKCMS=OFF
-DJPEGLI_ENABLE_SKCMS=OFF
- name: release-system-lcms2
mode: release
cmake_args: >-
-DJPEGXL_ENABLE_SKCMS=OFF
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
-DJPEGLI_ENABLE_SKCMS=OFF
-DJPEGLI_FORCE_SYSTEM_LCMS2=ON
apt_pkgs: liblcms2-dev
# static build is impossible
skip_install: true
Expand All @@ -102,46 +88,32 @@ jobs:
mode: release
run_bench: true
test_in_pr: true
- name: release:arm64-lowprecision
os: ubuntu-24.04-arm
mode: release
run_bench: true
test_in_pr: true
cmake_args: -DCMAKE_CXX_FLAGS=-DJXL_HIGH_PRECISION=0
# Build optimized for binary size, all features not needed for
# reconstructing pixels is disabled.
- name: release:minimal
mode: release
cmake_args: >-
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF
-DJPEGXL_ENABLE_BOXES=OFF
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
# Builds with gcc in release mode
- name: release:gcc
os: ubuntu-latest
mode: release
cc: gcc
cxx: g++
run_bench: true
test_in_pr: true
- name: release:gcc-old
os: ubuntu-22.04
os: ubuntu-24.04
mode: release
cc: gcc
cxx: g++
- name: release:gcc-old-old
os: ubuntu-20.04
os: ubuntu-22.04
mode: release
cc: gcc
cxx: g++
# Builds with old clang in release mode
- name: release:clang-old
os: ubuntu-22.04
os: ubuntu-24.04
mode: release
cc: clang
cxx: clang++
- name: release:clang-old-old
os: ubuntu-20.04
os: ubuntu-22.04
mode: release
cc: clang
cxx: clang++
Expand All @@ -153,17 +125,19 @@ jobs:
cxx: clang++-17
apt_pkgs: lld
cmake_args: >-
-DJPEGXL_ENABLE_LTO=ON
-DJPEGLI_ENABLE_LTO=ON
-DCMAKE_LINKER_TYPE=LLD
run_bench: true
test_in_pr: true
- name: release_lto:gcc
os: ubuntu-latest
mode: release
cc: gcc
cxx: g++
cmake_args: >-
-DJPEGXL_ENABLE_LTO=ON
-DJPEGLI_ENABLE_LTO=ON
run_bench: true
test_in_pr: true
# OSX builds
- name: release:osx
os: macos-latest
Expand All @@ -176,9 +150,9 @@ jobs:
test_stack_limit: 128
cmake_args: >-
-DCMAKE_FIND_FRAMEWORK=NEVER
- name: debug:osx-13
# The last "free" X86 OSX runnde
os: macos-13
- name: debug:osx-15
# The last "free" X86 OSX runner
os: macos-15-intel
mode: debug
cmake_args: >-
-DCMAKE_FIND_FRAMEWORK=NEVER
Expand All @@ -189,32 +163,26 @@ jobs:
skip_install: true
skip_stats: true
skip_test: true # can't finish "linking" tests without emulator
force_system_brotli: OFF
cmake_args: >-
-DANDROID_ABI=arm64-v8a
-DANDROID_PLATFORM=28
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_LATEST_HOME}/build/cmake/android.toolchain.cmake
-DJPEGXL_ENABLE_BENCHMARK=OFF
-DJPEGXL_ENABLE_OPENEXR=OFF
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
-DJPEGLI_ENABLE_BENCHMARK=OFF
-DJPEGLI_ENABLE_OPENEXR=OFF
-DSJPEG_ANDROID_NDK_PATH=${ANDROID_NDK_LATEST_HOME}
-DJPEGXL_BUNDLE_LIBPNG=ON
-DJPEGLI_BUNDLE_LIBPNG=ON
- name: release_ios
os: macos-latest
mode: release
skip_install: true
skip_stats: true
skip_test: true # can't finish "linking" tests without emulator
force_system_brotli: OFF
cmake_args: >-
-DCMAKE_SYSTEM_NAME=iOS
-DCMAKE_OSX_ARCHITECTURES=arm64
-DJPEGXL_ENABLE_BENCHMARK=OFF
-DJPEGXL_ENABLE_OPENEXR=OFF
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
-DJPEGXL_BUNDLE_LIBPNG=ON
-DJPEGLI_ENABLE_BENCHMARK=OFF
-DJPEGLI_ENABLE_OPENEXR=OFF
-DJPEGLI_BUNDLE_LIBPNG=ON

env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
Expand All @@ -233,11 +201,18 @@ jobs:
with:
egress-policy: audit

- name: Check workflow configuration
run: |
if [[ "${{ matrix.run_bench && !matrix.test_in_pr }}" == "true" ]]; then
echo "::error title::Configuration Error::'run_bench' requires 'test_in_pr'"
exit 1
fi

- name: Install build deps MacOS
if: startsWith(matrix.os, 'macos-')
run: |
# Should be already installed:
# brew install brotli giflib jpeg-turbo libpng zlib
# brew install giflib jpeg-turbo libpng zlib
# Not required, since we skip building documentation
# brew install doxygen graphviz
brew install binutils ccache coreutils googletest libavif ninja openexr sdl2 webp
Expand Down Expand Up @@ -269,7 +244,7 @@ jobs:
- name: Setup the Homebrew prefixes
if: startsWith(matrix.os, 'macos-')
run: |
CMAKE_PREFIX_PATH=`brew --prefix brotli`:`brew --prefix giflib`:`brew --prefix google-benchmark`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix sdl2`:`brew --prefix zlib`
CMAKE_PREFIX_PATH=`brew --prefix giflib`:`brew --prefix google-benchmark`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix sdl2`:`brew --prefix zlib`
echo "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV

- name: Setup the LLVM source path
Expand Down Expand Up @@ -323,11 +298,10 @@ jobs:
[[ -n "${MODE}" ]] || MODE="${{ matrix.name }}"
SKIP_TEST=1 TARGETS=all CMAKE_CXX_FLAGS='${{ matrix.cxxflags }}' \
./ci.sh ${MODE} \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DBUILD_TESTING=${BUILD_TESTS} \
-DJPEGXL_ENABLE_HWY_AVX3_DL=false \
-DJPEGLI_ENABLE_HWY_AVX3_DL=false \
${{ matrix.cmake_args }}

- name: Build stats
Expand All @@ -345,7 +319,7 @@ jobs:
# SELECT_BINUTILS="${{ startsWith(matrix.os, 'macos-') && '--binutils `brew --prefix binutils`/bin/' || '' }}"
# tools/scripts/build_stats.py --save build/stats.json \
# --max-stack ${{ matrix.max_stack || '0' }} ${SELECT_BINUTILS} \
# cjxl djxl libjxl.${SHARED_LIB_EXT} libjxl_dec.${SHARED_LIB_EXT}
# cjpegli djpegli libjpegli.${SHARED_LIB_EXT} libjpegli_dec.${SHARED_LIB_EXT}

# Check that we can build the example project against the installed libs.
#- name: Install and build examples
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/build_test_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
identifier: x64
test_in_pr: true
cmake_args: >-
-DJPEGXL_ENABLE_HWY_AVX3=true
-DJPEGXL_ENABLE_HWY_AVX3_DL=true
-DJPEGXL_ENABLE_HWY_AVX3_SPR=true
-DJPEGXL_ENABLE_HWY_AVX3_ZEN4=true
-DJPEGLI_ENABLE_HWY_AVX3=true
-DJPEGLI_ENABLE_HWY_AVX3_DL=true
-DJPEGLI_ENABLE_HWY_AVX3_SPR=true
-DJPEGLI_ENABLE_HWY_AVX3_ZEN4=true

env:
WILL_RUN_TESTS: ${{ (github.event_name == 'push' || (github.event_name == 'pull_request' && (matrix.test_in_pr || contains(github.event.pull_request.labels.*.name, 'CI:full')))) }}
Expand Down Expand Up @@ -84,8 +84,7 @@ jobs:
BUILD_DIR=build BUILD_TARGET=${{ matrix.build_target }} \
SKIP_TEST=1 TARGETS='all_tests cjpegli djpegli libjpeg.so' \
./ci.sh release \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGLI_ENABLE_JNI=OFF \
${{ matrix.cmake_args }}

- name: Build stats
Expand Down Expand Up @@ -207,7 +206,7 @@ jobs:
BUILD_DIR=build \
${EMULATOR} ./ci.sh test \
-I ${{ matrix.shard_number }},,${{ env.LAST_SHARD }} \
-E '(bash_test|conformance_tooling_test|test_jxl_jni_wrapper|test_jpegli_jni_wrapper)'
-E '(bash_test|conformance_tooling_test|test_jpegli_jni_wrapper|test_jpegli_jni_wrapper)'

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
name: Upload test cost
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build_test_msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
disable_tests:
- ButteraugliTest.Lossless
- ButteraugliTest.Distmap
- JxlTest.RoundtripLargeEmptyModular
- JpegliTest.RoundtripLargeEmptyModular
disable_benchmark: true
# "Legacy" toolchains are being "phased-out":
# https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages
Expand Down Expand Up @@ -71,7 +71,6 @@ jobs:
git
procps
pacboy: >-
brotli:p
cmake:p
giflib:p
gtest:p
Expand All @@ -86,10 +85,9 @@ jobs:
run: |
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_GTEST=ON \
-DJPEGLI_ENABLE_JNI=OFF \
-DJPEGLI_ENABLE_MANPAGES=OFF \
-DJPEGLI_FORCE_SYSTEM_GTEST=ON \
-B build \
-G Ninja

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/build_test_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,13 @@ jobs:
./ci.sh release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
-DJPEGXL_ENABLE_DOXYGEN=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_TOOLS=OFF \
-DJPEGXL_ENABLE_VIEWERS=OFF
-DJPEGLI_ENABLE_BENCHMARK=OFF \
-DJPEGLI_ENABLE_DEVTOOLS=OFF \
-DJPEGLI_ENABLE_DOXYGEN=OFF \
-DJPEGLI_ENABLE_EXAMPLES=OFF \
-DJPEGLI_ENABLE_JNI=OFF \
-DJPEGLI_ENABLE_MANPAGES=OFF \
-DJPEGLI_ENABLE_TOOLS=OFF
- name: ccache stats
run: ccache --show-stats

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ jobs:
CC=clang CXX=clang++ \
SKIP_TEST=1 TARGETS=all \
./ci.sh opt \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DBUILD_TESTING=OFF

- name: Perform CodeQL Analysis
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/debug_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ jobs:
libstdc++-10-dev:${{ matrix.arch }}

# Dependencies
libbrotli-dev:${{ matrix.arch }}
libgif-dev:${{ matrix.arch }}
libjpeg-dev:${{ matrix.arch }}
libpng-dev:${{ matrix.arch }}
Expand Down Expand Up @@ -126,8 +125,7 @@ jobs:
- name: Configure
run: |
CMAKE_FLAGS="${{ matrix.cmake_flags }}" ./ci.sh release \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGLI_ENABLE_JNI=OFF \
${{ join(matrix.cmake_args, ' ') }}
env:
SKIP_BUILD: 1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
id: checkout
with:
# The build_fuzzers action checks out the code to the storage/libjxl
# The build_fuzzers action checks out the code to the storage/libjpegli
# directory already, but doesn't check out the submodules. This step
# is a workaround for checking out the submodules.
path: storage/libjxl
path: storage/libjpegli
submodules: true
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@71ecd5d4e4bf9a6edc19c9fa6d2422fb528bca4f # master
with:
oss-fuzz-project-name: 'libjxl'
oss-fuzz-project-name: 'libjpegli'
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@71ecd5d4e4bf9a6edc19c9fa6d2422fb528bca4f # master
with:
oss-fuzz-project-name: 'libjxl'
oss-fuzz-project-name: 'libjpegli'
language: c++
fuzz-seconds: 600
- name: Upload Crash
Expand Down
Loading
Loading