Skip to content

Commit

Permalink
Update .travis.yml to fix a few 'stalled' builds
Browse files Browse the repository at this point in the history
Add appveyor.yml (for eventual integration)
Add clang-format file

attempt to fix travis build scripts (more work will be needed)
Fix definition of conjunction, disjunction, and negation (they were
notlazily evaluated)
  • Loading branch information
bruxisma committed Dec 4, 2015
1 parent ce6486c commit 8d1c401
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 17 deletions.
21 changes: 21 additions & 0 deletions .clang-format
@@ -0,0 +1,21 @@
Standard: Cpp11
Language: Cpp
AccessModifierOffset: 0
IndentWidth: 2
UseTab: Never
BinPackParameters: true
PointerAlignment: Left
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AlwaysBreakTemplateDeclarations: false
NamespaceIndentation: None
PointerBindsToType: true
SpaceInParentheses: false
BreakBeforeBraces: Attach
ColumnLimit: 80
Cpp11BracedListStyle: true
SpaceBeforeTrailingComments: 1
SpaceBeforeParens: ControlStatements
8 changes: 0 additions & 8 deletions .travis.yml
Expand Up @@ -29,10 +29,6 @@ addons:
matrix:
include:
# osx : clang : release
- os: osx
compiler: clang
env: BUILD=Release
osx_image: xcode7.2b3
- os: osx
compiler: clang
env: BUILD=Release
Expand Down Expand Up @@ -69,10 +65,6 @@ matrix:
env: BUILD=Release VERSION=4.8

# osx : clang : debug
- os: osx
compiler: clang
env: BUILD=Debug
osx_image: xcode7.2b3
- os: osx
compiler: clang
env: BUILD=Debug
Expand Down
23 changes: 23 additions & 0 deletions appveyor.yml
@@ -0,0 +1,23 @@
platform:
- x86
- x64
configuration:
- Debug
- Release

branches:
only: master
skip_tags: true
os:
- Visual Studio 2015

build:
parallel: true
verbosity: normal

install:
- C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat
-

build_script:
- cmake --build build --target check
26 changes: 22 additions & 4 deletions include/core/type_traits.hpp
Expand Up @@ -18,17 +18,35 @@ template <class T> using identity = meta::identity<T>;
template <class T> using class_of_t = impl::class_of_t<T>;
template <class T> using class_of = impl::class_of<T>;

template <class... Ts> using conjunction = meta::all_t<Ts::value...>;
template <class... Ts> using disjunction = meta::any_t<Ts::value...>;
template <class... Ts> using negation = meta::none_t<Ts::value...>;

template <::std::size_t I, class T>
using tuple_element_t = typename ::std::tuple_element<I, T>::type;
template <class T> using tuple_size_t = typename ::std::tuple_size<T>::type;

/* Implementation of N4389 */
template <bool B> using bool_constant = ::std::integral_constant<bool, B>;

template <class...> struct conjunction;
template <class...> struct disjunction;
template <class...> struct negation;

template <class T, class... Ts>
struct conjunction<T, Ts...> :
bool_constant<T::value and conjunction<Ts...>::value>
{ };
template <> struct conjunction<> : ::std::true_type { };

template <class T, class... Ts>
struct disjunction<T, Ts...> :
bool_constant<T::value or disjunction<Ts...>::value>
{ };
template <> struct disjunction<> : ::std::false_type { };

template <class T, class... Ts>
struct negation<T, Ts...> :
bool_constant<not T::value and negation<Ts...>::value>
{ };
template <> struct negation<> : ::std::false_type { };

/* C++ Library Fundamentals V2 TS detection idiom */
template <class... Ts> using void_t = meta::deduce<Ts...>;

Expand Down
7 changes: 3 additions & 4 deletions scripts/travis-before-install
Expand Up @@ -9,13 +9,12 @@
VERSION=3.3.2
URL=https://cmake.org/files/v3.3/cmake-$VERSION-$(uname -s)-x86_64.tar.gz

function version { return $HOME/cmake/bin/cmake --version | head -n1; }
function version { $HOME/cmake/bin/cmake --version | head -n1; }

if [[ -d $HOME/cmake && $VERSION = $(version | sed s/[^0-9]*//) ]]; then
echo Using $(version) && exit 0
fi

curl $URL -o cmake.tar.gz || exit 1
tar xvzf cmake.tar.gz
ls -R $HOME/cmake

tar xzf cmake.tar.gz -C cmake --strip-components=1
ls $HOME/cmake
2 changes: 1 addition & 1 deletion scripts/travis-configure
Expand Up @@ -15,5 +15,5 @@ mkdir build && cd build || exit 1
$HOME/cmake/bin/cmake $CURRENT \
-DCMAKE_BUILD_TYPE:STRING=${BUILD:-Debug} \
-DBUILD_WITH_COVERAGE:BOOL=ON \
-DBUILD_WITH_LIBCXX:BOOL=${LIBCXX:-OFF}
-DBUILD_WITH_LIBCXX:BOOL=${LIBCXX:-OFF} \
-DBUILD_TESTING:BOOL=ON

0 comments on commit 8d1c401

Please sign in to comment.