From 2750720384c60a4e545cfcd8ae3264c27c2d59d5 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Wed, 23 May 2018 01:31:14 +0500 Subject: [PATCH] refactor travis-ci: osx does not come with gcc, actually it is clang. so, remove it. move debhelper installation to "apt" plugin (it will affect only linux). add otool (which is ldd equivalent) on osx. split "before_install", "script" into matrix --- .ci/before_install.sh | 12 ------------ .ci/script.sh | 17 ----------------- .travis.yml | 22 ++++++++++++++++++---- 3 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 .ci/before_install.sh delete mode 100644 .ci/script.sh diff --git a/.ci/before_install.sh b/.ci/before_install.sh deleted file mode 100644 index 0330bdbc..00000000 --- a/.ci/before_install.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eux - -if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - sudo apt-get update - sudo apt-get -y install debhelper - bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1) -elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - brew update && brew upgrade openssl -else - exit 1 -fi diff --git a/.ci/script.sh b/.ci/script.sh deleted file mode 100644 index bee5e348..00000000 --- a/.ci/script.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -eux - -if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}" - export CFLAGS="-I${HOME}/opt/include" - export LDFLAGS="-L${HOME}/opt/lib" - ./configure - make -C tmp - ldd bin/vpnserver/vpnserver - dh build-arch -elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - ./configure - make -C tmp -else - exit 1 -fi diff --git a/.travis.yml b/.travis.yml index d4fc41fd..5bacdfb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,10 +20,18 @@ matrix: - env: OPENSSL_VERSION="1.1.0f" os: linux compiler: clang - - os: osx - compiler: gcc - os: osx compiler: clang + before_install: + - brew update && brew upgrade openssl + script: + - ./configure + - make -C tmp + - otool -L bin/vpnserver/vpnserver + +addons: + apt: + packages: [ debhelper ] cache: directories: @@ -31,7 +39,13 @@ cache: - ${HOME}/opt before_install: - - bash .ci/before_install.sh + - bash .ci/build-openssl.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1) script: - - bash .ci/script.sh + - export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}" + - export CFLAGS="-I${HOME}/opt/include" + - export LDFLAGS="-L${HOME}/opt/lib" + - ./configure + - make -C tmp + - ldd bin/vpnserver/vpnserver + - dh build-arch