mirror of
https://github.com/BlackMATov/kari.hpp.git
synced 2025-12-15 13:29:49 +07:00
CI refactoring
- Travis CI instead CircleCI - Build scripts - Move test sources to root folder - Update Catch
This commit is contained in:
10
.appveyor.yml
Normal file
10
.appveyor.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
version: "{build}"
|
||||||
|
shallow_clone: true
|
||||||
|
image:
|
||||||
|
- Visual Studio 2017
|
||||||
|
platform:
|
||||||
|
- Win32
|
||||||
|
- x64
|
||||||
|
build_script:
|
||||||
|
- scripts\build_all.bat
|
||||||
|
test: off
|
||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,4 +1,3 @@
|
|||||||
build-tests-*
|
build/*
|
||||||
tests/build/*
|
.vscode/*
|
||||||
tests/.vscode/*
|
CMakeLists.txt.user
|
||||||
tests/CMakeLists.txt.user
|
|
||||||
|
|||||||
60
.travis.yml
Normal file
60
.travis.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
language: cpp
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-6"] } }
|
||||||
|
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-7"] } }
|
||||||
|
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-8"] } }
|
||||||
|
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["xorg-dev", "clang-3.8", "g++-5"] } }
|
||||||
|
env: MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.9"], packages: ["xorg-dev", "clang-3.9", "g++-5"] } }
|
||||||
|
env: MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"], packages: ["xorg-dev", "clang-4.0", "g++-5"] } }
|
||||||
|
env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"], packages: ["xorg-dev", "clang-5.0", "g++-7"] } }
|
||||||
|
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-6.0"], packages: ["xorg-dev", "clang-6.0", "g++-7"] } }
|
||||||
|
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode8.3
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.1
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.2
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.3
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.4
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode10
|
||||||
|
compiler: clang
|
||||||
|
before_install:
|
||||||
|
- eval "${MATRIX_EVAL}"
|
||||||
|
script:
|
||||||
|
- ./scripts/build_all.sh
|
||||||
12
CMakeLists.txt
Normal file
12
CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||||
|
project(kari)
|
||||||
|
|
||||||
|
file(GLOB test_sources "*.cpp" "*.hpp")
|
||||||
|
add_executable(${PROJECT_NAME} ${test_sources})
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
|
CXX_STANDARD 14
|
||||||
|
CXX_STANDARD_REQUIRED YES
|
||||||
|
CXX_EXTENSIONS NO)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(${PROJECT_NAME} ${PROJECT_NAME})
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 Matvey Cherevko
|
Copyright (c) 2018 Matvey Cherevko
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -2,23 +2,29 @@
|
|||||||
|
|
||||||
> Experimental library for currying in C++14
|
> Experimental library for currying in C++14
|
||||||
|
|
||||||
[![circleci][badge.circleci]][circleci]
|
[![travis][badge.travis]][travis]
|
||||||
[![appveyor][badge.appveyor]][appveyor]
|
[![appveyor][badge.appveyor]][appveyor]
|
||||||
|
[![language][badge.language]][language]
|
||||||
[![license][badge.license]][license]
|
[![license][badge.license]][license]
|
||||||
[![godbolt][badge.godbolt]][godbolt]
|
[![godbolt][badge.godbolt]][godbolt]
|
||||||
[![wandbox][badge.wandbox]][wandbox]
|
[![wandbox][badge.wandbox]][wandbox]
|
||||||
|
[![paypal][badge.paypal]][paypal]
|
||||||
|
|
||||||
[badge.circleci]: https://circleci.com/gh/BlackMATov/kari.hpp.svg?style=shield
|
[badge.travis]: https://img.shields.io/travis/BlackMATov/kari.hpp/master.svg?logo=travis&style=shield
|
||||||
[badge.appveyor]: https://ci.appveyor.com/api/projects/status/github/blackmatov/kari.hpp?svg=true&passingText=master%20-%20OK
|
[badge.appveyor]: https://img.shields.io/appveyor/ci/BlackMATov/kari-hpp/master.svg?logo=appveyor&style=shield
|
||||||
[badge.license]: https://img.shields.io/badge/license-MIT-blue.svg
|
[badge.language]: https://img.shields.io/badge/language-C%2B%2B14-red.svg?style=shield
|
||||||
[badge.godbolt]: https://img.shields.io/badge/try%20it-on%20godbolt-orange.svg
|
[badge.license]: https://img.shields.io/badge/license-MIT-blue.svg?style=shield
|
||||||
[badge.wandbox]: https://img.shields.io/badge/try%20it-on%20wandbox-5cb85c.svg
|
[badge.godbolt]: https://img.shields.io/badge/try%20it-on%20godbolt-orange.svg?style=shield
|
||||||
|
[badge.wandbox]: https://img.shields.io/badge/try%20it-on%20wandbox-5cb85c.svg?style=shield
|
||||||
|
[badge.paypal]: https://img.shields.io/badge/donate-PayPal-orange.svg?logo=paypal&colorA=00457C&style=shield
|
||||||
|
|
||||||
[circleci]: https://circleci.com/gh/BlackMATov/kari.hpp
|
[travis]: https://travis-ci.org/BlackMATov/kari.hpp
|
||||||
[appveyor]: https://ci.appveyor.com/project/BlackMATov/kari-hpp
|
[appveyor]: https://ci.appveyor.com/project/BlackMATov/kari-hpp
|
||||||
|
[language]: https://en.wikipedia.org/wiki/C%2B%2B14
|
||||||
[license]: https://github.com/BlackMATov/kari.hpp/blob/master/LICENSE.md
|
[license]: https://github.com/BlackMATov/kari.hpp/blob/master/LICENSE.md
|
||||||
[godbolt]: https://godbolt.org/g/XPBgjY
|
[godbolt]: https://godbolt.org/g/XPBgjY
|
||||||
[wandbox]: https://wandbox.org/permlink/l6uHui1884zfQNa4
|
[wandbox]: https://wandbox.org/permlink/l6uHui1884zfQNa4
|
||||||
|
[paypal]: https://www.paypal.me/matov
|
||||||
|
|
||||||
[kari]: https://github.com/BlackMATov/kari.hpp
|
[kari]: https://github.com/BlackMATov/kari.hpp
|
||||||
|
|
||||||
@@ -268,3 +274,5 @@ auto r1 = ((_+2)*_)(_*2) * 10;
|
|||||||
// output: 24,22
|
// output: 24,22
|
||||||
std::cout << r0, << "," << r1 << std::endl;
|
std::cout << r0, << "," << r1 << std::endl;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## [License (MIT)](./LICENSE.md)
|
||||||
|
|||||||
16
appveyor.yml
16
appveyor.yml
@@ -1,16 +0,0 @@
|
|||||||
version: "{build}"
|
|
||||||
shallow_clone: true
|
|
||||||
image:
|
|
||||||
- Visual Studio 2017
|
|
||||||
configuration:
|
|
||||||
- Debug
|
|
||||||
- Release
|
|
||||||
platform:
|
|
||||||
- Win32
|
|
||||||
- x64
|
|
||||||
build_script:
|
|
||||||
- mkdir build && cd build
|
|
||||||
- cmake ../tests -A%PLATFORM%
|
|
||||||
- cmake --build . --config %CONFIGURATION%
|
|
||||||
- ..\build\%CONFIGURATION%\kari.exe
|
|
||||||
test: off
|
|
||||||
File diff suppressed because it is too large
Load Diff
42
circle.yml
42
circle.yml
@@ -1,42 +0,0 @@
|
|||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
gcc_build_debug:
|
|
||||||
docker:
|
|
||||||
- image: rikorose/gcc-cmake
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: cmake --version && gcc --version
|
|
||||||
- run: mkdir build && cd build && cmake ../tests -DCMAKE_BUILD_TYPE=DEBUG && cmake --build .
|
|
||||||
- run: ./build/kari
|
|
||||||
gcc_build_release:
|
|
||||||
docker:
|
|
||||||
- image: rikorose/gcc-cmake
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: cmake --version && gcc --version
|
|
||||||
- run: mkdir build && cd build && cmake ../tests -DCMAKE_BUILD_TYPE=RELEASE && cmake --build .
|
|
||||||
- run: ./build/kari
|
|
||||||
clang_build_debug:
|
|
||||||
docker:
|
|
||||||
- image: mickare/cmake-clang
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: cmake --version && clang --version
|
|
||||||
- run: mkdir build && cd build && cmake ../tests -DCMAKE_BUILD_TYPE=DEBUG && cmake --build .
|
|
||||||
- run: ./build/kari
|
|
||||||
clang_build_release:
|
|
||||||
docker:
|
|
||||||
- image: mickare/cmake-clang
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: cmake --version && clang --version
|
|
||||||
- run: mkdir build && cd build && cmake ../tests -DCMAKE_BUILD_TYPE=RELEASE && cmake --build .
|
|
||||||
- run: ./build/kari
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
build_all:
|
|
||||||
jobs:
|
|
||||||
- gcc_build_debug
|
|
||||||
- clang_build_debug
|
|
||||||
- gcc_build_release
|
|
||||||
- clang_build_release
|
|
||||||
10
scripts/build_all.bat
Normal file
10
scripts/build_all.bat
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
@echo off
|
||||||
|
set SCRIPT_DIR=%~dp0%
|
||||||
|
%SCRIPT_DIR%\build_debug.bat || goto :error
|
||||||
|
%SCRIPT_DIR%\build_release.bat || goto :error
|
||||||
|
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Failed with error #%errorlevel%.
|
||||||
|
exit /b %errorlevel%
|
||||||
5
scripts/build_all.sh
Executable file
5
scripts/build_all.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
|
||||||
|
$SCRIPT_DIR/build_debug.sh
|
||||||
|
$SCRIPT_DIR/build_release.sh
|
||||||
14
scripts/build_debug.bat
Normal file
14
scripts/build_debug.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
set BUILD_DIR=%~dp0%\..\build
|
||||||
|
mkdir %BUILD_DIR%\debug || goto :error
|
||||||
|
cd %BUILD_DIR%\debug || goto :error
|
||||||
|
cmake ../.. || goto :error
|
||||||
|
cmake --build . --config Debug || goto :error
|
||||||
|
ctest --verbose || goto :error
|
||||||
|
cd ..\.. || goto :error
|
||||||
|
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Failed with error #%errorlevel%.
|
||||||
|
exit /b %errorlevel%
|
||||||
9
scripts/build_debug.sh
Executable file
9
scripts/build_debug.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
|
||||||
|
mkdir -p $BUILD_DIR/debug
|
||||||
|
cd $BUILD_DIR/debug
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Debug ../..
|
||||||
|
cmake --build . -- -j8
|
||||||
|
ctest --verbose
|
||||||
|
cd ../..
|
||||||
14
scripts/build_release.bat
Normal file
14
scripts/build_release.bat
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
set BUILD_DIR=%~dp0%\..\build
|
||||||
|
mkdir %BUILD_DIR%\release || goto :error
|
||||||
|
cd %BUILD_DIR%\release || goto :error
|
||||||
|
cmake ../.. || goto :error
|
||||||
|
cmake --build . --config Release || goto :error
|
||||||
|
ctest --verbose || goto :error
|
||||||
|
cd ..\.. || goto :error
|
||||||
|
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Failed with error #%errorlevel%.
|
||||||
|
exit /b %errorlevel%
|
||||||
9
scripts/build_release.sh
Executable file
9
scripts/build_release.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
|
||||||
|
mkdir -p $BUILD_DIR/release
|
||||||
|
cd $BUILD_DIR/release
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ../..
|
||||||
|
cmake --build . -- -j8
|
||||||
|
ctest --verbose
|
||||||
|
cd ../..
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
#include "../kari.hpp"
|
#include "kari.hpp"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
project(kari)
|
|
||||||
file(GLOB kari_src "*.cpp" "*.hpp")
|
|
||||||
add_executable(${PROJECT_NAME} ${kari_src})
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
||||||
CXX_STANDARD 14
|
|
||||||
CXX_STANDARD_REQUIRED YES
|
|
||||||
CXX_EXTENSIONS NO)
|
|
||||||
Reference in New Issue
Block a user