]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1869387, r1869441, r1869456, r1869459, r1869527, r1869533, r1869539, r1869540...
authorJoe Orton <jorton@apache.org>
Fri, 8 Nov 2019 12:50:16 +0000 (12:50 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 8 Nov 2019 12:50:16 +0000 (12:50 +0000)
Add a basic Travis config.

Pull in more -dev packages to get more modules building (including mod_md).
Test gcc 7 on bionic, xenial is the Travis default anyway.
Only add the toolchain PPA where really needed.

Update travis config

* Add 'if TRAVIS_OS_NAME' to before_install/before_script/script to allow multi-os testing.
* Add separation lines in matrix config (better visual impact).
* Add Linux to all the current job's name.
* Add tests for Worker mpm.

Move before/run scripts out of .travis.yml.

Reviewed by: elukey

Support 2.4.x builds, which lacks --with-test-suite support.
Build with --enable-load-all-modules only when the test suite is run.

Add Travis support for multiple APR/APR-util versions.
Add an APR build with --enable-pool-debug.

Build all modules when testing APR variations.

Build APR-util 1.6.x --with-crypto otherwise the "mod_crypto" build fails,
though this is a bug: https://travis-ci.org/apache/httpd/jobs/609166867

Add APR 1.4/APR-util 1.4 build, but only for 2.4.x.

Start sketching out some travis docs and check we can -> [skip ci]

Submitted by: jorton, elukey

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1869554 13f79535-47bb-0310-9956-ffa450edef68

.travis.yml [new file with mode: 0644]
test/README.travis [new file with mode: 0644]
test/travis_before_linux.sh [new file with mode: 0755]
test/travis_run_linux.sh [new file with mode: 0755]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..297d89e
--- /dev/null
@@ -0,0 +1,97 @@
+language: c
+os:
+  - linux
+cache:
+  directories:
+    - /home/travis/perl5
+    - /home/travis/root
+addons:
+  apt:
+    packages:
+      - libtool-bin
+      - libapr1-dev
+      - libaprutil1-dev
+      - perl-doc
+      - lua5.3-dev
+      - libbrotli-dev
+      - libcurl4-openssl-dev
+      - libsystemd-dev
+      - libnghttp2-dev
+      - libjansson-dev
+
+matrix:
+  include:
+    - name: Linux Ubuntu, Default module set
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, Default, all-modules
+      env: CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, Prefork MPM, all-modules
+      env: CONFIG="--enable-mods-shared=reallyall --with-mpm=prefork"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, Worker MPM, all-modules
+      env: CONFIG="--enable-mods-shared=reallyall --with-mpm=worker"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu Bionic, all-modules
+      os: linux
+      dist: bionic
+      env: CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu Bionic, GCC 7 maintainer-mode w/-Werror
+      os: linux
+      dist: bionic
+      env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7"
+           SKIP_TESTING=1
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, GCC 8 maintainer-mode w/-Werror
+      env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-8"
+           SKIP_TESTING=1
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - gcc-8
+            - libtool-bin
+            - libapr1-dev
+            - libaprutil1-dev
+            - perl-doc
+            - lua5.3-dev
+            - libbrotli-dev
+            - libcurl4-openssl-dev
+            - libsystemd-dev
+            - libnghttp2-dev
+            - libjansson-dev
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, APR 1.7.0, APR-util 1.6.1
+      env: APR_VERSION=1.7.0 APU_VERSION=1.6.1
+           CONFIG="--enable-mods-shared=reallyall"
+           APU_CONFIG="--with-crypto"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, APR 1.7.0 --enable-pool-debug, APR-util 1.6.1
+      env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug"
+           APU_VERSION=1.6.1
+           APU_CONFIG="--with-crypto"
+           CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, APR 1.5.1, APR-util 1.5.4
+      env: APR_VERSION=1.5.1 APU_VERSION=1.5.4
+           CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+    - if: branch = 2.4.x
+      name: Linux Ubuntu, APR 1.4.8, APR-util 1.4.2
+      env: APR_VERSION=1.4.8 APU_VERSION=1.4.2
+           CONFIG="--enable-mods-shared=reallyall"
+    # -------------------------------------------------------------------------
+
+before_install:
+  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
+        cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib);
+        cpanm --notest Net::SSL LWP::Protocol::https ExtUtils::Embed Test::More AnyEvent DateTime HTTP::DAV Protocol::HTTP2::Client FCGI;
+    fi
+
+before_script:
+  - ./test/travis_before_${TRAVIS_OS_NAME}.sh
+
+script:
+  - ./test/travis_run_${TRAVIS_OS_NAME}.sh
diff --git a/test/README.travis b/test/README.travis
new file mode 100644 (file)
index 0000000..1255c5a
--- /dev/null
@@ -0,0 +1,32 @@
+
+Variables
+---------
+
+The Travis scripts use the following environment variables:
+
+* APR_VERSION - if set, APR of this version is built and installed
+  in $HOME/root/apr-$APR_VERSION (trunk means trunk is used)
+
+* APR_CONFIG - arguments to pass when running APR's configure script
+  if APR_VERSION is set
+
+* APU_VERSION - if set, APR-util of this version is built and
+  installed in $HOME/root/apu-$APU_VERSION (trunk means trunk is used)
+
+* APU_CONFIG - arguments to pass when running APR-util's configure
+  script if APU_VERSION is set
+
+* CONFIG - arguments to pass to httpd's configure script.
+
+* SKIP_TESTING - if set, the Perl test framework is not run for the
+  build.
+
+Caching
+-------
+
+Perl modules installed in $HOME/perl5 are cached.
+
+Anything installed into the $HOME/root directory is cached - notably,
+versions of APR/APR-util are installed here and cached across httpd
+build jobs without needing to be rebuilt every time.
+
diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh
new file mode 100755 (executable)
index 0000000..6f076a2
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash -ex
+if ! test -v SKIP_TESTING; then
+   svn export -q https://svn.apache.org/repos/asf/httpd/test/framework/trunk test/perl-framework
+fi
+if test -v APR_VERSION; then
+    if ! test -d $HOME/root/apr-${APR_VERSION}; then
+        case $APR_VERSION in
+            trunk) url=https://svn.apache.org/repos/asf/apr/apr/trunk ;;
+            *) url=https://svn.apache.org/repos/asf/apr/apr/tags/${APR_VERSION} ;;
+        esac
+        svn export -q ${url} $HOME/build/apr-${APR_VERSION}
+        pushd $HOME/build/apr-${APR_VERSION}
+        if [ $APR_VERSION = 1.4.1 ]; then
+            # 1.4.1 doesn't build with current libtool
+            svn cat https://svn.apache.org/repos/asf/apr/apr/tags/1.5.1/buildconf > buildconf
+        fi
+        ./buildconf
+        ./configure ${APR_CONFIG} --prefix=$HOME/root/apr-${APR_VERSION}
+        make -j2
+        make install
+        popd
+        APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
+    fi
+fi
+if test -v APU_VERSION; then
+    if ! test -d $HOME/root/apu-${APU_VERSION}; then
+        case $APU_VERSION in
+            trunk) url=https://svn.apache.org/repos/asf/apr/apr-util/trunk ;;
+            *) url=https://svn.apache.org/repos/asf/apr/apr-util/tags/${APU_VERSION} ;;
+        esac
+        svn export -q ${url} $HOME/build/apu-${APU_VERSION}
+        pushd $HOME/build/apu-${APU_VERSION}
+        ./buildconf --with-apr=$HOME/build/apr-${APR_VERSION}
+        ./configure ${APU_CONFIG} --prefix=$HOME/root/apu-${APU_VERSION}
+        make -j2
+        make install
+        popd
+    fi
+fi
diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh
new file mode 100755 (executable)
index 0000000..33ffbbd
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash -ex
+./buildconf --with-apr=/usr/bin/apr-1-config
+# For trunk, "make check" is sufficient to run the test suite.
+# For 2.4.x, the test suite must be run manually
+if test ! -v SKIP_TESTING; then
+    CONFIG="$CONFIG --enable-load-all-modules"
+    if grep -q ^check: Makefile.in; then
+        CONFIG="--with-test-suite=test/perl-framework $CONFIG"
+        WITH_TEST_SUITE=1
+    else
+        CONFIG="--prefix=$HOME/build/httpd-root $CONFIG"
+    fi
+fi
+if test -v APR_VERSION; then
+    CONFIG="$CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
+else
+    CONFIG="$CONFIG --with-apr=/usr"
+fi
+if test -v APU_VERSION; then
+    CONFIG="$CONFIG --with-apr-util=$HOME/root/apu-${APU_VERSION}"
+else
+    CONFIG="$CONFIG --with-apr-util=/usr"
+fi
+./configure $CONFIG
+make $MAKEFLAGS -j2
+if ! test -v SKIP_TESTING; then
+    if test -v WITH_TEST_SUITE; then
+        make check
+    else
+        make install
+        cd test/perl-framework
+        perl Makefile.PL -apxs $HOME/build/httpd-root/bin/apxs
+        make test
+    fi
+fi