Quellcode durchsuchen

Cleanup travis matrix

Stefan Profanter vor 6 Jahren
Ursprung
Commit
0e86b21f0e
3 geänderte Dateien mit 71 neuen und 85 gelöschten Zeilen
  1. 24 28
      .travis.yml
  2. 7 12
      tools/travis/travis_osx_before_install.sh
  3. 40 45
      tools/travis/travis_osx_script.sh

+ 24 - 28
.travis.yml

@@ -1,15 +1,6 @@
 language: c
 
-compiler:
-- gcc
-- clang
-
-os:
-- linux
-- osx
-
 # use new build environment (docker)
-dist: trusty
 sudo: required
 
 env:
@@ -18,34 +9,38 @@ env:
     - secure: nSunY54Wp5HkQCHHbKwlwpbaKyqRVIu/0EnhaoJSwhM1wqerQV/E5d/2JelO9/tZgbungAO7wk/fjutRMVc7d378RTIPwS8vHpvZfEoGhCFsLoTOlqESzsZFBup2H5t1lpQ23jRHDOxlLdJy2lz5U+zd1YnYgDXqdDFjegsIYdo=
     # COVERITY_SCAN_TOKEN:
     - secure: C7LLWmOCdRYJGiXjFYDHWwBB6XGjs9Hio4kkvDehLRredRgp1UJ73g6Av9L7xrTUide6GiPrSd+RJw7py/twx5qaeIjOWPy+XvtmabDEQBquLjEkvS+LP2EycaMe92kHMo1ItFfRomgj1FyNYPVnUFgdyedGWv+p553ziDbrMas=
-  matrix:
-    # Do both, compile with static code analysis and without
-    - ANALYZE=false
-    - ANALYZE=true
-    - DOCKER=true
-    - FUZZER=true
+
+
+dist: trusty
 
 matrix:
-  exclude:
-  # This excludes OSX GCC builds.
-    - os: osx
+  fast_finish: true
+  include:
+    - os: linux
+      compiler: gcc
+      env: ANALYZE=false
+    - os: linux
       compiler: gcc
-    - os: osx
       env: ANALYZE=true
-    - os: osx
+    - os: linux
+      compiler: gcc
       env: DOCKER=true
-    - os: osx
-      env: FUZZER=true
+      services:
+        - docker
     - os: linux
       compiler: clang
-      env: DOCKER=true
+      env: ANALYZE=false
     - os: linux
-      compiler: gcc
+      compiler: clang
+      env: ANALYZE=true
+    - os: linux
+      compiler: clang
       env: FUZZER=true
-
-# Required for docker build test
-services:
-  - docker
+    - os: osx
+      compiler: clang
+      cache:
+        directories:
+          - $HOME/Library/Caches/Homebrew
 
 addons:
   apt:
@@ -86,6 +81,7 @@ cache:
   apt: true
   directories:
     - $HOME/install
+    - $HOME/.cache/pip
 
 # combine all the commands into one single command. See https://github.com/travis-ci/travis-ci/issues/1066
 before_install: |

+ 7 - 12
tools/travis/travis_osx_before_install.sh

@@ -1,16 +1,11 @@
 #!/bin/bash
 set -ev
 
-if [ $ANALYZE = "true" ]; then
-    echo "Skipping static analysis for OS X"
-    exit 0
-else
-    brew install check
-    brew install userspace-rcu
-    brew install valgrind
-    brew install graphviz
+brew install check
+brew install userspace-rcu
+brew install valgrind
+brew install graphviz
 
-    pip install --user sphinx
-    pip install --user breathe
-    pip install --user sphinx_rtd_theme
-fi
+pip install --user sphinx
+pip install --user breathe
+pip install --user sphinx_rtd_theme

+ 40 - 45
tools/travis/travis_osx_script.sh

@@ -1,54 +1,49 @@
 #!/bin/bash
 set -ev
 
-if [ $ANALYZE = "true" ]; then
-    echo "\n=== Skipping static analysis on OS X ==="
-    exit 0
-else
-    echo "\n=== Building ==="
-    export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
-    export PATH="/Users/travis/Library/Python/2.7/bin:$PATH"
+echo "\n=== Building ==="
+export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
+export PATH="/Users/travis/Library/Python/2.7/bin:$PATH"
 
 
-    echo "Documentation and certificate build"  && echo -en 'travis_fold:start:script.build.doc\\r'
-    mkdir -p build && cd build
-    cmake -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE=ON ..
-    make selfsigned
-    ls examples
-    cp examples/server_cert.der ../
-    cd .. && rm -rf build
-    echo -en 'travis_fold:end:script.build.doc\\r'
+echo "Documentation and certificate build"  && echo -en 'travis_fold:start:script.build.doc\\r'
+mkdir -p build && cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DUA_BUILD_EXAMPLES=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE=ON ..
+make selfsigned
+ls examples
+cp examples/server_cert.der ../
+cd .. && rm -rf build
+echo -en 'travis_fold:end:script.build.doc\\r'
 
