diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-27 12:31:32 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-08 19:30:25 +0100 |
commit | cebffc24a5965d89d5170699a628d7b55d62bc37 (patch) | |
tree | fddda4c0833ddb2f77eff83e45d337b449a91ffe | |
parent | 1570b727c8b9b096e746dba106a3beda58ac00bf (diff) | |
download | libgit2-cebffc24a5965d89d5170699a628d7b55d62bc37.tar.gz |
ci: move travis to the new scripts
-rw-r--r-- | .travis.yml | 22 | ||||
-rw-r--r-- | .vsts-ci.yml | 2 | ||||
-rwxr-xr-x | ci/coverity.sh (renamed from script/coverity.sh) | 5 | ||||
-rwxr-xr-x | ci/setup-linux.sh | 23 | ||||
-rwxr-xr-x | ci/setup-osx.sh (renamed from ci/setup-macos.sh) | 0 |
5 files changed, 35 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml index 3a55e86b0..31a282cf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,12 @@ env: global: - secure: "YnhS+8n6B+uoyaYfaJ3Lei7cSJqHDPiKJCKFIF2c87YDfmCvAJke8QtE7IzjYDs7UFkTCM4ox+ph2bERUrxZbSCyEkHdjIZpKuMJfYWja/jgMqTMxdyOH9y8JLFbZsSXDIXDwqBlC6vVyl1fP90M35wuWcNTs6tctfVWVofEFbs=" - GITTEST_INVASIVE_FS_SIZE=1 + - MBEDTLS_DIR=/tmp/mbedtls + - SKIP_APT=1 + - SKIP_MBEDTLS_INSTALL=1 matrix: - - OPTIONS="-DTHREADSAFE=ON -DENABLE_TRACE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON" - - OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DENABLE_WERROR=ON" + - CMAKE_OPTIONS="-DTHREADSAFE=ON -DENABLE_TRACE=ON -DCMAKE_BUILD_TYPE=Release" + - CMAKE_OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON" dist: trusty osx_image: xcode8.3 @@ -52,23 +55,22 @@ matrix: dist: trusty - compiler: gcc env: - - VALGRIND=1 - OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DDEBUG_POOL=ON -DCMAKE_BUILD_TYPE=Debug" + - LEAK_CHECK=valgrind + CMAKE_OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DDEBUG_POOL=ON -DCMAKE_BUILD_TYPE=Debug" os: linux dist: trusty allow_failures: - env: COVERITY=1 install: - - if [ -f ./script/install-deps-${TRAVIS_OS_NAME}.sh ]; then ./script/install-deps-${TRAVIS_OS_NAME}.sh; fi + - if [ -f ./ci/setup-${TRAVIS_OS_NAME}.sh ]; then ./ci/setup-${TRAVIS_OS_NAME}.sh; fi # Run the Build script and tests script: - - script/cibuild.sh - -# Run Tests -after_success: - - if [ "$TRAVIS_OS_NAME" = "linux" -a -n "$VALGRIND" ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=./libgit2_clar.supp _build/libgit2_clar -ionline; fi + - mkdir build + - cd build + - if [ "$COVERITY" ]; then ../ci/coverity.sh; fi + - if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi # Only watch the development and master branches branches: diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 633390654..4879aeab8 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -69,7 +69,7 @@ phases: queue: name: 'Hosted macOS Preview' steps: - - bash: . '$(Build.SourcesDirectory)/ci/setup-macos.sh' + - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh' displayName: Setup - bash: . '$(Build.SourcesDirectory)/ci/build.sh' displayName: Build diff --git a/script/coverity.sh b/ci/coverity.sh index 5fe16c031..57f411174 100755 --- a/script/coverity.sh +++ b/ci/coverity.sh @@ -32,14 +32,11 @@ if [ ! -d "$TOOL_BASE" ]; then ln -s "$TOOL_DIR" "$TOOL_BASE"/cov-analysis fi -cp script/user_nodefs.h "$TOOL_BASE"/cov-analysis/config/user_nodefs.h +cp ../script/user_nodefs.h "$TOOL_BASE"/cov-analysis/config/user_nodefs.h COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build" # Configure and build -rm -rf _build -mkdir _build -cd _build cmake .. -DTHREADSAFE=ON COVERITY_UNSUPPORTED=1 \ $COV_BUILD --dir cov-int \ diff --git a/ci/setup-linux.sh b/ci/setup-linux.sh index 03e4a1d2f..c5ecb550b 100755 --- a/ci/setup-linux.sh +++ b/ci/setup-linux.sh @@ -1,8 +1,27 @@ #!/bin/sh +set -e set -x -apt-get update -apt-get -y install build-essential pkg-config clang cmake openssl libssl-dev libssh2-1-dev libcurl4-gnutls-dev openssh-server +TMPDIR=${TMPDIR:-/tmp} + +if [ -z "$SKIP_APT" ]; then + apt-get update + apt-get -y install build-essential pkg-config clang cmake openssl libssl-dev libssh2-1-dev libcurl4-gnutls-dev openssh-server +fi mkdir -p /var/run/sshd + +if [ "$MBEDTLS" ]; then + MBEDTLS_DIR=${MBEDTLS_DIR:-$(mktemp -d ${TMPDIR}/mbedtls.XXXXXXXX)} + + git clone --depth 10 --single-branch --branch mbedtls-2.6.1 https://github.com/ARMmbed/mbedtls.git ${MBEDTLS_DIR} + cd ${MBEDTLS_DIR} + + CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . + cmake --build . + + if [ -z "$SKIP_MBEDTLS_INSTALL" ]; then + make install + fi +fi diff --git a/ci/setup-macos.sh b/ci/setup-osx.sh index 564910e41..564910e41 100755 --- a/ci/setup-macos.sh +++ b/ci/setup-osx.sh |