Skip to contentSkip to conversation

Add Travis CI support

PATCH Superseded [email protected] 3 participants 7 messages Jun 15, 2016

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v7 cover Add Travis CI support

From: Lars Schneider <[email protected]>

diff to v6 (thanks Peff for the review):
* removed sub topics "de-flaking test_must_fail" and "p4 test improvements" as suggested by Peff
* fixed Perforce spelling
* disabled t9810 and t9816 in .travis.yml as they are instable
* removed commented flags in .travis.yml
* removed GETTEXT_* flags in .travis.yml
* removed NO_* build configration in .travis.yml
* removed autoconf usage
* fixed OS X 10.9 build and later with NO_GETTEXT flag
* added cflags "-Wall -Werror" to detect all kinds of warnings (see [1])
* updated Git-LFS and P4D to the latest version

Cheers,
Lars

[1] http://thread.gmane.org/gmane.comp.version-control.git/281140

Lars Schneider (2):
config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later Add Travis CI support

 .travis.yml      | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 config.mak.uname |  5 ++++
 2 files changed, 95 insertions(+)
 create mode 100644 .travis.yml

--
2.5.1

#1 lore raw

PATCH v7 1/2 config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

From: Lars Schneider <[email protected]>

At least since OS X 10.9 Mavericks "libintl.h" is not available on OS X anymore. Disable the support with the NO_GETTEXT flag.

---
 config.mak.uname | 5 +++++
 1 file changed, 5 insertions(+)
config.mak.uname +5 -0
index f34dcaa..f3d98bb 100644
@@ -102,9 +102,14 @@ ifeq ($(uname_S),Darwin)
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease
 	endif
+	# MacOS 10.7 Lion and higher
 	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
 		HAVE_GETDELIM = YesPlease
 	endif
+	# MacOS 10.9 Mavericks and higher
+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
+		NO_GETTEXT = YesPlease
+	endif
 	NO_MEMMEM = YesPlease
 	USE_ST_TIMESPEC = YesPlease
 	HAVE_DEV_TTY = YesPlease
Signature · 1 line
2.5.1
#2 lore raw

Re: [PATCH v7 1/2] config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

Quoted 19 lines · On 11/23/2015 09:25 AM, [email protected] wrote:

From: Lars Schneider <[email protected]>

At least since OS X 10.9 Mavericks "libintl.h" is not available on OS X anymore. Disable the support with the NO_GETTEXT flag.

---
  config.mak.uname | 5 +++++
  1 file changed, 5 insertions(+)
config.mak.uname +1 -0
index f34dcaa..f3d98bb 100644
@@ -102,9 +102,14 @@ ifeq ($(uname_S),Darwin)
  	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
  		NO_STRLCPY = YesPlease
  	endif
+	# MacOS 10.7 Lion and higher

config.mak.uname ifeq ($(uname_S),Darwin) · line 115

Quoted 10 lines
config.mak.uname +4 -0
  	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
  		HAVE_GETDELIM = YesPlease
  	endif
+	# MacOS 10.9 Mavericks and higher
+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
+		NO_GETTEXT = YesPlease
+	endif
  	NO_MEMMEM = YesPlease
  	USE_ST_TIMESPEC = YesPlease
  	HAVE_DEV_TTY = YesPlease

Unless I'm wrong, no Mac OS X had libintl.h, and the "unwritten agreement (?)" was that either
a) libintl ist installed in some way (fink, mac ports, brew, other ways) or
b) people use
NO_GETTEXT=yes make

Doesn't this patch close the door for b), making it impossible to build Git against libintl ? A better test may if libintl is installed may help, or better documentation.

#3 lore raw

Re: [PATCH v7 1/2] config.mak.uname: Darwin: define NO_GETTEXT for OS X 10.9 and later

Quoted 19 lines · Torsten Bögershausen

config.mak.uname ifeq ($(uname_S),Darwin) · line 115

Quoted 11 lines
config.mak.uname +5 -0
+	# MacOS 10.7 Lion and higher
 	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
 		HAVE_GETDELIM = YesPlease
 	endif
+	# MacOS 10.9 Mavericks and higher
+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 13 && echo 1),1)
+		NO_GETTEXT = YesPlease
+	endif
 	NO_MEMMEM = YesPlease
 	USE_ST_TIMESPEC = YesPlease
 	HAVE_DEV_TTY = YesPlease

Unless I'm wrong, no Mac OS X had libintl.h, and the "unwritten agreement (?)" was
that either
a) libintl ist installed in some way (fink, mac ports, brew, other ways) or
b) people use
NO_GETTEXT=yes make

Quoted 2 lines

Doesn't this patch close the door for b), making it impossible to build Git against libintl ?

I think the right way to do (b) is:

make NO_GETTEXT=Yes

