加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 4.61 KB
一键复制 编辑 原始数据 按行查看 历史
language: cpp
env:
global:
- PYTHON=python3
- PYVIPS_VERSION=master
addons:
apt:
update: true
sources: &common_sources
# add support for AVIF files
- sourceline: 'ppa:strukturag/libheif'
- sourceline: 'ppa:strukturag/libde265'
packages: &common_packages
- gtk-doc-tools
- gobject-introspection
- python3-pip
- python3-setuptools
- python3-wheel
- libfftw3-dev
- libexif-dev
- libjpeg-turbo8-dev
- libpng-dev
- libwebp-dev
- libtiff5-dev
- libheif-dev
- libexpat1-dev
- libcfitsio-dev
- libgsl-dev
- libmatio-dev
- libnifti-dev
- liborc-0.4-dev
- liblcms2-dev
- libpoppler-glib-dev
- librsvg2-dev
- libgif-dev
- libopenexr-dev
- libpango1.0-dev
- libgsf-1-dev
- libopenslide-dev
- libffi-dev
homebrew:
update: true
packages:
- ccache
- cfitsio
- fftw
- giflib
- glib
- gobject-introspection
- gtk-doc
- libexif
- libgsf
- libheif
- libjpeg-turbo
- libmatio
- librsvg
- libspng
- libtiff
- little-cms2
- openexr
- openslide
- orc
- pango
- poppler
- webp
jobs:
allow_failures:
- os: osx
fast_finish: true
include:
- os: linux
dist: bionic
compiler: gcc
name: "Linux x64 (Ubuntu 18.04) - GCC 10"
addons:
apt:
sources:
- *common_sources
- ubuntu-toolchain-r-test
packages:
- *common_packages
- libmagick++-dev
- g++-10
env:
- JPEG=/usr
- JOBS=`nproc`
- WITH_MAGICK=yes
- CC="gcc-10"
- CXX="g++-10"
- LDSHARED="$CC -shared"
- CFLAGS="-Wcast-function-type"
cache: ccache
- os: linux
dist: bionic
compiler: clang
name: "Linux x64 (Ubuntu 18.04) - Clang 10 with ASan and UBSan"
addons:
apt:
sources:
- *common_sources
- sourceline: deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
- *common_packages
- clang-10
- libomp-10-dev
env:
- JPEG=/usr
- JOBS=`nproc`
- WITH_MAGICK=no
- CC="clang-10"
- CXX="clang++-10"
- LDSHARED="$CC -shared"
- CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
- CXXFLAGS="$CFLAGS"
- LDFLAGS="-fsanitize=address,undefined -shared-libasan -fopenmp=libomp"
- ASAN_DSO=`$CC -print-file-name=libclang_rt.asan-x86_64.so`
- ASAN_SYMBOLIZER_PATH=`which llvm-symbolizer-10`
- ASAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/suppressions/asan.supp"
- LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/suppressions/lsan.supp"
- UBSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/suppressions/ubsan.supp:print_stacktrace=1"
- LD_LIBRARY_PATH="/usr/lib/llvm-10/lib:`dirname $ASAN_DSO`"
- DLCLOSE_PRELOAD="$TRAVIS_BUILD_DIR/dlclose.so"
before_script:
# workaround for https://github.com/google/sanitizers/issues/89
# otherwise libIlmImf-2_2.so ends up as <unknown module>
- echo -e '#include <stdio.h>\nint dlclose(void*handle){return 0;}' | $CC -shared -xc -odlclose.so -
cache: ccache
- os: osx
osx_image: xcode11
name: "macOS (10.14.6) - Xcode 11"
env:
- JPEG=/usr/local/opt/jpeg-turbo
- JOBS="`sysctl -n hw.ncpu`"
- WITH_MAGICK=no
- PATH="/usr/local/opt/ccache/libexec:$PATH"
- PKG_CONFIG_PATH="/usr/local/opt/jpeg-turbo/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH"
- HOMEBREW_NO_AUTO_UPDATE=1
- CC="clang"
- CXX="clang++"
cache: ccache
install:
- $PYTHON -m pip download --no-deps https://github.com/libvips/pyvips/archive/$PYVIPS_VERSION.tar.gz
- tar xf $PYVIPS_VERSION.tar.gz
- $PYTHON -m pip install --user --upgrade pyvips-$PYVIPS_VERSION/[test]
- ./autogen.sh
--disable-dependency-tracking
--disable-deprecated
--with-jpeg-includes=$JPEG/include
--with-jpeg-libraries=$JPEG/lib
--with-magick=$WITH_MAGICK
- make -j$JOBS -s
script:
- make -j$JOBS -s -k V=0 VERBOSE=1 check
- LD_LIBRARY_PATH="$PWD/libvips/.libs:$LD_LIBRARY_PATH"
DYLD_LIBRARY_PATH=$PWD/libvips/.libs
LD_PRELOAD="$ASAN_DSO $DLCLOSE_PRELOAD"
$PYTHON -m pytest -sv --log-cli-level=WARNING test/test-suite
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化