diff options
Diffstat (limited to 'project/ci')
-rw-r--r-- | project/ci/appveyor/boost.py | 17 | ||||
-rw-r--r-- | project/ci/appveyor/cmake.py | 17 | ||||
-rw-r--r-- | project/ci/boost.py | 35 | ||||
-rw-r--r-- | project/ci/cmake.py | 51 | ||||
-rw-r--r-- | project/ci/github/__init__.py | 0 | ||||
-rw-r--r-- | project/ci/github/boost.py | 17 | ||||
-rw-r--r-- | project/ci/github/cmake.py | 17 | ||||
-rw-r--r-- | project/ci/travis/__init__.py | 0 | ||||
-rw-r--r-- | project/ci/travis/boost.py | 17 | ||||
-rw-r--r-- | project/ci/travis/cmake.py | 17 |
10 files changed, 42 insertions, 146 deletions
diff --git a/project/ci/appveyor/boost.py b/project/ci/appveyor/boost.py deleted file mode 100644 index 068fc26..0000000 --- a/project/ci/appveyor/boost.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.boost import build_ci -from project.ci.dirs import AppVeyor -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(AppVeyor(), argv) - - -if __name__ == '__main__': - main() diff --git a/project/ci/appveyor/cmake.py b/project/ci/appveyor/cmake.py deleted file mode 100644 index 6df28f2..0000000 --- a/project/ci/appveyor/cmake.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.cmake import build_ci -from project.ci.dirs import AppVeyor -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(AppVeyor(), argv) - - -if __name__ == '__main__': - main() diff --git a/project/ci/boost.py b/project/ci/boost.py index 588df92..1b47710 100644 --- a/project/ci/boost.py +++ b/project/ci/boost.py @@ -17,7 +17,6 @@ from project.utils import setup_logging def _parse_args(argv=None): if argv is None: argv = sys.argv[1:] - logging.info('Command line arguments: %s', argv) parser = argparse.ArgumentParser( description=Dirs.get_boost_help(), @@ -39,28 +38,28 @@ def _parse_args(argv=None): def build_ci(dirs, argv=None): args = _parse_args(argv) - if dirs is None: - dirs = Dirs.detect() + with setup_logging(): + if dirs is None: + dirs = Dirs.detect() - version = dirs.get_boost_version() - build_dir = dirs.get_build_dir() - boost_dir = dirs.get_boost_dir() - params = DownloadParameters(version, cache_dir=build_dir, dest_path=boost_dir) - download(params) + version = dirs.get_boost_version() + build_dir = dirs.get_build_dir() + boost_dir = dirs.get_boost_dir() + params = DownloadParameters(version, cache_dir=build_dir, dest_path=boost_dir) + download(params) - params = BuildParameters(boost_dir, - platforms=(dirs.get_platform(),), - configurations=(dirs.get_configuration(),), - link=args.link, - runtime_link=args.runtime_link, - toolset=dirs.get_toolset(), - b2_args=args.b2_args) - build(params) + params = BuildParameters(boost_dir, + platforms=(dirs.get_platform(),), + configurations=(dirs.get_configuration(),), + link=args.link, + runtime_link=args.runtime_link, + toolset=dirs.get_toolset(), + b2_args=args.b2_args) + build(params) def main(argv=None): - with setup_logging(): - build_ci(None, argv) + build_ci(None, argv) if __name__ == '__main__': diff --git a/project/ci/cmake.py b/project/ci/cmake.py index 70fd885..83a80e8 100644 --- a/project/ci/cmake.py +++ b/project/ci/cmake.py @@ -16,7 +16,6 @@ from project.utils import setup_logging def _parse_args(argv=None): if argv is None: argv = sys.argv[1:] - logging.info('Command line arguments: %s', argv) parser = argparse.ArgumentParser( description=Dirs.get_cmake_help(), @@ -35,37 +34,37 @@ def _parse_args(argv=None): def build_ci(dirs, argv=None): args = _parse_args(argv) - if dirs is None: - dirs = Dirs.detect() + with setup_logging(): + if dirs is None: + dirs = Dirs.detect() - src_dir = dirs.get_src_dir() - if args.subdir: - src_dir = os.path.join(src_dir, args.subdir) - install_dir = dirs.get_install_dir() if args.install else None + src_dir = dirs.get_src_dir() + if args.subdir: + src_dir = os.path.join(src_dir, args.subdir) + install_dir = dirs.get_install_dir() if args.install else None - boost_dir = args.boost_dir - if not boost_dir: - # If we've built Boost using project.ci.boost already, use that. - # Otherwise, try to use the latest pre-built Boost provided by the CI - # system. - boost_dir = dirs.get_boost_dir() - if not os.path.isdir(boost_dir): - boost_dir = dirs.get_prebuilt_boost_dir() + boost_dir = args.boost_dir + if not boost_dir: + # If we've built Boost using project.ci.boost already, use that. + # Otherwise, try to use the latest pre-built Boost provided by the CI + # system. + boost_dir = dirs.get_boost_dir() + if not os.path.isdir(boost_dir): + boost_dir = dirs.get_prebuilt_boost_dir() - params = BuildParameters(src_dir, - build_dir=dirs.get_cmake_dir(), - install_dir=install_dir, - platform=dirs.get_platform(), - configuration=dirs.get_configuration(), - boost_dir=boost_dir, - toolset=dirs.get_toolset(), - cmake_args=dirs.get_cmake_args() + args.cmake_args) - build(params) + params = BuildParameters(src_dir, + build_dir=dirs.get_cmake_dir(), + install_dir=install_dir, + platform=dirs.get_platform(), + configuration=dirs.get_configuration(), + boost_dir=boost_dir, + toolset=dirs.get_toolset(), + cmake_args=dirs.get_cmake_args() + args.cmake_args) + build(params) def main(argv=None): - with setup_logging(): - build_ci(None, argv) + build_ci(None, argv) if __name__ == '__main__': diff --git a/project/ci/github/__init__.py b/project/ci/github/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/ci/github/__init__.py +++ /dev/null diff --git a/project/ci/github/boost.py b/project/ci/github/boost.py deleted file mode 100644 index 5fd1e48..0000000 --- a/project/ci/github/boost.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.boost import build_ci -from project.ci.dirs import GitHub -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(GitHub(), argv) - - -if __name__ == '__main__': - main() diff --git a/project/ci/github/cmake.py b/project/ci/github/cmake.py deleted file mode 100644 index 9b9c7b9..0000000 --- a/project/ci/github/cmake.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.cmake import build_ci -from project.ci.dirs import GitHub -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(GitHub(), argv) - - -if __name__ == '__main__': - main() diff --git a/project/ci/travis/__init__.py b/project/ci/travis/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/project/ci/travis/__init__.py +++ /dev/null diff --git a/project/ci/travis/boost.py b/project/ci/travis/boost.py deleted file mode 100644 index 7aff33e..0000000 --- a/project/ci/travis/boost.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.boost import build_ci -from project.ci.dirs import Travis -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(Travis(), argv) - - -if __name__ == '__main__': - main() diff --git a/project/ci/travis/cmake.py b/project/ci/travis/cmake.py deleted file mode 100644 index 2f030af..0000000 --- a/project/ci/travis/cmake.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019 Egor Tensin <Egor.Tensin@gmail.com> -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -from project.ci.cmake import build_ci -from project.ci.dirs import Travis -from project.utils import setup_logging - - -def main(argv=None): - with setup_logging(): - build_ci(Travis(), argv) - - -if __name__ == '__main__': - main() |