Browse Source

New bootstrap phase based on alpha.3

default_compile_flags
vector-of-bool 4 years ago
parent
commit
d0248b2c80
4 changed files with 15 additions and 24 deletions
  1. +5
    -6
      Makefile
  2. +1
    -0
      tools/bootstrap.py
  3. +3
    -3
      tools/build.py
  4. +6
    -15
      tools/ci.py

+ 5
- 6
Makefile View File

@@ -36,18 +36,17 @@ linux-ci: nix-ci

nix-ci:
python3 -u tools/ci.py \
-B build \
-T tools/gcc-9.dds \
-T2 tools/gcc-9.jsonc
-B download \
-T tools/gcc-9.jsonc

vagrant-freebsd-ci:
vagrant up freebsd11
vagrant rsync
vagrant ssh freebsd11 -c '\
cd /vagrant && \
python3.7 tools/ci.py \
-B build \
-T tools/freebsd-gcc-9.dds \
-T2 tools/freebsd-gcc-9.jsonc \
-B download \
-T tools/freebsd-gcc-9.jsonc \
'
vagrant scp freebsd11:/vagrant/_build/dds _build/dds-freebsd-x64
vagrant halt

+ 1
- 0
tools/bootstrap.py View File

@@ -24,6 +24,7 @@ BOOTSTRAP_PHASES = [
BootstrapPhase('bootstrap-p1.2', 'g++-8', 'cl.exe'),
BootstrapPhase('bootstrap-p4.2', 'g++-8', 'cl.exe'),
BootstrapPhase('bootstrap-p5.2', 'g++-9', 'cl.exe'),
BootstrapPhase('0.1.0-alpha.3', 'g++-9', 'cl.exe'),
]

HERE = Path(__file__).parent.absolute()

+ 3
- 3
tools/build.py View File

@@ -32,11 +32,11 @@ def main(argv: Sequence[str]) -> int:

print(f'Using previously built DDS executable: {dds_exe}')
if os.name == 'nt':
tc_fpath = ROOT / 'tools/msvc.dds'
tc_fpath = ROOT / 'tools/msvc.jsonc'
elif sys.platform.startswith('freebsd'):
tc_fpath = ROOT / 'tools/freebsd-gcc-9.dds'
tc_fpath = ROOT / 'tools/freebsd-gcc-9.jsonc'
else:
tc_fpath = ROOT / 'tools/gcc-9.dds'
tc_fpath = ROOT / 'tools/gcc-9.jsonc'

self_build(dds_exe, toolchain=str(tc_fpath))


+ 6
- 15
tools/ci.py View File

@@ -14,7 +14,6 @@ from dds_ci import paths, proc

class CIOptions(NamedTuple):
toolchain: str
toolchain_json5: str


def _do_bootstrap_build(opts: CIOptions) -> None:
@@ -31,11 +30,13 @@ def _do_bootstrap_download() -> None:
'win32': 'dds-win-x64.exe',
'linux': 'dds-linux-x64',
'darwin': 'dds-macos-x64',
'freebsd11': 'dds-freebsd-x64',
'freebsd12': 'dds-freebsd-x64',
}.get(sys.platform)
if filename is None:
raise RuntimeError(f'We do not have a prebuilt DDS binary for '
f'the "{sys.platform}" platform')
url = f'https://github.com/vector-of-bool/dds/releases/download/0.0.1/{filename}'
url = f'https://github.com/vector-of-bool/dds/releases/download/0.1.0-alpha.3/{filename}'

print(f'Downloading prebuilt DDS executable: {url}')
stream = urllib.request.urlopen(url)
@@ -67,11 +68,7 @@ def main(argv: Sequence[str]) -> int:
'--toolchain',
'-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,
)
parser.add_argument(
'--build-only',
@@ -79,13 +76,7 @@ def main(argv: Sequence[str]) -> int:
help='Only build the `dds` executable. Skip second-phase and tests.')
args = parser.parse_args(argv)

if not args.build_only and not args.toolchain_json5:
raise RuntimeError(
'The --toolchain-json5/-T2 argument is required (unless using --build-only)'
)

opts = CIOptions(
toolchain=args.toolchain, toolchain_json5=args.toolchain_json5)
opts = CIOptions(toolchain=args.toolchain)

if args.bootstrap_with == 'build':
_do_bootstrap_build(opts)
@@ -140,7 +131,7 @@ def main(argv: Sequence[str]) -> int:
])
self_build(
paths.CUR_BUILT_DDS,
toolchain=opts.toolchain_json5,
toolchain=opts.toolchain,
dds_flags=[f'--repo-dir={ci_repo_dir}', f'--catalog={cat_path}'])
print('Bootstrap test PASSED!')


Loading…
Cancel
Save