which will override anything we do in config.mak.uname (and likewise, anything from autoconf will override it, if we have a test there).

Still, it will be a surprise to packagers in (a), who assume that installing libintl and then building git is enough to have gettext support (now they would actively need to override NO_GETTEXT).

-Peff

#4 lore raw

PATCH v7 2/2 Add Travis CI support

In reply to [email protected]

From: Lars Schneider <[email protected]>

The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.

Perforce and Git-LFS are installed and therefore available for the respective tests.

---
 .travis.yml | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 .travis.yml
.travis.yml new file +90 -0
new file mode 100644
index 0000000..1c3fa06
@@ -0,0 +1,90 @@
+language: c
+
+os:
+  - linux
+  - osx
+
+compiler:
+  - clang
+  - gcc
+
+addons:
+  apt:
+    packages:
+    - language-pack-is
+
+env:
+  global:
+    - P4_VERSION="15.4"
+    - GIT_LFS_VERSION="1.1.0"
+    - DEFAULT_TEST_TARGET=prove
+    - GIT_PROVE_OPTS="--timer --jobs 3"
+    - GIT_TEST_OPTS="--verbose --tee"
+    - CFLAGS="-g -O2 -Wall -Werror"
+    - GIT_TEST_CLONE_2GB=YesPlease
+    # t9810 occasionally fails on Travis CI OS X
+    # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
+    - GIT_SKIP_TESTS="t9810 t9816"
+
+before_install:
+  - >
+    case "${TRAVIS_OS_NAME:-linux}" in
+    linux)
+      mkdir --parents custom/p4
+      pushd custom/p4
+        wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4d
+        wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4
+        chmod u+x p4d
+        chmod u+x p4
+        export PATH="$(pwd):$PATH"
+      popd
+      mkdir --parents custom/git-lfs
+      pushd custom/git-lfs
+        wget --quiet https://github.com/github/git-lfs/releases/download/v$GIT_LFS_VERSION/git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz
+        tar --extract --gunzip --file "git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz"
+        cp git-lfs-$GIT_LFS_VERSION/git-lfs .
+        export PATH="$(pwd):$PATH"
+      popd
+      ;;
+    osx)
+      brew_force_set_latest_binary_hash () {
+        FORMULA=$1
+        SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
+        sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
+          /usr/local/Library/Taps/homebrew/homebrew-binary/$FORMULA.rb
+      }
+      brew update --quiet
+      brew tap homebrew/binary --quiet
+      brew_force_set_latest_binary_hash perforce
+      brew_force_set_latest_binary_hash perforce-server
+      brew install git-lfs perforce-server perforce
+      ;;
+    esac;
+    echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
+    p4d -V | grep Rev.;
+    echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
+    p4 -V | grep Rev.;
+    echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
+    git-lfs version;
+
+before_script: make --jobs=2
+
+script: make --quiet test
+
+after_failure:
+  - >
+    : '<-- Click here to see detailed test output!                                                        ';
+    for TEST_EXIT in t/test-results/*.exit;
+    do
+      if [ "$(cat "$TEST_EXIT")" != "0" ];
+      then
+        TEST_OUT="${TEST_EXIT%exit}out";
+        echo "------------------------------------------------------------------------";
+        echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
+        echo "------------------------------------------------------------------------";
+        cat "${TEST_OUT}";
+      fi;
+    done;
+
+notifications:
+  email: false
Signature · 1 line
2.5.1
#5 lore raw
Quoted 7 lines · On Mon, Nov 23, 2015 at 09:25:08AM +0100, [email protected] wrote:

From: Lars Schneider <[email protected]>

The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.

Perforce and Git-LFS are installed and therefore available for the respective tests.

Thanks, I find this one a little easier to digest.

I'm iffy on the NO_GETTEXT change from patch 1. I had hoped we could just build out of the box everywhere, but I think the "do we have libintl" decision is a hard one. Most people _do_ have it and want it, but it sounds like the Travis environment does not. So maybe it is a place where it is worth doing the tweak inside travis.yml and leaving the stock build alone.

-Peff

#6 lore raw
Quoted 13 lines · Jeff King
Quoted 7 lines · On Mon, Nov 23, 2015 at 09:25:08AM +0100, [email protected] wrote:

From: Lars Schneider <[email protected]>

The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.

Perforce and Git-LFS are installed and therefore available for the respective tests.

Quoted 8 lines

Thanks, I find this one a little easier to digest.

I'm iffy on the NO_GETTEXT change from patch 1. I had hoped we could just build out of the box everywhere, but I think the "do we have libintl" decision is a hard one. Most people _do_ have it and want it, but it sounds like the Travis environment does not. So maybe it is a place where it is worth doing the tweak inside travis.yml and leaving the stock build alone.

OK, I'll try to fix it in the next roll.

Thanks,
Lars