-    echo "Full Namespace 0 Generation"  && echo -en 'travis_fold:start:script.build.ns0\\r'
-    mkdir -p build
-    cd build
-    cmake -DCMAKE_BUILD_TYPE=Debug -DUA_ENABLE_GENERATE_NAMESPACE0=On -DUA_BUILD_EXAMPLES=ON  ..
-    make -j
-    cd .. && rm -rf build
-    echo -en 'travis_fold:end:script.build.ns0\\r'
+echo "Full Namespace 0 Generation"  && echo -en 'travis_fold:start:script.build.ns0\\r'
+mkdir -p build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Debug -DUA_ENABLE_GENERATE_NAMESPACE0=On -DUA_BUILD_EXAMPLES=ON  ..
+make -j
+cd .. && rm -rf build
+echo -en 'travis_fold:end:script.build.ns0\\r'
 
-    echo "Compile release build for OS X" && echo -en 'travis_fold:start:script.build.osx\\r'
-    mkdir -p build && cd build
-	cmake -DCMAKE_BUILD_TYPE=Release -DUA_ENABLE_AMALGAMATION=ON -DUA_BUILD_EXAMPLES=ON ..
-    make -j
-    tar -pczf open62541-osx.tar.gz ../LICENSE ../AUTHORS ../README.md ./bin/examples/server ./bin/examples/client ./bin/libopen62541.a open62541.h open62541.c
-    cp open62541-osx.tar.gz ..
-    cp open62541.h .. #copy single file-release
-    cp open62541.c .. #copy single file-release
-    cd .. && rm -rf build
-	echo -en 'travis_fold:end:script.build.osx\\r'
+echo "Compile release build for OS X" && echo -en 'travis_fold:start:script.build.osx\\r'
+mkdir -p build && cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DUA_ENABLE_AMALGAMATION=ON -DUA_BUILD_EXAMPLES=ON ..
+make -j
+tar -pczf open62541-osx.tar.gz ../LICENSE ../AUTHORS ../README.md ./bin/examples/server ./bin/examples/client ./bin/libopen62541.a open62541.h open62541.c
+cp open62541-osx.tar.gz ..
+cp open62541.h .. #copy single file-release
+cp open62541.c .. #copy single file-release
+cd .. && rm -rf build
+echo -en 'travis_fold:end:script.build.osx\\r'
 
-    echo "Compile multithreaded version" && echo -en 'travis_fold:start:script.build.multithread\\r'
-    mkdir -p build && cd build
-    cmake -DUA_ENABLE_MULTITHREADING=ON -DUA_BUILD_EXAMPLES=ON ..
-    make -j
-    cd .. && rm -rf build
-	echo -en 'travis_fold:end:script.build.multithread\\r'
+echo "Compile multithreaded version" && echo -en 'travis_fold:start:script.build.multithread\\r'
+mkdir -p build && cd build
+cmake -DUA_ENABLE_MULTITHREADING=ON -DUA_BUILD_EXAMPLES=ON ..
+make -j
+cd .. && rm -rf build
+echo -en 'travis_fold:end:script.build.multithread\\r'
 
-    echo "Debug build and unit tests with valgrind" && echo -en 'travis_fold:start:script.build.unit_test\\r'
-    mkdir -p build && cd build
-    cmake -DCMAKE_BUILD_TYPE=Debug -DUA_BUILD_EXAMPLES=ON -DUA_ENABLE_DISCOVERY=ON -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_BUILD_UNIT_TESTS=ON -DUA_ENABLE_COVERAGE=ON -DUA_ENABLE_VALGRIND_UNIT_TESTS=ON ..
-    make -j && make test ARGS="-V"
-    cd .. && rm -rf build
-	echo -en 'travis_fold:end:script.build.unit_test\\r'
-fi
+echo "Debug build and unit tests with valgrind" && echo -en 'travis_fold:start:script.build.unit_test\\r'
+mkdir -p build && cd build
+cmake -DCMAKE_BUILD_TYPE=Debug -DUA_BUILD_EXAMPLES=ON -DUA_ENABLE_DISCOVERY=ON -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_BUILD_UNIT_TESTS=ON -DUA_ENABLE_COVERAGE=ON -DUA_ENABLE_VALGRIND_UNIT_TESTS=ON ..
+make -j && make test ARGS="-V"
+cd .. && rm -rf build
+echo -en 'travis_fold:end:script.build.unit_test\\r'