Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build/setup.bat
#	conanfile.py
#	dev/setenv.bat
#	dev/setenv.sh
  • Loading branch information
gagelarsen committed Apr 12, 2018
2 parents 64b9351 + c14056c commit b684567
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 40 deletions.
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# skip_non_tags: true # Only build on tagged commits
skip_non_tags: true # Only build on tagged commits
build: false
version: 1.0.0-{build} # This version is somewhat arbitrary. Does not affect the version of the package.

Expand All @@ -9,16 +9,16 @@ environment:

# Assume we are only building on tagged commits.
# Will not work on untagged commits.
XMSCORE_VERSION: ${APPVEYOR_REPO_TAG_NAME}
CONAN_REFERENCE: "xmscore/${XMSCORE_VERSION}"
XMS_VERSION: ${APPVEYOR_REPO_TAG_NAME}
CONAN_REFERENCE: "xmscore/${XMS_VERSION}"
CONAN_USERNAME: "aquaveo"
CONAN_CHANNEL: "stable"
CONAN_LOGIN_USERNAME: ${CONAN_USER_SECRET}
CONAN_PASSWORD: ${CONAN_PASSWORD_SECRET}
CONAN_REMOTES: ${AQUAVEO_CONAN}
CONAN_STABLE_BRANCH_PATTERN: ^\d+\.\d+\.\d+$
CONAN_UPLOAD_ONLY_WHEN_STABLE: 1
XMSCORE_RUN_TESTS: 1
XMS_RUN_TESTS: 1

matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
env:
global:
# TRAVIS_BRANCH is tag name if tag provided else branch name
- XMSCORE_VERSION: $TRAVIS_BRANCH
- CONAN_REFERENCE: "xmscore/${XMSCORE_VERSION}"
- XMS_VERSION: $TRAVIS_BRANCH
- CONAN_REFERENCE: "xmscore/${XMS_VERSION}"
- CONAN_USERNAME: "aquaveo"
- CONAN_CHANNEL: "stable"
- CONAN_LOGIN_USERNAME: $CONAN_USER_SECRET
Expand Down Expand Up @@ -69,20 +69,20 @@ jobs:

- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 XMSCORE_RUN_TESTS=1
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 XMS_RUN_TESTS=1

- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 XMSCORE_RUN_TESTS=1
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 XMS_RUN_TESTS=1

- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 XMSCORE_RUN_TESTS=1
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 XMS_RUN_TESTS=1

- stage: test
<<: *osx
osx_image: xcode9.2
env: CONAN_APPLE_CLANG_VERSIONS=9.0 XMSCORE_RUN_TESTS=1
env: CONAN_APPLE_CLANG_VERSIONS=9.0 XMS_RUN_TESTS=1

# --- DEPLOY STAGE ----------------------------------------------------------------------------------------------
- stage: deploy
Expand Down
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ cmake_minimum_required(VERSION 3.1.2)
cmake_policy(SET CMP0015 NEW) # Link Directory Pathing
set(CMAKE_DEBUG_POSTFIX _d)

if (WIN32)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()

set(BUILD_TESTING NO CACHE BOOL "Enable/Disable testing")

project(xmscore)

if (XMS_BUILD)
Expand Down Expand Up @@ -97,15 +103,6 @@ if(BUILD_TESTING)
)
target_link_libraries(runner ${PROJECT_NAME})
endif()

# This Works but we want to use built in CXXTEST
#add_custom_command(
# OUTPUT runner.cpp
# COMMAND ${CONAN_BIN_DIRS_CXXTEST}/cxxtestgen --error-printer --root -o runner.cpp ${CMAKE_CURRENT_LIST_DIR}/xmscore/**/*.t.h
#)
#add_executable(runner runner.cpp)
#target_link_libraries(runner ${PROJECT_NAME})

endif()

