@@ -12,7 +12,7 @@ jobs: | |||
echo Executing Build and Tests | |||
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1 | |||
python -m pip install pytest pytest-xdist || exit 1 | |||
python -u tools/ci.py -B download -T tools\msvc.dds || exit 1 | |||
python -u tools/ci.py -B download -T tools\msvc.dds -T2 tools\msvc.jsonc || exit 1 | |||
displayName: Full CI | |||
- publish: _build/dds.exe | |||
artifact: DDS Executable - Windows VS2019 | |||
@@ -27,7 +27,7 @@ jobs: | |||
sudo apt install -y python3-minimal g++-9 ccache | |||
python3 -m pip install pytest pytest-xdist | |||
displayName: Prepare System | |||
- script: python3 -u tools/ci.py -B download -T tools/gcc-9.dds | |||
- script: python3 -u tools/ci.py -B download -T tools/gcc-9.dds -T2 tools/gcc-9.jsonc | |||
displayName: Full CI | |||
- publish: _build/dds | |||
artifact: DDS Executable - Linux | |||
@@ -41,7 +41,7 @@ jobs: | |||
- script: | | |||
set -eu | |||
python3 -m pip install pytest pytest-xdist | |||
python3 -u tools/ci.py -B download -T tools/gcc-9.dds | |||
python3 -u tools/ci.py -B download -T tools/gcc-9.dds -T2 tools/gcc-9.jsonc | |||
displayName: Build and Run Unit Tests | |||
- publish: _build/dds | |||
artifact: DDS Executable - macOS |
@@ -6,6 +6,7 @@ | |||
#include <dds/repo/repo.hpp> | |||
#include <dds/source/dist.hpp> | |||
#include <dds/toolchain/from_dds.hpp> | |||
#include <dds/toolchain/from_json.hpp> | |||
#include <dds/util/fs.hpp> | |||
#include <dds/util/paths.hpp> | |||
#include <dds/util/signal.hpp> | |||
@@ -58,7 +59,8 @@ struct toolchain_flag : string_flag { | |||
} | |||
return std::move(*tc); | |||
} else { | |||
return dds::parse_toolchain_dds(dds::slurp_file(tc_path)); | |||
return dds::parse_toolchain_json5(dds::slurp_file(tc_path)); | |||
// return dds::parse_toolchain_dds(dds::slurp_file(tc_path)); | |||
} | |||
} | |||
}; |
@@ -0,0 +1,6 @@ | |||
{ | |||
"compiler_id": 'gnu', | |||
"cxx_version": 'c++17', | |||
"cxx_compiler": 'g++-9', | |||
"flags": '-DSPDLOG_COMPILED_LIB', | |||
} |
@@ -0,0 +1,4 @@ | |||
{ | |||
"compiler_id": 'msvc', | |||
"flags": '-DSPDLOG_COMPILED_LIB', | |||
} |
@@ -5,7 +5,7 @@ from dds_ci import proc | |||
def test_get_build_use_spdlog(dds: DDS): | |||
dds.catalog_import(dds.source_root / 'catalog.json') | |||
tc_fname = 'gcc.tc.dds' if 'gcc' in dds.default_builtin_toolchain else 'msvc.tc.dds' | |||
tc_fname = 'gcc.tc.jsonc' if 'gcc' in dds.default_builtin_toolchain else 'msvc.tc.jsonc' | |||
tc = str(dds.test_dir / tc_fname) | |||
dds.build(toolchain=tc, apps=True) | |||
proc.check_run((dds.build_dir / 'use-spdlog').with_suffix(dds.exe_suffix)) |
@@ -14,6 +14,7 @@ from dds_ci import paths, proc | |||
class CIOptions(NamedTuple): | |||
toolchain: str | |||
toolchain_json5: str | |||
def _do_bootstrap_build(opts: CIOptions) -> None: | |||
@@ -67,9 +68,16 @@ def main(argv: Sequence[str]) -> int: | |||
'-T', | |||
help='The toolchain to use for the CI process', | |||
required=True) | |||
parser.add_argument( | |||
'--toolchain-json5', | |||
'-T2', | |||
help='The toolchain JSON to use with the bootstrapped executable', | |||
required=True, | |||
) | |||
args = parser.parse_args(argv) | |||
opts = CIOptions(toolchain=args.toolchain) | |||
opts = CIOptions( | |||
toolchain=args.toolchain, toolchain_json5=args.toolchain_json5) | |||
if args.bootstrap_with == 'build': | |||
_do_bootstrap_build(opts) | |||
@@ -117,7 +125,7 @@ def main(argv: Sequence[str]) -> int: | |||
]) | |||
self_build( | |||
paths.CUR_BUILT_DDS, | |||
toolchain=opts.toolchain, | |||
toolchain=opts.toolchain_json5, | |||
dds_flags=[f'--repo-dir={ci_repo_dir}', f'--catalog={cat_path}']) | |||
print('Bootstrap test PASSED!') | |||
@@ -0,0 +1,17 @@ | |||
{ | |||
"$schema": "../res/toolchain-schema.json", | |||
"compiler_id": "gnu", | |||
"c_compiler": "gcc-9", | |||
"cxx_compiler": "g++-9", | |||
"cxx_version": "c++17", | |||
"flags": [ | |||
"-DSPDLOG_COMPILED_LIB", // Required to use a compiled spdlog | |||
"-Werror=return-type" | |||
], | |||
"cxx_flags": [ | |||
"-fconcepts" | |||
], | |||
// "debug": true, | |||
"optimize": true, | |||
"compiler_launcher": "ccache" | |||
} |
@@ -0,0 +1,14 @@ | |||
{ | |||
"$schema": "../res/toolchain-schema.json", | |||
"compiler_id": "msvc", | |||
"flags": [ | |||
"/experimental:preprocessor", // Required for range-v3 | |||
"/DSPDLOG_COMPILED_LIB", // Required to use spdlog as a compiled lib | |||
"/std:c++latest", | |||
], | |||
"link_flags": [ | |||
"rpcrt4.lib", | |||
], | |||
// "debug": true, | |||
"optimize": true | |||
} |