From 49c423fa99cc6f985c914eab3566638fecbf2d95 Mon Sep 17 00:00:00 2001
From: Marc Neudert <marc.neudert@gmail.com>
Date: Fri, 13 Oct 2017 09:59:57 +0200
Subject: [PATCH] Upgrade travis to trusty environment (#12087)

* switch to custom travis testing matrix

* bump submodules + .travis.yml

* use "dist: precise" for UITests
---
 .travis.yml       | 73 +++++++++++++++++++----------------------------
 plugins/LoginLdap |  2 +-
 tests/travis      |  2 +-
 3 files changed, 32 insertions(+), 45 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 050511a795..db5d01461c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,11 +11,6 @@
 
 language: php
 
-php:
-  - 5.6
-  - 5.5
-#  - hhvm
-
 services:
   - redis-server
 
@@ -31,21 +26,11 @@ addons:
       - realpath
       - lftp
 
+git:
+  lfs_skip_smudge: true
+
 # Separate different test suites
 env:
-  matrix:
-    # PDO Mysql
-    - TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
-    - TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
-    - TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
-    # Javascript tests
-    - TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
-    - TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
-    # All tests after another
-    - TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-first-half-only"
-    - TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-second-half-only"
-    - TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
-    - TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-second-half-only"
   global:
     - PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR
     - SKIP_INSTALL_MYSQL_56=1
@@ -54,39 +39,46 @@ env:
 
 matrix:
   fast_finish: true
-  exclude:
-    # Run test suites separately only on PHP 5.6 with PDO
-    - php: 5.5
+  include:
+    # PDO Mysql
+    - php: 5.6
       env: TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
-    - php: 5.5
+      sudo: required
+    - php: 5.6
       env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
-    - php: 5.5
+      sudo: required
+    - php: 5.6
       env: TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
-    # run UI tests on PHP 5.5 only
+      sudo: false
+    # Javascript tests
     - php: 5.6
-      env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
+      env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
+      sudo: false
+    - php: 5.6
+      env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
+      sudo: false
+    # All tests after another
     - php: 5.6
-      env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-second-half-only"
-    # run all tests not on PHP 5.6 and run MySQLI tests only on 5.6
-    - php: 5.5
       env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-first-half-only"
-    - php: 5.5
+      sudo: required
+    - php: 5.6
       env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-second-half-only"
-    # Javascript tests need to run only on one PHP version
+      sudo: required
     - php: 5.5
-      env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL
-    # AngularJS tests need to run only on one PHP version
+      env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
+      sudo: false
+      dist: precise
     - php: 5.5
-      env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
-
-dist: precise
+      env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-second-half-only"
+      sudo: false
+      dist: precise
 
-sudo: required
+dist: trusty
 
 script: $PIWIK_ROOT_DIR/tests/travis/travis.sh
 
 before_install:
-  - ./tests/travis/install_git_lfs.sh
+  - . ./tests/travis/install_git_lfs.sh
 
 install:
   - git fetch -q
@@ -112,12 +104,7 @@ before_script:
   - echo "opcache.enable=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 
   # make tmpfs and run MySQL on it for reasonnable performance
-  - sudo mkdir /mnt/ramdisk
-  - sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
-  - sudo stop mysql
-  - sudo mv /var/lib/mysql /mnt/ramdisk
-  - sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
-  - sudo start mysql
+  - ./tests/travis/setup_mysql_tmpfs.sh
 
   # print out mysql information
   - mysql --version
diff --git a/plugins/LoginLdap b/plugins/LoginLdap
index 249b8c5469..7371b482f2 160000
--- a/plugins/LoginLdap
+++ b/plugins/LoginLdap
@@ -1 +1 @@
-Subproject commit 249b8c546979a4484b3eeda5b076b9df1b811c9f
+Subproject commit 7371b482f223d52b54a8d195519f027b47d19c72
diff --git a/tests/travis b/tests/travis
index 14de20c971..b33e6c6005 160000
--- a/tests/travis
+++ b/tests/travis
@@ -1 +1 @@
-Subproject commit 14de20c971216ac469e79de374d5bde2d28da2c5
+Subproject commit b33e6c6005f5dba55cca170a3c4faba361e33ee3
-- 
GitLab