aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/ci/boost.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-03 22:31:15 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-03 22:32:44 +0200
commitbe0b69971a4d8447d86f77b3d09b3820e8c9cb67 (patch)
treeda1e2075e9145186f92e28fea6061802d0842fca /project/ci/boost.py
parentproject.ci.cmake -> project.ci.build (diff)
downloadcmake-common-be0b69971a4d8447d86f77b3d09b3820e8c9cb67.tar.gz
cmake-common-be0b69971a4d8447d86f77b3d09b3820e8c9cb67.zip
remove project.ci
The weird magic going on in the ci-{boost,build} scripts is honestly too weird. With hindsight, it seems to me that it's much better to just build a project with the same command during a CI run as when developing locally. Plus, I haven't really used either Travis or AppVeyor in quite some time, so this code was mostly untested really.
Diffstat (limited to '')
-rw-r--r--project/ci/boost.py75
1 files changed, 0 insertions, 75 deletions
diff --git a/project/ci/boost.py b/project/ci/boost.py
deleted file mode 100644
index 65f4da0..0000000
--- a/project/ci/boost.py
+++ /dev/null
@@ -1,75 +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.
-
-import argparse
-import sys
-
-from project.boost.build import BuildParameters, build
-from project.boost.download import Download, download
-from project.ci.dirs import Dirs
-from project.linkage import Linkage
-from project.utils import setup_logging
-import project.version
-
-
-def _parse_args(argv=None):
- if argv is None:
- argv = sys.argv[1:]
-
- parser = argparse.ArgumentParser(
- description=Dirs.get_boost_help(),
- formatter_class=argparse.RawDescriptionHelpFormatter)
-
- project.version.add_to_arg_parser(parser)
-
- parser.add_argument('--link', metavar='LINKAGE',
- nargs='*', type=Linkage.parse,
- help='how the libraries are linked')
- parser.add_argument('--runtime-link', metavar='LINKAGE',
- type=Linkage.parse,
- help='how the libraries link to the runtime')
-
- # The hint parameter is basically a workaround for when this is run on a
- # CI, _but_ testing another CI is desired. This shouldn't be used in a
- # real CI workflow.
- parser.add_argument('--hint', metavar='CI_NAME',
- choices=Dirs.all_ci_names(),
- help=argparse.SUPPRESS)
-
- parser.add_argument('b2_args', metavar='B2_ARG',
- nargs='*', default=[],
- help='additional b2 arguments, to be passed verbatim')
-
- return parser.parse_args(argv)
-
-
-def build_ci(dirs, argv=None):
- args = _parse_args(argv)
- with setup_logging():
- if dirs is None:
- dirs = Dirs.detect(args.hint)
-
- version = dirs.get_boost_version()
- build_dir = dirs.get_build_dir()
- boost_dir = dirs.get_boost_dir()
- params = Download(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_version=dirs.get_toolset(),
- b2_args=args.b2_args)
- build(params)
-
-
-def main(argv=None):
- build_ci(None, argv)
-
-
-if __name__ == '__main__':
- main()