From 82f9d834ad772b2f16b6524f679d14d8a7afe881 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <gcontini@users.noreply.github.com> Date: 周二, 10 9月 2019 23:29:10 +0800 Subject: [PATCH] fix issue #37 tests in windows --- .travis.yml | 107 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 97 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a68e748..1b67b9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,100 @@ language: cpp +services: docker -branches: - only: - - master +matrix: + include: + - os: linux + dist: bionic + name: "Ubuntu 18.04 - Travis CI VM" + addons: + apt: + packages: + - cmake + - valgrind + - libssl-dev + - zlib1g-dev + - libboost-dev + - libboost-test-dev + - libboost-filesystem-dev + - libboost-iostreams-dev + - libboost-program-options-dev + - libboost-system-dev + - libboost-thread-dev + - libboost-date-time-dev + - os: linux + dist: xenial + name: "Ubuntu 16.04 - Travis CI VM" + addons: + apt: + packages: + - cmake + - valgrind + - libssl-dev + - zlib1g-dev + - libboost-dev + - libboost-test-dev + - libboost-filesystem-dev + - libboost-iostreams-dev + - libboost-program-options-dev + - libboost-system-dev + - libboost-thread-dev + - libboost-date-time-dev -before_install: - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - sudo apt-get update -qq - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - -script: - - cd build/linux && cmake ../.. \ No newline at end of file + - os: linux + dist: bionic + name: "CentOS-7 Docker" + before_script: + - docker run --name centos7_toconfigure -v `pwd`:/root/open-license-manager centos:centos7 /bin/bash -c + "yum -y update && yum -y install cmake boost boost-devel boost-static openssl openssl-devel gcc-c++ valgrind valgrind-devel glibc-static centos-release-scl-rh && + yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ && cd /root/open-license-manager && mkdir build && cd build && + CC=/opt/rh/devtoolset-3/root/usr/bin/gcc XX=/opt/rh/devtoolset-3/root/usr/bin/g++ cmake .." + - docker commit centos7_toconfigure centos7_configured + script: + - docker run --name centos7_make -v `pwd`:/root/open-license-manager centos7_configured /bin/bash -c + "cd /root/open-license-manager/build && make && make install && VIRT_ENV=CONTAINER make test" + + - os: windows + name: "Widnows server 1803 - Visual Studio 15 2017 Win64 - (/MD)" + env: + - CACHE_NAME=boost + cache: + directories: + - "/C/local/boost" + before_script: + - sc stop CryptSvc + - travis_wait 30 ./windows_download_boost.bat + - cd "/C/Users/travis/build/open-license-manager/open-license-manager" + - mkdir build + - cd build && cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:/local/boost" .. + script: + - cmake --build . --target install --config Release + - ctest -C Release + + - os: windows + name: "Widnows server 1803 - Visual Studio 15 2017 Win64 - (/MT)" + env: + - CACHE_NAME=boost + cache: + directories: + - "/C/local/boost" + before_script: + #- Regsvr32.exe "C:\Widnows\System32\rsaenh.dll" + - travis_wait 30 ./windows_download_boost.bat + - cd "/C/Users/travis/build/open-license-manager/open-license-manager" + - mkdir build + - cd build && cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:/local/boost" -DSTATIC_RUNTIME=1 .. + script: + - cmake --build . --target install --config Release + - ctest -C Release + +env: + - CTEST_OUTPUT_ON_FAILURE=1 +before_script: + - mkdir build + - cd build && cmake -DCMAKE_INSTALL_PREFIX=../../install .. + +script: + - make + - make install + - make test + -- Gitblit v1.9.1