diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-13 19:40:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-13 19:40:47 +0300 |
commit | 596dbc3aeed2b110f94c99b6168fc464cb03ec6b (patch) | |
tree | b0efcc86700220f1271f0e760983ee27eb070617 /project/ci/cmake.py | |
parent | remove excessive logging & obsolete project.ci.* packages (diff) | |
download | cmake-common-596dbc3aeed2b110f94c99b6168fc464cb03ec6b.tar.gz cmake-common-596dbc3aeed2b110f94c99b6168fc464cb03ec6b.zip |
project.ci: add --hint parameter
This is a stupid workaround for testing other CI systems on GitHub
Actions.
Diffstat (limited to '')
-rw-r--r-- | project/ci/cmake.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/project/ci/cmake.py b/project/ci/cmake.py index 83a80e8..1694a5e 100644 --- a/project/ci/cmake.py +++ b/project/ci/cmake.py @@ -21,6 +21,12 @@ def _parse_args(argv=None): description=Dirs.get_cmake_help(), formatter_class=argparse.RawDescriptionHelpFormatter) + # 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='CI system to use') parser.add_argument('--install', action='store_true', help='install the project') parser.add_argument('--boost', metavar='DIR', dest='boost_dir', @@ -36,7 +42,7 @@ def build_ci(dirs, argv=None): args = _parse_args(argv) with setup_logging(): if dirs is None: - dirs = Dirs.detect() + dirs = Dirs.detect(args.hint) src_dir = dirs.get_src_dir() if args.subdir: |