]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Speed up Travis builds.
authorPeter Powell <petpow@saberuk.com>
Tue, 13 Sep 2016 01:56:14 +0000 (02:56 +0100)
committerPeter Powell <petpow@saberuk.com>
Thu, 15 Sep 2016 01:21:53 +0000 (02:21 +0100)
- Switch Linux builds to Ubuntu 14.04 from 12.04.
- Split dynamic and static builds into different jobs.
- Remove OS X builds as the infrastructure is slow and unreliable.

.travis.yml
tools/test-build
tools/travis-ci.sh

index 6318025264161fb6087d974fd0b5b75a49a4587f..f5c1fff540ae41ce3def149ad2ddb03092fc8d0a 100644 (file)
@@ -1,12 +1,13 @@
 compiler:
-  - "clang"
-  - "gcc"
-language: "cpp"
+  - clang
+  - gcc
+dist: trusty
+env:
+  - TEST_BUILD_DYNAMIC=1
+  - TEST_BUILD_STATIC=1
+language: cpp
 notifications:
   email: false
-os:
-  - "linux"
-  - "osx"
 script:
-  - "sh ./tools/travis-ci.sh"
+  - sh ./tools/travis-ci.sh
 sudo: required
index 629e537c4917dcad43beaec921f34241dc3e7f0e..17c98042bc3a933873e859a65bcc66d2dab6b533 100755 (executable)
@@ -56,15 +56,19 @@ foreach my $compiler (@compilers) {
                        say "Failed to configure using the $compiler compiler and the $socketengine socket engine!";
                        exit 1;
                }
-               $ENV{INSPIRCD_STATIC} = 1;
-               if (system 'make', '-j'.get_cpu_count, 'install') {
-                       say "Failed to compile with static modules using the $compiler compiler and the $socketengine socket engine!";
-                       exit 1;
+               if (!defined $ENV{TEST_BUILD_DYNAMIC}) {
+                       $ENV{INSPIRCD_STATIC} = 1;
+                       if (system 'make', '-j'.get_cpu_count, 'install') {
+                               say "Failed to compile with static modules using the $compiler compiler and the $socketengine socket engine!";
+                               exit 1;
+                       }
                }
-               delete $ENV{INSPIRCD_STATIC};
-               if (system 'make', '-j'.get_cpu_count, 'install') {
-                       say "Failed to compile with dynamic modules using the $compiler compiler and the $socketengine socket engine!";
-                       exit 1;
+               if (!defined $ENV{TEST_BUILD_STATIC}) {
+                       delete $ENV{INSPIRCD_STATIC};
+                       if (system 'make', '-j'.get_cpu_count, 'install') {
+                               say "Failed to compile with dynamic modules using the $compiler compiler and the $socketengine socket engine!";
+                               exit 1;
+                       }
                }
                say "Building using the $compiler compiler and the $socketengine socket engine succeeded!";
        }
index 521d91e38df4ba70396b6436f9e88c85f11530bc..bb32e19a1b5cb19cbd8adf725e17e4b23a265997 100755 (executable)
@@ -1,18 +1,12 @@
 #!/bin/bash
-set -v
+set -ev
 if [ "$TRAVIS_OS_NAME" = "linux" ]
 then
        sudo apt-get update --assume-yes
        sudo apt-get install --assume-yes libgeoip-dev libgnutls-dev libldap2-dev libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev libssl-dev libtre-dev
-elif [ "$TRAVIS_OS_NAME" = "osx" ]
-then
-       brew update
-       brew install geoip gnutls mysql-connector-c openssl pcre postgresql sqlite3 tre
-       brew link sqlite3 --force
 else
        >&2 echo "'$TRAVIS_OS_NAME' is an unknown Travis CI environment!"
        exit 1
 fi
-set -e
 export TEST_BUILD_MODULES="m_geoip.cpp,m_ldap.cpp,m_mysql.cpp,m_pgsql.cpp,m_regex_pcre.cpp,m_regex_posix.cpp,m_regex_tre.cpp,m_sqlite3.cpp,m_ssl_gnutls.cpp,m_ssl_openssl.cpp"
 ./tools/test-build $CXX