From f031d418e37a938b26bd1004e7408e2f840f067b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Sun, 25 Aug 2019 10:22:11 +0200 Subject: [PATCH] feat(CI/Travis): use Ubuntu 18.04 + update min clang version (#2232) --- .travis.yml | 3 +-- apps/ci/ci-before_install.sh | 9 ++------- apps/ci/ci-install.sh | 4 ++-- src/common/Cryptography/OpenSSLCrypto.cpp | 4 ++++ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5fb29910e..940ca5116 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ sudo: required -dist: xenial # (16.04) -# bionic (18.04) is not yet available in travis +dist: bionic # (18.04) language: cpp diff --git a/apps/ci/ci-before_install.sh b/apps/ci/ci-before_install.sh index 8f5342c02..6874f95f0 100755 --- a/apps/ci/ci-before_install.sh +++ b/apps/ci/ci-before_install.sh @@ -4,8 +4,8 @@ set -e if [ "$TRAVIS_BUILD_ID" = "1" ] then - export CCOMPILERC="clang-3.8" - export CCOMPILERCXX="clang++-3.8" + export CCOMPILERC="clang-6.0" + export CCOMPILERCXX="clang++-6.0" echo "set root password" export DB_RND_NAME=$(cat /dev/urandom | tr -dc 'a-z' | fold -w 5 | head -n 1) @@ -18,9 +18,4 @@ elif [ "$TRAVIS_BUILD_ID" = "2" ] then export CCOMPILERC="clang-7" export CCOMPILERCXX="clang++-7" - - echo "add custom APT repository llvm-toolchain-xenial-7" - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" | sudo tee -a /etc/apt/sources.list - sudo apt-get update -qq fi diff --git a/apps/ci/ci-install.sh b/apps/ci/ci-install.sh index fe40322b6..5f5c82a76 100755 --- a/apps/ci/ci-install.sh +++ b/apps/ci/ci-install.sh @@ -7,8 +7,8 @@ bash ./acore.sh "install-deps" if [ "$TRAVIS_BUILD_ID" = "1" ] then - echo "install clang-3.8" - sudo apt-get install clang-3.8 + echo "install clang-6.0" + sudo apt-get install clang-6.0 elif [ "$TRAVIS_BUILD_ID" = "2" ] then echo "install clang-7" diff --git a/src/common/Cryptography/OpenSSLCrypto.cpp b/src/common/Cryptography/OpenSSLCrypto.cpp index c46fa60ad..97545ceb6 100644 --- a/src/common/Cryptography/OpenSSLCrypto.cpp +++ b/src/common/Cryptography/OpenSSLCrypto.cpp @@ -22,6 +22,7 @@ static void lockingCallback(int mode, int type, const char* /*file*/, int /*line static void threadIdCallback(CRYPTO_THREADID * id) { + (void)id; /// ACE_thread_t turns out to be a struct under Mac OS. #ifndef __APPLE__ CRYPTO_THREADID_set_numeric(id, ACE_Thread::self()); @@ -37,7 +38,10 @@ void OpenSSLCrypto::threadsSetup() { cryptoLocks[i] = new ACE_Thread_Mutex(); } + (void)&threadIdCallback; CRYPTO_THREADID_set_callback(threadIdCallback); + + (void)&lockingCallback; CRYPTO_set_locking_callback(lockingCallback); }