mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Update configuration for Travis CI; add configuration for AppVeyor CI
Exclude the branch "libpng16" from testing. It's identical to "master". Also exclude the other (non-current) "libpng[0-1][0-7]" branches. Parallelize the builds and the unit tests. For Travis CI, update the build matrix as follows: * On Linux, use both clang and gcc. * On macOS, use clang only, with and without Xcode. For AppVeyor CI, add a build matrix as follows: * On Windows, use Microsoft Visual Studio 2019 on x86, x64 and arm64. * Also on Windows, use MSYS2 on x86 and x64. Use the new scripts/ci_*.sh; remove the old scripts/travis.sh.
This commit is contained in:
parent
b9155ce3fd
commit
2dd5630eae
71
.appveyor.yml
Normal file
71
.appveyor.yml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
version: 1.6.x-{build}
|
||||||
|
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- /libpng[0-1][0-7]/
|
||||||
|
|
||||||
|
image:
|
||||||
|
- Visual Studio 2019
|
||||||
|
|
||||||
|
shallow_clone: true
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
CI_CMAKE_GENERATOR: Visual Studio 16 2019
|
||||||
|
CI_CMAKE_GENERATOR_PLATFORM: Win32
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
CI_CMAKE_GENERATOR: Visual Studio 16 2019
|
||||||
|
CI_CMAKE_GENERATOR_PLATFORM: X64
|
||||||
|
- TOOLCHAIN: vstudio
|
||||||
|
AUTOMATION: cmake
|
||||||
|
CI_CMAKE_GENERATOR: Visual Studio 16 2019
|
||||||
|
CI_CMAKE_GENERATOR_PLATFORM: ARM64
|
||||||
|
CI_NO_TEST: 1
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: cmake
|
||||||
|
CI_CMAKE_GENERATOR: Unix Makefiles
|
||||||
|
CI_CC: i686-w64-mingw32-gcc
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: cmake
|
||||||
|
CI_CMAKE_GENERATOR: Unix Makefiles
|
||||||
|
CI_CC: x86_64-w64-mingw32-gcc
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: autotools
|
||||||
|
CI_CC: i686-w64-mingw32-gcc
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: autotools
|
||||||
|
CI_CC: x86_64-w64-mingw32-gcc
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: legacy
|
||||||
|
CI_LEGACY_MAKEFILES: scripts/makefile.gcc scripts/makefile.msys
|
||||||
|
CI_CC: i686-w64-mingw32-gcc
|
||||||
|
- TOOLCHAIN: msys2
|
||||||
|
AUTOMATION: legacy
|
||||||
|
CI_LEGACY_MAKEFILES: scripts/makefile.gcc scripts/makefile.msys
|
||||||
|
CI_CC: x86_64-w64-mingw32-gcc
|
||||||
|
|
||||||
|
install:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%CI_CMAKE_GENERATOR_PLATFORM%"=="Win32" C:\tools\vcpkg\vcpkg.exe install zlib:x86-windows'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%CI_CMAKE_GENERATOR_PLATFORM%"=="X64" C:\tools\vcpkg\vcpkg.exe install zlib:x64-windows'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" if "%CI_CMAKE_GENERATOR_PLATFORM%"=="ARM64" C:\tools\vcpkg\vcpkg.exe install zlib:arm64-windows'
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install'
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_VARS=-DCMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%CI_CC%"=="i686-w64-mingw32-gcc" set PATH=C:\msys64\mingw32\bin;%PATH%'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%CI_CC%"=="x86_64-w64-mingw32-gcc" set PATH=C:\msys64\mingw64\bin;%PATH%'
|
||||||
|
- 'set CI_CMAKE_BUILD_FLAGS=--parallel 2'
|
||||||
|
- 'set CI_CTEST_FLAGS=--parallel 2'
|
||||||
|
- 'set CI_MAKE_FLAGS=-j2'
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\scripts\ci_cmake.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\scripts\ci_cmake.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="autotools" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\scripts\ci_autotools.sh"'
|
||||||
|
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="legacy" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\scripts\ci_legacy.sh"'
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- C:\tools\vcpkg\installed
|
48
.travis.yml
48
.travis.yml
@ -1,23 +1,43 @@
|
|||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- /libpng[0-1][0-7]/
|
||||||
|
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
compiler:
|
|
||||||
- clang
|
|
||||||
|
|
||||||
env:
|
|
||||||
- USE_CMAKE=1 DISABLE_TESTS=1
|
|
||||||
- USE_CMAKE=1 ENABLE_SANITIZERS="address,undefined" EXTRA_ARGS="-DPNG_HARDWARE_OPTIMIZATIONS=ON"
|
|
||||||
- USE_CMAKE=1 ENABLE_SANITIZERS="address,undefined" EXTRA_ARGS="-DPNG_HARDWARE_OPTIMIZATIONS=OFF"
|
|
||||||
- USE_CONFIGURE=1 DISABLE_TESTS=1
|
|
||||||
- USE_CONFIGURE=1 EXTRA_ARGS="--enable-hardware-optimizations"
|
|
||||||
- USE_CONFIGURE=1 EXTRA_ARGS="--disable-hardware-optimizations"
|
|
||||||
- USE_LEGACY_MAKEFILES=1 DISABLE_TESTS=1
|
|
||||||
- USE_LEGACY_MAKEFILES=1 ENABLE_SANITIZERS="address,undefined"
|
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
|
||||||
|
env:
|
||||||
|
- AUTOMATION=cmake CI_NO_TEST=1
|
||||||
|
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=ON" CI_SANITIZERS="address,undefined"
|
||||||
|
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=OFF" CI_SANITIZERS="address,undefined"
|
||||||
|
- AUTOMATION=cmake CI_CMAKE_GENERATOR=Xcode
|
||||||
|
- AUTOMATION=autotools CI_NO_TEST=1
|
||||||
|
- AUTOMATION=autotools CI_CONFIGURE_FLAGS="--enable-hardware-optimizations"
|
||||||
|
- AUTOMATION=autotools CI_CONFIGURE_FLAGS="--disable-hardware-optimizations"
|
||||||
|
- AUTOMATION=legacy CI_NO_TEST=1
|
||||||
|
- AUTOMATION=legacy CI_SANITIZERS="address,undefined"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- os: osx
|
||||||
|
compiler: gcc
|
||||||
|
- os: linux
|
||||||
|
env: AUTOMATION=cmake CI_CMAKE_GENERATOR=Xcode
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- 'export CI_CMAKE_BUILD_FLAGS="--parallel 2"'
|
||||||
|
- 'export CI_CTEST_FLAGS="--parallel 2"'
|
||||||
|
- 'export CI_MAKE_FLAGS=-j2'
|
||||||
|
- 'export CI_CC=$TRAVIS_COMPILER'
|
||||||
|
- 'export CI_LEGACY_MAKEFILES="scripts/makefile.$TRAVIS_COMPILER"'
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- bash ./scripts/travis.sh
|
- './scripts/ci_$AUTOMATION.sh'
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [[ $ENABLE_SANITIZERS ]]; then
|
|
||||||
LOCAL_CMAKE_EXTRA_ARGS="-DCMAKE_C_FLAGS=-fsanitize=$ENABLE_SANITIZERS"
|
|
||||||
LOCAL_MAKE_EXTRA_ARGS="CFLAGS=-fsanitize=$ENABLE_SANITIZERS LDFLAGS=-fsanitize=$ENABLE_SANITIZERS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $USE_CMAKE ]]; then
|
|
||||||
echo "$0: using cmake + make:" $LOCAL_CMAKE_EXTRA_ARGS $EXTRA_ARGS
|
|
||||||
mkdir build-cmake
|
|
||||||
cd build-cmake
|
|
||||||
cmake $LOCAL_CMAKE_EXTRA_ARGS $EXTRA_ARGS ..
|
|
||||||
make
|
|
||||||
[[ $DISABLE_TESTS ]] || make test
|
|
||||||
make clean
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $USE_CONFIGURE ]]; then
|
|
||||||
mkdir build-configure
|
|
||||||
cd build-configure
|
|
||||||
echo "$0: using configure + make:" $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS
|
|
||||||
../configure $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS
|
|
||||||
make
|
|
||||||
[[ $DISABLE_TESTS ]] || make test
|
|
||||||
make clean
|
|
||||||
make distclean
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $USE_LEGACY_MAKEFILES ]]; then
|
|
||||||
echo "$0: using scripts/makefile.$CC:" $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS
|
|
||||||
make -f scripts/makefile.$CC $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS
|
|
||||||
[[ $DISABLE_TESTS ]] || make -f scripts/makefile.$CC $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS test
|
|
||||||
make -f scripts/makefile.$CC $LOCAL_MAKE_EXTRA_ARGS $EXTRA_ARGS clean
|
|
||||||
# TODO: use scripts/makefile.std, etc.
|
|
||||||
fi
|
|
Loading…
x
Reference in New Issue
Block a user