add_library(${PROJECT_NAME} STATIC
Expand Down
10 changes: 6 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
builder = ConanMultiPackager()
builder.add_common_builds()
updated_builds = []

# Add environment variables to build definitions
xmscore_version = os.environ.get('XMSCORE_VERSION', None)
xmscore_run_tests = os.environ.get('XMSCORE_RUN_TESTS', None)
xms_version = os.environ.get('XMS_VERSION', None)
xms_run_tests = os.environ.get('XMS_RUN_TESTS', None)

for settings, options, env_vars, build_requires, reference in builder.items:
env_vars.update({
'XMSCORE_VERSION': xmscore_version,
"XMSCORE_RUN_TESTS": xmscore_run_tests,
'XMS_VERSION': xms_version,
"XMS_RUN_TESTS": xms_run_tests,
})

# Require c++11 compatibility
Expand All @@ -31,6 +32,7 @@
updated_builds.append([settings, xms_options, env_vars, build_requires])

updated_builds.append([settings, options, env_vars, build_requires])

builder.builds = updated_builds

builder.run()
10 changes: 5 additions & 5 deletions build/setup.bat
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
@echo on

mkdir x86\release
cd x86\release
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86" -s arch_build="x86" -s compiler.version="12" -s build_type="Release" -o xmscore:xms=True
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86" -s arch_build="x86" -s compiler.version="12" -s build_type="Release"
cmake -DBUILD_TESTING=1 -G "Visual Studio 12 2013" ..\..\..
cd ..\..

mkdir x86\debug
cd x86\debug
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86" -s arch_build="x86" -s compiler.version="12" -s build_type="Debug" -o xmscore:xms=True
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86" -s arch_build="x86" -s compiler.version="12" -s build_type="Debug"
cmake -DBUILD_TESTING=1 -G "Visual Studio 12 2013" ..\..\..
cd ..\..


mkdir x64\release
cd x64\release
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86_64" -s arch_build="x86_64" -s compiler.version="12" -s build_type="Release" -o xmscore:xms=True
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86_64" -s arch_build="x86_64" -s compiler.version="12" -s build_type="Release"
cmake -DBUILD_TESTING=1 -G "Visual Studio 12 2013 Win64" ..\..\..
cd ..\..

mkdir x64\debug
cd x64\debug
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86_64" -s arch_build="x86_64" -s compiler.version="12" -s build_type="Debug" -o xmscore:xms=True
conan install ..\..\.. -s compiler="Visual Studio" -s arch="x86_64" -s arch_build="x86_64" -s compiler.version="12" -s build_type="Debug"
cmake -DBUILD_TESTING=1 -G "Visual Studio 12 2013 Win64" ..\..\..
cd ..\..
8 changes: 4 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class XmscoreConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"xms": [True, False]}
default_options = "xms=False"
generators = "cmake", "txt", "virtualenv"
generators = "cmake", "txt"
build_requires = "cxxtest/4.4@aquaveo/stable"
exports = "CMakeLists.txt", "LICENSE"
exports_sources = "xmscore/*"

def configure(self):
# Set version dynamically using XMSCORE_VERSION env variable.
self.version = self.env.get('XMSCORE_VERSION', 'master')
# Set version dynamically using XMS_VERSION env variable.
self.version = self.env.get('XMS_VERSION', 'master')

# Raise ConanExceptions for Unsupported Versions
s_os = self.settings.os
Expand Down Expand Up @@ -49,7 +49,7 @@ def build(self):
cmake.configure(source_folder=".")
cmake.build()

run_tests = self.env.get('XMSCORE_RUN_TESTS', None)
run_tests = self.env.get('XMS_RUN_TESTS', None)
if run_tests is not None:
print("***********(0.0)*************")
try:
Expand Down
4 changes: 2 additions & 2 deletions dev/setenv.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@echo off
set XMS_VERSION=1.0.8
set XMS_RUN_TESTS=0
set XMS_RUN_TESTS=1
set CONAN_VISUAL_VERSIONS=12
set CONAN_REFERENCE=xmscore/%XMS_VERSION%
set CONAN_USERNAME=aquaveo
set CONAN_CHANNEL=stable
set CONAN_GCC_VERSIONS=5
REM export CONAN_UPLOAD=1
REM export CONAN_UPLOAD="<conanserver>"
set | findstr "XMS"
set | findstr "CONAN"
9 changes: 3 additions & 6 deletions dev/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/env bash
export XMS_VERSION="0.0.6"
export XMS_VERSION="1.0.7"
export XMS_RUN_TESTS="1"
export CONAN_REFERENCE="xmsinterp/${XMS_VERSION}"
export CONAN_REFERENCE="xmscore/${XMS_VERSION}"
export CONAN_USERNAME="aquaveo"
export CONAN_CHANNEL="stable"
export CONAN_GCC_VERSIONS="5"
export CONAN_ARCHS="x86_64"
export CONAN_BUILD_TYPES="Release"
# export CONAN_UPLOAD="1"
# export CONAN_UPLOAD="<conanserver>"
# export CONAN_DOCKER_IMAGE="lasote/conangcc${CONAN_GCC_VERSIONS}"
printenv | grep XMS
printenv | grep CONAN

0 comments on commit b684567

Please sign in to comment.