shrinkv: fix region stride handling #1488
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
permissions: {} | |
jobs: | |
CI: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Linux x64 (Ubuntu 24.04) - GCC 14" | |
os: ubuntu-24.04 | |
build: { cc: gcc-14, cxx: g++-14, linker: ld } | |
- name: "Linux x64 (Ubuntu 24.04) - Clang 18 with ASan and UBSan" | |
os: ubuntu-24.04 | |
build: { cc: clang-18, cxx: clang++-18, linker: ld.lld-18, sanitize: true } | |
- name: "macOS arm64 (14) - Xcode 15" | |
os: macos-14 | |
build: { cc: clang, cxx: clang++, linker: ld.lld } | |
env: | |
CC: ${{ matrix.build.cc }} | |
CXX: ${{ matrix.build.cxx }} | |
LD: ${{ matrix.build.linker }} | |
CPPFLAGS: -Wall | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ubuntu dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
meson pkg-config \ | |
libarchive-dev libcfitsio-dev libcgif-dev \ | |
libexif-dev libexpat1-dev libffi-dev \ | |
libfftw3-dev libheif-dev libheif-plugin-aomenc \ | |
libheif-plugin-x265 libhwy-dev libimagequant-dev \ | |
libjpeg-dev libjxl-dev liblcms2-dev \ | |
libmatio-dev libnifti-dev libopenexr-dev \ | |
libopenjp2-7-dev libopenslide-dev libpango1.0-dev \ | |
libpng-dev libpoppler-glib-dev librsvg2-dev \ | |
libtiff5-dev libwebp-dev | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: | | |
pip3 install meson --break-system-packages | |
brew install \ | |
ninja pkgconf \ | |
cfitsio cgif fftw fontconfig glib \ | |
highway jpeg-xl libarchive libexif \ | |
libheif libimagequant libmatio librsvg \ | |
libspng libtiff little-cms2 mozjpeg \ | |
openexr openjpeg openslide pango \ | |
poppler webp | |
- name: Install Clang 18 | |
if: runner.os == 'Linux' && matrix.build.cc == 'clang-18' | |
run: sudo apt-get install clang-18 libomp-18-dev lld-18 llvm-18 | |
- name: Prepare macOS environment | |
if: runner.os == 'macOS' | |
run: | | |
echo "PKG_CONFIG_PATH=$(brew --prefix mozjpeg)/lib/pkgconfig:$(brew --prefix libarchive)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
- name: Prepare sanitizers | |
if: matrix.build.sanitize | |
env: | |
LLVM_PREFIX: /usr/lib/llvm-18 | |
run: | | |
ASAN_DSO=`$CC -print-file-name=libclang_rt.asan-x86_64.so` | |
echo "LDSHARED=$CC -shared" >> $GITHUB_ENV | |
echo "CPPFLAGS=-g -fsanitize=address,undefined -fno-sanitize=function -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" >> $GITHUB_ENV | |
echo "LDFLAGS=-g -fsanitize=address,undefined -shared-libasan -fopenmp=libomp" >> $GITHUB_ENV | |
echo "ASAN_DSO=$ASAN_DSO" >> $GITHUB_ENV | |
# Glib is built without -fno-omit-frame-pointer. We need | |
# to disable the fast unwinder to get full stacktraces. | |
echo "ASAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/asan.supp:fast_unwind_on_malloc=0:allocator_may_return_null=1" >> $GITHUB_ENV | |
echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp:fast_unwind_on_malloc=0" >> $GITHUB_ENV | |
echo "TSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/tsan.supp" >> $GITHUB_ENV | |
# Ensure UBSan issues causes the program to abort. | |
echo "UBSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/ubsan.supp:halt_on_error=1:abort_on_error=1:print_stacktrace=1" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$LLVM_PREFIX/lib:`dirname $ASAN_DSO`" >> $GITHUB_ENV | |
echo "$LLVM_PREFIX/bin" >> $GITHUB_PATH | |
- name: Configure libvips | |
run: | |
meson setup build | |
-Ddebug=true | |
-Ddeprecated=false | |
-Dmagick=disabled | |
|| (cat build/meson-logs/meson-log.txt && exit 1) | |
- name: Build libvips | |
run: meson compile -C build | |
- name: Check libvips | |
run: | | |
meson test -C build \ | |
|| (cat build/meson-logs/testlog.txt && exit 1) | |
- name: Install libvips | |
run: sudo meson install -C build | |
- name: Rebuild the shared library cache | |
if: runner.os == 'Linux' | |
run: sudo ldconfig | |
- name: Install pyvips | |
run: pip3 install pyvips[test] --break-system-packages | |
- name: Run test suite | |
env: | |
VIPS_LEAK: 1 | |
LD_PRELOAD: ${{ env.ASAN_DSO }} | |
run: python3 -m pytest -sv --log-cli-level=WARNING test/test-suite |