2017.11.21 13:15 "[Tiff] Write a tif with JPG compression", by Emmanuel Cosnard

2017.11.23 09:10 "[Tiff] [PATCH] CI improvements for GitLab and GitHub", by Roger Leigh

These patches

Test results for each:

https://gitlab.com/rleigh/libtiff/pipelines/14278264 https://travis-ci.org/rleigh-codelibre/libtiff/builds/306061381

https://ci.appveyor.com/project/rleigh-codelibre/libtiff-9jala/build/1.0.4

Regards,
Roger

From 1ac42d5f93f9dfacff6e3294196d409c068e4c69 Mon Sep 17 00:00:00 2001 From: Roger Leigh <rleigh@codelibre.net> Date: Wed, 22 Nov 2017 22:22:47 +0000 Subject: [PATCH 1/3] Add gitlab-ci build support

---

 .gitlab-ci.yml  | 21 +++++++++++++++++++++
 build/gitlab-ci | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 2 files changed, 77 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 build/gitlab-ci

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/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
--
2.15.0

Subject: [PATCH 2/3] travis-ci: Remove unused matrix exclusion

---
 .travis.yml | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b18ea5c5..96d262e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,11 +24,5 @@ env:

-matrix:

- env: BUILD=cmake TOOL="Ninja" TYPE=Debug NETACCESSOR=cfurl TRANSCODER=macosunicodeconverter
-
 script:
   - sh ./build/travis-ci "$BUILD" "$TOOL" "$TYPE"
--
2.15.0

From 68c928923a86c115cc7dedf8099b8b214196a357 Mon Sep 17 00:00:00 2001 From: Roger Leigh <rleigh@codelibre.net> Date: Thu, 23 Nov 2017 08:23:34 +0000 Subject: [PATCH 3/3] appveyor: Correct path for git clone and skip artefact

 archival

---
 .appveyor.yml | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 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:

-
-before_build:

   - '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

--
2.15.0