From 759400b413876c49cdfde9fe9a93e40c80de91c1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 25 Aug 2018 23:36:20 -0500 Subject: [PATCH] Rebase from hash-predef source. --- .gitignore | 5 +- .travis.yml | 57 +++++----- doc/predef.qbk | 6 +- include/boost/predef/compiler/compaq.h | 2 +- tools/check/predef.jam | 2 +- tools/ci/common.py | 91 ++++++++------- tools/ci/library_test.py | 151 ++++++++----------------- 7 files changed, 133 insertions(+), 181 deletions(-) diff --git a/.gitignore b/.gitignore index c12bf46..2a44a68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -/bin -/boost-build.jam +bin +boost-build.jam project-config.jam +*.pyc diff --git a/.travis.yml b/.travis.yml index dbd1ff7..65d7f7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Copyright Rene Rivera 2015-2016. +# Copyright Rene Rivera 2015-2018. # Setting up notifications like this is optional as the default behavior # of Travis is to notify the commiter of problems. But setting a specific @@ -13,13 +13,6 @@ notifications: recipients: - grafikrobot@gmail.com -# For now the CI scripts only support the two main branches available -# on the boost super-project. -branches: - only: - - master - - develop - # We specify a generic language instead of C++ as Travis sets up # additional environment vars that point to its default toolset # instead of the one we install. The extra env doesn't interfere, @@ -28,7 +21,7 @@ branches: language: generic # Speficy the default as Linux here, to avoid duplication in the matrix -# below. We use Trausty as that's the latest we can use. And it's better +# below. We use Trusty as that's the latest we can use. And it's better # supported by the whole range of C++ toolsets we like to test on. dist: trusty os: linux @@ -68,14 +61,18 @@ matrix: - env: TOOLSET=gcc-4.9 - env: TOOLSET=gcc-5 - env: TOOLSET=gcc-6 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=c++03 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=c++11 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=c++14 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=c++1z - - env: TOOLSET=gcc-7 CXXFLAGS=-std=gnu++03 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=gnu++11 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=gnu++14 - - env: TOOLSET=gcc-7 CXXFLAGS=-std=gnu++1z + - env: TOOLSET=gcc-7 + - env: TOOLSET=gcc-8 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=c++03 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=c++11 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=c++14 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=c++17 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=c++2a + - env: TOOLSET=gcc-8 CXXFLAGS=-std=gnu++03 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=gnu++11 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=gnu++14 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=gnu++17 + - env: TOOLSET=gcc-8 CXXFLAGS=-std=gnu++2a - env: TOOLSET=xcode-6.1 os: osx - env: TOOLSET=xcode-6.4 @@ -84,18 +81,27 @@ matrix: - env: TOOLSET=xcode-7.3 os: osx osx_image: xcode7.3 - - env: TOOLSET=xcode-8.3 CXXFLAGS=-std=c++03 + - env: TOOLSET=xcode-8.3 os: osx osx_image: xcode8.3 - - env: TOOLSET=xcode-8.3 CXXFLAGS=-std=c++11 + - env: TOOLSET=xcode-9.4 CXXFLAGS=-std=c++03 os: osx - osx_image: xcode8.3 - - env: TOOLSET=xcode-8.3 CXXFLAGS=-std=c++14 + osx_image: xcode9.4 + - env: TOOLSET=xcode-9.4 CXXFLAGS=-std=c++11 os: osx - osx_image: xcode8.3 - - env: TOOLSET=xcode-8.3 CXXFLAGS=-std=c++1z + osx_image: xcode9.4 + - env: TOOLSET=xcode-9.4 CXXFLAGS=-std=c++14 os: osx - osx_image: xcode8.3 + osx_image: xcode9.4 + - env: TOOLSET=xcode-9.4 CXXFLAGS=-std=c++17 + os: osx + osx_image: xcode9.4 + - env: TOOLSET=xcode-9.4 CXXFLAGS=-std=c++2a + os: osx + osx_image: xcode9.4 + - env: TOOLSET=xcode-10.0 + os: osx + osx_image: xcode10.0 install: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" install before_script: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" before_script @@ -104,6 +110,3 @@ before_cache: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" before_cache after_success: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" after_success after_failure: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" after_failure after_script: python "${TRAVIS_BUILD_DIR}/tools/ci/library_test.py" after_script -cache: - directories: - - $HOME/boostorg/boost diff --git a/doc/predef.qbk b/doc/predef.qbk index 4e8b79b..bc9a284 100644 --- a/doc/predef.qbk +++ b/doc/predef.qbk @@ -235,7 +235,7 @@ commonly emulated by other compilers by defining the same base macros. To account for this detection headers are allowed to define `*_EMULATED` predefs when this situation is detected. The emulated predefs will be set to the version number of the detection instead of the regular predef macro for that -detection. For example MSVC will set `BOOST_COMP_MSVC_EMULATED` but not set `BOOST_COM_MSVC`, and it will also set `BOOST_COMP_MSVC_AVAILABLE`. +detection. For example MSVC will set `BOOST_COMP_MSVC_EMULATED` but not set `BOOST_COMP_MSVC`, and it will also set `BOOST_COMP_MSVC_AVAILABLE`. [heading Using the `BOOST_VERSION_NUMBER` macro] @@ -401,7 +401,7 @@ We also need to provide the `*_AVAILABLE` versions of the predef. And for convenience we also want to provide a `*_NAME` macro: `` -#define BOOST_catagory_tag_NAME "Name" +#define BOOST_category_tag_NAME "Name" `` The testing of the predef macros is automated to generate checks for all @@ -507,7 +507,7 @@ uses a simple 3-digit version macro (M,N,P). It can be decomposed and defined as: `` -#define BOOST_CCOMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__) +#define BOOST_COMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__) `` The decomposition macros are split into three types: decimal diff --git a/include/boost/predef/compiler/compaq.h b/include/boost/predef/compiler/compaq.h index 96a79e6..c6a83ff 100644 --- a/include/boost/predef/compiler/compaq.h +++ b/include/boost/predef/compiler/compaq.h @@ -38,7 +38,7 @@ Version number available as major, minor, and patch. # define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) # endif # if !defined(BOOST_COMP_DEC_DETECTION) -# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_COMP_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE # endif #endif diff --git a/tools/check/predef.jam b/tools/check/predef.jam index c037fb4..d91df7b 100644 --- a/tools/check/predef.jam +++ b/tools/check/predef.jam @@ -102,8 +102,8 @@ local rule change_term_to_def ( term ) if $(parts[3]) { local version_number = [ regex.split $(parts[3]) "[.]" ] ; - if ! $(version_number[3]) { version_number += "0" ; } if ! $(version_number[2]) { version_number += "0" ; } + if ! $(version_number[3]) { version_number += "0" ; } parts = $(parts[1-2]) BOOST_VERSION_NUMBER($(version_number:J=",")) ; } return CHECK=\"$(parts:J=" ")\" ; diff --git a/tools/ci/common.py b/tools/ci/common.py index 50ca860..7536276 100644 --- a/tools/ci/common.py +++ b/tools/ci/common.py @@ -254,6 +254,26 @@ toolset_info = { 'toolset' : 'clang', 'version' : '' }, + 'xcode-9.2' : { + 'command' : 'clang++', + 'toolset' : 'clang', + 'version' : '' + }, + 'xcode-9.3' : { + 'command' : 'clang++', + 'toolset' : 'clang', + 'version' : '' + }, + 'xcode-9.4' : { + 'command' : 'clang++', + 'toolset' : 'clang', + 'version' : '' + }, + 'xcode-10.0' : { + 'command' : 'clang++', + 'toolset' : 'clang', + 'version' : '' + }, } class SystemCallError(Exception): @@ -435,24 +455,24 @@ class utils: return boost_version @staticmethod - def git_clone(sub_repo, branch, commit = None, cwd = None, no_submodules = False): + def git_clone(owner, repo, branch, commit = None, repo_dir = None, submodules = False, url_format = "https://github.com/%(owner)s/%(repo)s.git"): ''' This clone mimicks the way Travis-CI clones a project's repo. So far Travis-CI is the most limiting in the sense of only fetching partial history of the repo. ''' - if not cwd: - cwd = cwd = os.getcwd() - root_dir = os.path.join(cwd,'boostorg',sub_repo) - if not os.path.exists(os.path.join(root_dir,'.git')): + if not repo_dir: + repo_dir = os.path.join(os.getcwd(), owner+','+repo) + utils.makedirs(os.path.dirname(repo_dir)) + if not os.path.exists(os.path.join(repo_dir,'.git')): utils.check_call("git","clone", "--depth=1", "--branch=%s"%(branch), - "https://github.com/boostorg/%s.git"%(sub_repo), - root_dir) - os.chdir(root_dir) + url_format%{'owner':owner,'repo':repo}, + repo_dir) + os.chdir(repo_dir) else: - os.chdir(root_dir) + os.chdir(repo_dir) utils.check_call("git","pull", # "--depth=1", # Can't do depth as we get merge errors. "--quiet","--no-recurse-submodules") @@ -463,12 +483,12 @@ class utils: utils.check_call('dir',os.path.join('.git','modules')) else: utils.check_call('ls','-la',os.path.join('.git','modules')) - if not no_submodules: + if submodules: utils.check_call("git","submodule","--quiet","update", "--quiet","--init","--recursive", ) utils.check_call("git","submodule","--quiet","foreach","git","fetch") - return root_dir + return repo_dir class parallel_call(threading.Thread): ''' @@ -496,7 +516,7 @@ def set_arg(args, k, v = None): class script_common(object): ''' - Main script to run Boost C++ Libraries continuous integration. + Main script to run continuous integration. ''' def __init__(self, ci_klass, **kargs): @@ -521,7 +541,7 @@ class script_common(object): set_arg(kargs,'branch',None) set_arg(kargs,'commit',None) set_arg(kargs,'repo',None) - set_arg(kargs,'root_dir',None) + set_arg(kargs,'repo_dir',None) set_arg(kargs,'actions',None) set_arg(kargs,'pull_request', None) @@ -533,9 +553,9 @@ class script_common(object): self.actions = kargs.get('actions',None) if not self.actions or self.actions == []: self.actions = [ 'info' ] - if not self.root_dir: - self.root_dir = os.getcwd() - self.build_dir = os.path.join(os.path.dirname(self.root_dir), "build") + if not self.repo_dir: + self.repo_dir = os.getcwd() + self.build_dir = os.path.join(os.path.dirname(self.repo_dir), "build") # API keys. self.bintray_key = os.getenv('BINTRAY_KEY') @@ -562,8 +582,8 @@ class script_common(object): ci_script = getattr(self, action_m, None) if ci_command or ci_script: utils.log( "### %s.."%(action) ) - if os.path.exists(self.root_dir): - os.chdir(self.root_dir) + if os.path.exists(self.repo_dir): + os.chdir(self.repo_dir) if ci_command: ci_command() elif ci_script: @@ -614,9 +634,9 @@ class ci_cli(object): The common way to use this variant is to invoke something like: - mkdir boost-ci - cd boost-ci - python path-to/ci_boost_