Commit 9d8d37f2 authored by Michaël Roynard's avatar Michaël Roynard
Browse files

Initial commit

parents
Pipeline #7899 failed with stages
in 4 minutes and 26 seconds
BasedOnStyle: LLVM
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
# BreakBeforeBraces: Linux
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
# AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 120
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
FixNamespaceComments: true
# IncludeBlocks: Preserve
IndentCaseLabels: true
# IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
DerivePointerAlignment: false
PointerAlignment: Left
SortUsingDeclarations: true
SortIncludes: true
ReflowComments: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpacesInSquareBrackets: false
SpacesInContainerLiterals: false
SpacesInAngles: false
SpacesBeforeTrailingComments: 1
SpaceInEmptyParentheses: false
\ No newline at end of file
/build/*
/test_package/build/*
\ No newline at end of file
variables:
CONAN_PROFILE: "gcc7" # profile to use with conan
CONAN_BINTRAY_REMOTE_NAME: "dutiona-lrde" # Conan remote name
CONAN_BINTRAY_REMOTE_URL: "https://api.bintray.com/conan/dutiona/lrde" # Conan remote name
CONAN_BINTRAY_USER: "dutiona" # Conan user name
CONAN_BINTRAY_API_KEY: "e2a665548385e82bf1ecbb4739d3582b83b8235f" # Conan API key on public bintray repositories
CONAN_LRDE_REMOTE_NAME: "lrde-public" # Conan remote name
CONAN_LRDE_REMOTE_URL: "https://artifactory.lrde.epita.fr/artifactory/api/conan/lrde-public" # Conan remote name
CONAN_LRDE_USER: "mroynard" # Conan user name
CONAN_LRDE_API_KEY: "AKCp5bAiaob11EFd9cnDkF1LJBqG5QDgTgbQttVmSfgokeLK4yE6AQ9KM7WyUqBCK1MwTp9H1" # Conan API key on public bintray repositories
NAME: "pybind11" # Conan package name
TAG: "testing" # Conan tag
VERSION: "2.2.4" # Version to build
RELEASE_TYPE: "Release" # default release type
stages:
- build
- package
.job-basic-build-linux: &distcheck-basic-build-linux
stage: build
image: mroynard/ubuntu-toolset:stable
script:
- set -e
- conan create
--build missing
-pr $CONAN_PROFILE
. $NAME/$VERSION@$CONAN_LRDE_USER/$TAG-$CONAN_PROFILE
distcheck-build-linux-gcc7-release:
<<: *distcheck-basic-build-linux
variables:
distcheck-build-linux-gcc7-debug:
<<: *distcheck-basic-build-linux
variables:
RELEASE_TYPE: "Debug"
distcheck-build-linux-gcc8-release:
<<: *distcheck-basic-build-linux
variables:
CC: "gcc-8"
CXX: "g++-8"
CONAN_PROFILE: "gcc8"
distcheck-build-linux-gcc8-debug:
<<: *distcheck-basic-build-linux
variables:
CC: "gcc-8"
CXX: "g++-8"
CONAN_PROFILE: "gcc8"
RELEASE_TYPE: "Debug"
distcheck-build-linux-clang6-release:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-6.0"
CXX: "clang++-6.0"
CONAN_PROFILE: "clang6"
distcheck-build-linux-clang6-debug:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-6.0"
CXX: "clang++-6.0"
CONAN_PROFILE: "clang6"
RELEASE_TYPE: "Debug"
distcheck-build-linux-clang7-release:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-7"
CXX: "clang++-7"
CONAN_PROFILE: "clang7"
distcheck-build-linux-clang7-release:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-7"
CXX: "clang++-7"
CONAN_PROFILE: "clang7"
RELEASE_TYPE: "Debug"
distcheck-package-linux-bintray:
stage: package
image: mroynard/ubuntu-toolset:stable
script:
- set -e
- conan remote add $CONAN_BINTRAY_REMOTE_NAME $CONAN_BINTRAY_REMOTE_URL
- conan user
-p $CONAN_BINTRAY_API_KEY
-r $CONAN_BINTRAY_REMOTE_NAME $CONAN_BINTRAY_USER
- conan remote list
- conan create
--build missing
. $NAME/$VERSION@$CONAN_BINTRAY_USER/$TAG
- conan upload
--all --force --confirm --retry 10 --retry-wait 5
-r $CONAN_BINTRAY_REMOTE_NAME
$NAME/$VERSION@$CONAN_BINTRAY_USER/$TAG
only:
- master
distcheck-package-linux-lrde:
stage: package
image: mroynard/ubuntu-toolset:stable
script:
- set -e
- conan remote add $CONAN_LRDE_REMOTE_NAME $CONAN_LRDE_REMOTE_URL
- conan user
-p $CONAN_LRDE_API_KEY
-r $CONAN_LRDE_REMOTE_NAME $CONAN_LRDE_USER
- conan remote list
- conan create
--build missing
. $NAME/$VERSION@$CONAN_LRDE_USER/$TAG
- conan upload
--all --force --confirm --retry 10 --retry-wait 5
-r $CONAN_LRDE_REMOTE_NAME
$NAME/$VERSION@$CONAN_LRDE_USER/$TAG
only:
- master
from conans import ConanFile, CMake, tools
class Pybind11(ConanFile):
name = "pybind11"
version = "2.2.4"
description = "Seamless operability between C++11 and Python"
author = "Michaël Roynard <michael.roynard@lrde.epita.fr>"
url = "https://gitlab.lrde.epita.fr/olena/conan-pybind11"
homepage = "https://github.com/pybind/pybind11"
license = "https://github.com/pybind/pybind11/blob/master/LICENSE"
exports = ["LICENSE"]
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [
True, False], "build_tests": [True, False]}
default_options = "shared=False", "fPIC=True", "build_tests=True"
generators = "cmake"
def configure(self):
if self.settings.os == "Windows":
self.options.remove("fPIC")
def source(self):
git = tools.Git()
git.clone("{}.git".format(self.homepage))
git.checkout("v{}".format(self.version))
def get_cmake_config(self):
cmake = CMake(self)
if not self.options.build_tests:
cmake.definitions["BUILD_TESTING"] = "OFF"
cmake.configure()
return cmake
def build(self):
cmake = self.get_cmake_config()
cmake.build()
if self.options.build_tests:
cmake.test()
def package(self):
cmake = self.get_cmake_config()
cmake.install()
def package_id(self):
self.info.header_only()
def package_info(self):
self.cpp_info.includedirs = ["include"]
project(PackageTest CXX)
cmake_minimum_required(VERSION 2.8.12)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
add_executable(test_package test_package.cpp)
target_link_libraries(test_package PRIVATE CONAN_PKG::pybind11)
target_compile_features(test_package PRIVATE cxx_std_17)
enable_testing()
add_test(NAME test_package
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
COMMAND test_package)
import os
from conans import ConanFile, CMake, tools
class BenchmarkTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def imports(self):
self.copy("*.dll", dst="bin", src="bin")
self.copy("*.dylib*", dst="bin", src="lib")
self.copy('*.so*', dst='bin', src='lib')
def test(self):
if not tools.cross_building(self.settings):
os.chdir("bin")
self.run(".%stest_package" % os.sep)
#include <pybind11/pybind11.h>
namespace py = pybind11;
int main()
{
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment