summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paquet <olivier.paquet@gmail.com>2017-11-30 14:04:12 +0000
committerOlivier Paquet <olivier.paquet@gmail.com>2017-11-30 14:04:12 +0000
commit92d54fd77a1c6de635bb7503ca58bb8045f6bfef (patch)
tree492238b568cf0e7eb0f4d1f29b4b89650865212e
parent38ec4dd0744075ade3d5cd49d62db6ecda1daa7f (diff)
parent68c928923a86c115cc7dedf8099b8b214196a357 (diff)
downloadlibtiff-git-92d54fd77a1c6de635bb7503ca58bb8045f6bfef.tar.gz
Merge branch 'test-ci' into 'master'
Update CI configuration See merge request libtiff/libtiff!1
-rw-r--r--.appveyor.yml16
-rw-r--r--.gitlab-ci.yml21
-rw-r--r--.travis.yml6
-rw-r--r--build/gitlab-ci56
4 files changed, 86 insertions, 13 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index e5af6c98..f469afe4 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -47,6 +47,8 @@ platform: x64
init:
- git config --global core.autocrlf input
+
+before_build:
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_TIFF_SOURCE%`) DO SET AV_TIFF_CYG_SOURCE=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_TIFF_INSTALL%`) DO SET AV_TIFF_CYG_INSTALL=%%F'
- 'if %compiler%==cygwin-cmake C:\Cygwin64\setup-x86_64 -q -R C:\Cygwin64 -s http://cygwin.mirror.constant.com -l %AV_TIFF_DOWNLOAD%\cygwin -P cmake,libjpeg-devel,zlib-devel'
@@ -60,8 +62,6 @@ init:
- 'if %compiler%==cygwin-cmake set "AV_TIFF_CMAKE_SOURCE=%AV_TIFF_CYG_SOURCE%'
- 'if %compiler%==cygwin-cmake set "AV_TIFF_CMAKE_INSTALL=%AV_TIFF_CYG_INSTALL%'
- 'if %compiler%==vc14-nmake call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %platform%'
-
-before_build:
- mkdir %AV_TIFF_BUILD%
- cd %AV_TIFF_BUILD%
- if NOT %compiler%==vc14-nmake echo Running cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_TIFF_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_TIFF_CMAKE_SOURCE%
@@ -102,8 +102,10 @@ before_test:
- 'if %compiler%==vc14-cmake ctest -V -C %configuration%'
# vc14-nmake does not support unit tests
-artifacts:
- - path: libtiff.zip
- name: libtiff.zip
- - path: libtiff-build.zip
- name: libtiff-build.zip
+# AppVeyor don't yet have a configurable retention policy, so this will
+# eventually use up all the storage allowance.
+#artifacts:
+# - path: libtiff.zip
+# name: libtiff.zip
+# - path: libtiff-build.zip
+# name: libtiff-build.zip
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..fbb7724e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,21 @@
+image: ubuntu:16.04
+before_script:
+ - apt-get update -qq && apt-get install -y -qq autoconf automake build-essential cmake libtool libjpeg8-dev libjbig-dev liblzma-dev ninja-build zlib1g-dev
+
+stages:
+ - build
+
+autoconf:
+ stage: build
+ script:
+ - sh build/gitlab-ci autoconf
+
+cmake-makefiles:
+ stage: build
+ script:
+ - sh build/gitlab-ci cmake "Unix Makefiles" Release
+
+cmake-ninja:
+ stage: build
+ script:
+ - sh build/gitlab-ci cmake "Ninja" Debug
diff --git a/.travis.yml b/.travis.yml
index b18ea5c5..96d262e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,11 +24,5 @@ env:
- BUILD=cmake TOOL="Unix Makefiles" TYPE=Release
- BUILD=cmake TOOL="Ninja" TYPE=Debug
-matrix:
- fast_finish: true
- exclude:
- - os: linux
- env: BUILD=cmake TOOL="Ninja" TYPE=Debug NETACCESSOR=cfurl TRANSCODER=macosunicodeconverter
-
script:
- sh ./build/travis-ci "$BUILD" "$TOOL" "$TYPE"
diff --git a/build/gitlab-ci b/build/gitlab-ci
new file mode 100644
index 00000000..25b3b92f
--- /dev/null
+++ b/build/gitlab-ci
@@ -0,0 +1,56 @@
+#!/bin/sh
+# This script is used for testing the build, primarily for use
+# with travis, but may be used by hand as well.
+
+set -e
+set -x
+
+# Test autoconf build
+autoconf_build()
+{
+ autoreconf -ivf
+
+ mkdir autoconf-build
+ cd autoconf-build
+ echo "Running ../configure --prefix=$(pwd)/../autoconf-install) ${opts}"
+ ../configure --prefix=$(pwd)/../autoconf-install ${opts}
+ make
+ make install
+ make check
+}
+
+# Test autoconf build
+cmake_build()
+{
+ PATH="$(pwd)/tools/bin:$PATH"
+ if [ "$(uname -s)" = "Darwin" ]; then
+ PATH="$(pwd)/tools/CMake.app/Contents/bin:$PATH"
+ fi
+ mkdir cmake-build
+ cd cmake-build
+ echo "Running cmake -G "$1" -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../autoconf-install ${opts} .."
+ cmake -G "$1" -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../autoconf-install ${opts} ..
+ cmake --build .
+ cmake --build . --target install
+ ctest -V
+}
+
+build=$1
+shift
+
+case $build in
+ autoconf)
+ echo "Testing Autoconf build"
+ autoconf_build "$@"
+ ;;
+ cmake)
+ echo "Testing CMake build"
+ cmake_build "$@"
+ ;;
+ *)
+ echo "Invalid argument: \"$arg\"" >&2
+ exit 1
+ ;;
+esac
+
+exit 0