CI: resolve failures and various improvements (#2426)
* Simplify CI workflow
* CI: upgrade Ubuntu's Clang version to 12
* CI: upgrade macOS runner to version 11 (Big Sur)
* CI: temporarily disable the M1 runner
* CI: output test suite log upon failure
* CI: avoid brew update/upgrade steps
Since it may take a long time.
* CI: all jobs are supposed to succeed
* Fix test_descriptors.c failure after f8c2a36
Use a RANDOM image to create many crops from one source.
This commit is contained in:
parent
f8c2a36746
commit
f2e5b7e9da
89
.github/workflows/ci.yml
vendored
89
.github/workflows/ci.yml
vendored
@ -6,54 +6,60 @@ jobs:
|
|||||||
CI:
|
CI:
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: ${{ contains(matrix.os, 'macos') }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: [ "Linux x64 (Ubuntu 20.04) - GCC 10" ]
|
|
||||||
os: [ ubuntu-20.04 ]
|
|
||||||
sanitize: [ false ]
|
|
||||||
build:
|
|
||||||
- { cc: gcc, cxx: g++, linker: ld, shell: bash }
|
|
||||||
include:
|
include:
|
||||||
- name: "Linux x64 (Ubuntu 20.04) - Clang 10 with ASan and UBSan"
|
- name: "Linux x64 (Ubuntu 20.04) - GCC 10"
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
sanitize: true
|
build: { cc: gcc, cxx: g++, linker: ld }
|
||||||
build: { cc: clang-10, cxx: clang++-10, linker: ld.lld-10, shell: bash }
|
shell: bash
|
||||||
- name: "macOS (10.15) - Xcode 12.3"
|
|
||||||
os: macos-10.15
|
- name: "Linux x64 (Ubuntu 20.04) - Clang 12 with ASan and UBSan"
|
||||||
sanitize: false
|
os: ubuntu-20.04
|
||||||
build: { cc: clang, cxx: clang++, linker: ld.lld, shell: bash }
|
build: { cc: clang-12, cxx: clang++-12, linker: ld.lld-12, sanitize: true }
|
||||||
- name: "macOS (10.15) - Xcode 12.3 - M1"
|
shell: bash
|
||||||
os: macos-m1
|
|
||||||
sanitize: false
|
- name: "macOS (11.5) - Xcode 12.5.1"
|
||||||
build: { cc: clang, cxx: clang++, linker: ld.lld, shell: "/usr/bin/arch -arch arm64e /bin/bash -l {0}" }
|
os: macos-11
|
||||||
|
build: { cc: clang, cxx: clang++, linker: ld.lld }
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# TODO: Re-enable self-hosted M1 runner provided by MacStadium
|
||||||
|
#- name: "macOS (10.15) - Xcode 12.4 - M1"
|
||||||
|
# os: macos-m1
|
||||||
|
# build: { cc: clang, cxx: clang++, linker: ld.lld }
|
||||||
|
# shell: "/usr/bin/arch -arch arm64e /bin/bash -l {0}"
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: ${{ matrix.build.shell }}
|
shell: ${{ matrix.shell }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.build.cc }}
|
||||||
|
CXX: ${{ matrix.build.cxx }}
|
||||||
|
LD: ${{ matrix.build.linker }}
|
||||||
|
CPPFLAGS: -Wall
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: runner.os == 'Linux'
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
run: sudo -E apt-get update -qq -o Acquire::Retries=3
|
run: sudo -E apt-get update -qq -o Acquire::Retries=3
|
||||||
|
|
||||||
- name: Add Ubuntu PPAs
|
- name: Add Ubuntu PPAs
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository ppa:strukturag/libde265
|
sudo add-apt-repository ppa:strukturag/libde265
|
||||||
sudo add-apt-repository ppa:strukturag/libheif
|
sudo add-apt-repository ppa:strukturag/libheif
|
||||||
sudo add-apt-repository ppa:lovell/cgif
|
sudo add-apt-repository ppa:lovell/cgif
|
||||||
|
|
||||||
- name: Install Ubuntu dependencies
|
- name: Install Ubuntu dependencies
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: runner.os == 'Linux'
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
run:
|
run:
|
||||||
sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3
|
sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3
|
||||||
gtk-doc-tools gobject-introspection
|
gtk-doc-tools gobject-introspection
|
||||||
@ -68,44 +74,33 @@ jobs:
|
|||||||
libopenjp2-7-dev libimagequant-dev libcgif-dev
|
libopenjp2-7-dev libimagequant-dev libcgif-dev
|
||||||
|
|
||||||
- name: Install macOS dependencies
|
- name: Install macOS dependencies
|
||||||
if: contains(matrix.os, 'macos')
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
brew update
|
|
||||||
brew upgrade
|
|
||||||
brew install autoconf automake libtool fftw fontconfig gtk-doc gobject-introspection glib libexif libgsf little-cms2 orc pango
|
brew install autoconf automake libtool fftw fontconfig gtk-doc gobject-introspection glib libexif libgsf little-cms2 orc pango
|
||||||
brew install cfitsio libheif libimagequant libjpeg-turbo libmatio librsvg libspng libtiff openexr openjpeg openslide poppler webp
|
brew install cfitsio libheif libimagequant libjpeg-turbo libmatio librsvg libspng libtiff openexr openjpeg openslide poppler webp
|
||||||
brew tap lovell/cgif-packaging https://github.com/lovell/cgif-packaging.git
|
brew tap lovell/cgif-packaging https://github.com/lovell/cgif-packaging.git
|
||||||
brew install --build-bottle lovell/cgif-packaging/cgif
|
brew install --build-bottle lovell/cgif-packaging/cgif
|
||||||
|
|
||||||
- name: Install Clang 10
|
- name: Install Clang 12
|
||||||
env:
|
if: runner.os == 'Linux' && matrix.build.cc == 'clang-12'
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
if: contains(matrix.os, 'ubuntu') && matrix.build.cc == 'clang-10'
|
|
||||||
run:
|
run:
|
||||||
sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3
|
sudo -E apt-get install --fix-missing -qq -o Acquire::Retries=3
|
||||||
clang-10 libomp-10-dev lld-10 llvm-10
|
clang-12 libomp-12-dev lld-12 llvm-12
|
||||||
|
|
||||||
- name: Prepare build environment
|
|
||||||
run: |
|
|
||||||
echo "CC=${{ matrix.build.cc }}" >> $GITHUB_ENV
|
|
||||||
echo "CXX=${{ matrix.build.cxx }}" >> $GITHUB_ENV
|
|
||||||
echo "LD=${{ matrix.build.linker }}" >> $GITHUB_ENV
|
|
||||||
echo "CPPFLAGS=-Wall" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Prepare Ubuntu environment
|
- name: Prepare Ubuntu environment
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: runner.os == 'Linux'
|
||||||
run: echo "JOBS=$(nproc)" >> $GITHUB_ENV
|
run: echo "JOBS=$(nproc)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Prepare macOS environment
|
- name: Prepare macOS environment
|
||||||
if: contains(matrix.os, 'macos')
|
if: runner.os == 'macOS'
|
||||||
run: |
|
run: |
|
||||||
echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV
|
echo "JOBS=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV
|
||||||
echo "PKG_CONFIG_PATH=/usr/local/opt/jpeg-turbo/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/imagemagick@6/lib/pkgconfig" >> $GITHUB_ENV
|
echo "PKG_CONFIG_PATH=$(brew --prefix jpeg-turbo)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Prepare sanitizers
|
- name: Prepare sanitizers
|
||||||
if: matrix.sanitize
|
if: matrix.build.sanitize
|
||||||
env:
|
env:
|
||||||
LLVM_PREFIX: /usr/lib/llvm-10
|
LLVM_PREFIX: /usr/lib/llvm-12
|
||||||
run: |
|
run: |
|
||||||
ASAN_DSO=`$CC -print-file-name=libclang_rt.asan-x86_64.so`
|
ASAN_DSO=`$CC -print-file-name=libclang_rt.asan-x86_64.so`
|
||||||
echo "LDSHARED=$CC -shared" >> $GITHUB_ENV
|
echo "LDSHARED=$CC -shared" >> $GITHUB_ENV
|
||||||
@ -133,13 +128,13 @@ jobs:
|
|||||||
run: make V=0 -j$JOBS
|
run: make V=0 -j$JOBS
|
||||||
|
|
||||||
- name: Check libvips
|
- name: Check libvips
|
||||||
run: make V=0 check
|
run: make V=0 check || (cat test/test-suite.log && exit 1)
|
||||||
|
|
||||||
- name: Install libvips
|
- name: Install libvips
|
||||||
run: sudo make V=0 install
|
run: sudo make V=0 install
|
||||||
|
|
||||||
- name: Rebuild the shared library cache
|
- name: Rebuild the shared library cache
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: runner.os == 'Linux'
|
||||||
run: sudo ldconfig
|
run: sudo ldconfig
|
||||||
|
|
||||||
- name: Install pyvips
|
- name: Install pyvips
|
||||||
|
@ -56,11 +56,11 @@ main( int argc, char **argv )
|
|||||||
|
|
||||||
/* Opening an image should read the header, then close the fd.
|
/* Opening an image should read the header, then close the fd.
|
||||||
*/
|
*/
|
||||||
printf( "** seq open ..\n" );
|
printf( "** rand open ..\n" );
|
||||||
if( !(source = vips_source_new_from_file( argv[1] )) )
|
if( !(source = vips_source_new_from_file( argv[1] )) )
|
||||||
vips_error_exit( NULL );
|
vips_error_exit( NULL );
|
||||||
if( !(image = vips_image_new_from_source( source, "",
|
if( !(image = vips_image_new_from_source( source, "",
|
||||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
"access", VIPS_ACCESS_RANDOM,
|
||||||
NULL )) )
|
NULL )) )
|
||||||
vips_error_exit( NULL );
|
vips_error_exit( NULL );
|
||||||
if( count_files( fd_dir ) != n_files )
|
if( count_files( fd_dir ) != n_files )
|
||||||
|
Loading…
Reference in New Issue
Block a user