Преглед изворни кода

Remove the `--full` parameter

default_compile_flags
vector-of-bool пре 5 година
родитељ
комит
aaea35e23b
2 измењених фајлова са 21 додато и 25 уклоњено
  1. +7
    -19
      src/dds/dds.main.cpp
  2. +14
    -6
      tools/ci.py

+ 7
- 19
src/dds/dds.main.cpp Прегледај датотеку

@@ -25,8 +25,8 @@ struct toolchain_flag : string_flag {
toolchain_flag(args::Group& grp)
: string_flag{grp,
"toolchain_file",
"Path/ident of the toolchain file to use",
{"toolchain", 'T'},
"Path/ident of the toolchain to use",
{"toolchain", 't'},
(dds::fs::current_path() / "toolchain.dds").string()} {}

dds::toolchain get_toolchain() {
@@ -286,10 +286,14 @@ struct cli_build {

common_project_flags project{cmd};

args::Flag build_tests{cmd, "build_tests", "Build the tests", {"tests", 't'}};
args::Flag build_tests{cmd, "build_tests", "Build and run the tests", {"tests", 'T'}};
args::Flag build_apps{cmd, "build_apps", "Build applications", {"apps", 'A'}};
args::Flag export_{cmd, "export", "Generate a library export", {"export", 'E'}};
toolchain_flag tc_filepath{cmd};
args::Flag enable_warnings{cmd,
"enable_warnings",
"Enable compiler warnings",
{"warnings", 'W'}};

path_flag lm_index{cmd,
"lm_index",
@@ -297,16 +301,6 @@ struct cli_build {
{"lm-index", 'I'},
dds::fs::path()};

args::Flag enable_warnings{cmd,
"enable_warnings",
"Enable compiler warnings",
{"warnings", 'W'}};

args::Flag full{cmd,
"full",
"Build all optional components (tests, apps, warnings, export)",
{"full", 'F'}};

args::ValueFlag<int> num_jobs{cmd,
"jobs",
"Set the number of parallel jobs when compiling files",
@@ -335,12 +329,6 @@ struct cli_build {
if (exists(man_filepath)) {
man = dds::package_manifest::load_from_file(man_filepath);
}
if (full.Get()) {
params.do_export = true;
params.build_tests = true;
params.build_apps = true;
params.enable_warnings = true;
}
dds::build(params, man);
return 0;
}

+ 14
- 6
tools/ci.py Прегледај датотеку

@@ -68,8 +68,7 @@ def main(argv: Sequence[str]) -> int:
required=True,
)
parser.add_argument(
'--cxx',
help='The name/path of the C++ compiler to use.')
'--cxx', help='The name/path of the C++ compiler to use.')
parser.add_argument(
'--toolchain',
'-T',
@@ -83,11 +82,14 @@ def main(argv: Sequence[str]) -> int:
args = parser.parse_args(argv)

opts = CIOptions(
cxx=Path(args.cxx or 'unspecified'), toolchain=args.toolchain, skip_deps=args.skip_deps)
cxx=Path(args.cxx or 'unspecified'),
toolchain=args.toolchain,
skip_deps=args.skip_deps)

if args.bootstrap_with == 'build':
if args.cxx is None:
raise RuntimeError('`--cxx` must be given when using `--bootstrap-with=build`')
raise RuntimeError(
'`--cxx` must be given when using `--bootstrap-with=build`')
_do_bootstrap_build(opts)
elif args.bootstrap_with == 'download':
_do_bootstrap_download()
@@ -104,10 +106,16 @@ def main(argv: Sequence[str]) -> int:
self_deps_build(paths.PREBUILT_DDS, opts.toolchain, ci_repo_dir,
paths.PROJECT_ROOT / 'remote.dds')

self_build(paths.PREBUILT_DDS, toolchain=opts.toolchain, dds_flags=['--full'])
self_build(
paths.PREBUILT_DDS,
toolchain=opts.toolchain,
dds_flags=['--warnings', '--tests', '--apps'])
print('Main build PASSED!')

self_build(paths.CUR_BUILT_DDS, toolchain=opts.toolchain, dds_flags=['--full'])
self_build(
paths.CUR_BUILT_DDS,
toolchain=opts.toolchain,
dds_flags=['--warnings', '--tests', '--apps'])
print('Bootstrap test PASSED!')

return pytest.main([

Loading…
Откажи
Сачувај