Add travis ci configuration file

This commit is contained in:
Michael Tsukerman 2019-09-08 15:42:46 +02:00 committed by Howard Hinnant
parent c56f915cc3
commit fe491eff1c
3 changed files with 73 additions and 0 deletions

66
.travis.yml Normal file
View File

@ -0,0 +1,66 @@
language: cpp
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
- os: linux
dist: bionic
addons:
apt:
sources:
- llvm-toolchain-trusty-6.0
packages:
- clang-6.0
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
before_install:
- eval "${MATRIX_EVAL}"
script:
- mkdir -p build
- cd build
- cmake -DENABLE_DATE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DCOMPILE_WITH_C_LOCALE=ON ..
- make -j$(nproc)
- make testit -j$(nproc)

View File

@ -14,6 +14,12 @@ option( USE_TZ_DB_IN_DOT "Save the timezone database in the current folder" OFF
option( BUILD_SHARED_LIBS "Build a shared version of library" OFF )
option( ENABLE_DATE_TESTING "Enable unit tests" ON )
option( DISABLE_STRING_VIEW "Disable string view" OFF )
option( COMPILE_WITH_C_LOCALE "pass -DONLY_C_LOCALE=1 to copiler")
if(COMPILE_WITH_C_LOCALE)
#To workaround libstdc++ issue https://github.com/HowardHinnant/date/issues/388
add_definitions(-DONLY_C_LOCALE=1)
endif()
function( print_option OPT )
if ( NOT DEFINED PRINT_OPTION_CURR_${OPT} OR ( NOT PRINT_OPTION_CURR_${OPT} STREQUAL ${OPT} ) )

View File

@ -1,5 +1,6 @@
# Date
[![Build Status](https://travis-ci.org/miketsukerman/date.svg?branch=add-continues-integration)](https://travis-ci.org/miketsukerman/date)
[![Join the chat at https://gitter.im/HowardHinnant/date](https://badges.gitter.im/HowardHinnant/date.svg)](https://gitter.im/HowardHinnant/date?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
---