Browse Source

Second phase of CI which downloads and rebuilds our dependencies

default_compile_flags
vector-of-bool 5 years ago
parent
commit
9a7cd4ceac
4 changed files with 37 additions and 13 deletions
  1. +3
    -3
      azure-pipelines.yml
  2. +24
    -10
      tools/ci.py
  3. +6
    -0
      tools/gcc-8.p2.dds
  4. +4
    -0
      tools/msvc.p2.dds

+ 3
- 3
azure-pipelines.yml View File

@@ -11,7 +11,7 @@ jobs:
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\vsdevcmd" -arch=x64 || exit 1
echo Executing Build and Tests
python -m pip install pytest pytest-xdist
python -u tools/ci.py -B download --cxx cl.exe -T tools\\msvc.dds || exit 1
python -u tools/ci.py -B download --cxx cl.exe -T tools\\msvc.dds -T2 tools\\msvc.p2.dds || exit 1
displayName: Full CI
- publish: _build/dds.exe
artifact: DDS Executable - Windows VS2019
@@ -26,7 +26,7 @@ jobs:
sudo apt install -y python3-minimal g++-8
python3 -m pip install pytest pytest-xdist
displayName: Prepare System
- script: python3 -u tools/ci.py -B download --cxx g++-8 -T tools/gcc-8.dds
- script: python3 -u tools/ci.py -B download --cxx g++-8 -T tools/gcc-8.dds -T2 tools/gcc-8.p2.dds
displayName: Full CI
- publish: _build/dds
artifact: DDS Executable - Linux
@@ -40,7 +40,7 @@ jobs:
- script: |
set -eu
python3 -m pip install pytest pytest-xdist
python3 -u tools/ci.py -B download --cxx g++-8 -T tools/gcc-8.dds
python3 -u tools/ci.py -B download --cxx g++-8 -T tools/gcc-8.dds -T2 tools/gcc-8.p2.dds
displayName: Build and Run Unit Tests
- publish: _build/dds
artifact: DDS Executable - macOS

+ 24
- 10
tools/ci.py View File

@@ -10,12 +10,14 @@ import shutil

from self_build import self_build
from self_deps_get import self_deps_get
from self_deps_build import self_deps_build
from dds_ci import paths, proc


class CIOptions(NamedTuple):
cxx: Path
toolchain: str
toolchain_2: str


def _do_bootstrap_build(opts: CIOptions) -> None:
@@ -74,9 +76,17 @@ def main(argv: Sequence[str]) -> int:
'-T',
help='The toolchain to use for the CI process',
required=True)
parser.add_argument(
'--toolchain-2',
'-T2',
help='Toolchain for the second-phase self-test',
required=True)
args = parser.parse_args(argv)

opts = CIOptions(cxx=Path(args.cxx), toolchain=args.toolchain)
opts = CIOptions(
cxx=Path(args.cxx),
toolchain=args.toolchain,
toolchain_2=args.toolchain_2)

if args.bootstrap_with == 'build':
_do_bootstrap_build(opts)
@@ -87,14 +97,6 @@ def main(argv: Sequence[str]) -> int:
else:
assert False, 'impossible'

proc.check_run(
paths.PREBUILT_DDS,
'deps',
'build',
('-T', opts.toolchain),
('--repo-dir', paths.EMBEDDED_REPO_DIR),
)

proc.check_run(
paths.PREBUILT_DDS,
'build',
@@ -106,9 +108,21 @@ def main(argv: Sequence[str]) -> int:

if paths.SELF_TEST_REPO_DIR.exists():
shutil.rmtree(paths.SELF_TEST_REPO_DIR)

self_deps_get(paths.CUR_BUILT_DDS, paths.SELF_TEST_REPO_DIR)
self_deps_build(paths.CUR_BUILT_DDS, opts.toolchain_2,
paths.SELF_TEST_REPO_DIR,
paths.PROJECT_ROOT / 'remote.dds')
proc.check_run(
paths.CUR_BUILT_DDS,
'build',
'--full',
'-T',
opts.toolchain_2,
('--lm-index', paths.BUILD_DIR / 'INDEX.lmi'),
)

return pytest.main(['-v', '--durations=10'])
return pytest.main(['-v', '--durations=10', '-n4'])


if __name__ == "__main__":

+ 6
- 0
tools/gcc-8.p2.dds View File

@@ -0,0 +1,6 @@
Compiler-ID: GNU
C++-Version: C++17
C++-Compiler: g++-8
Flags: -fconcepts -Werror=return-type
Flags: -D SPDLOG_COMPILED_LIB
Optimize: True

+ 4
- 0
tools/msvc.p2.dds View File

@@ -0,0 +1,4 @@
Compiler-ID: MSVC
Flags: /experimental:preprocessor /D SPDLOG_COMPILED_LIB /wd5105 /std:c++latest
Link-Flags: rpcrt4.lib
Optimize: True

Loading…
Cancel
Save