diff options
author | Cosmin Truta <ctruta@gmail.com> | 2020-03-29 01:11:42 -0400 |
---|---|---|
committer | Cosmin Truta <ctruta@gmail.com> | 2020-03-29 01:11:42 -0400 |
commit | 2dd5630eae2a1bafbfb00eee168e1936d3855f02 (patch) | |
tree | 191514639874d40e48ed95bb074c2b2353759b0d | |
parent | b9155ce3fd59d348ec23396840648ccaa07a12ca (diff) | |
download | libpng-2dd5630eae2a1bafbfb00eee168e1936d3855f02.tar.gz |
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.
-rw-r--r-- | .appveyor.yml | 71 | ||||
-rw-r--r-- | .travis.yml | 44 | ||||
-rwxr-xr-x | scripts/travis.sh | 37 |
3 files changed, 103 insertions, 49 deletions
diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 000000000..3347886c3 --- /dev/null +++ b/.appveyor.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 2a931b6c2..2694e3289 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,43 @@ +branches: + except: + - /libpng[0-1][0-7]/ + language: c +os: + - linux + - osx + compiler: - clang + - gcc 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" + - 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" -os: - - linux - - osx +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: - - bash ./scripts/travis.sh + - './scripts/ci_$AUTOMATION.sh' sudo: false diff --git a/scripts/travis.sh b/scripts/travis.sh deleted file mode 100755 index 7d59b24dc..000000000 --- a/scripts/travis.sh +++ /dev/null @@ -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 |