Run each build using docker exec, for faster builds
This commit is contained in:
@@ -100,11 +100,13 @@ def build(project_dir, output_dir, test_command, before_test, test_requires, tes
|
|||||||
'--name', container_name,
|
'--name', container_name,
|
||||||
'-i',
|
'-i',
|
||||||
'-v', '/:/host', # ignored on CircleCI
|
'-v', '/:/host', # ignored on CircleCI
|
||||||
docker_image, '/bin/bash'], check=True)
|
docker_image], check=True)
|
||||||
subprocess.run(['docker', 'cp',
|
subprocess.run(['docker', 'cp',
|
||||||
os.path.abspath(project_dir) + '/.',
|
os.path.abspath(project_dir) + '/.',
|
||||||
container_name + ':/project'], check=True)
|
container_name + ':/project'], check=True)
|
||||||
|
|
||||||
|
subprocess.run(['docker', 'start', container_name])
|
||||||
|
|
||||||
for config in platform_configs:
|
for config in platform_configs:
|
||||||
if dependency_constraints:
|
if dependency_constraints:
|
||||||
constraints_file = dependency_constraints.get_for_python_version(config.version)
|
constraints_file = dependency_constraints.get_for_python_version(config.version)
|
||||||
@@ -113,7 +115,7 @@ def build(project_dir, output_dir, test_command, before_test, test_requires, tes
|
|||||||
container_name + ':/constraints.txt'], check=True)
|
container_name + ':/constraints.txt'], check=True)
|
||||||
|
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['docker', 'start', '-i', '-a', container_name],
|
['docker', 'exec', '-i', container_name, '/bin/bash'],
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
check=True,
|
check=True,
|
||||||
input='''
|
input='''
|
||||||
|
|||||||
Reference in New Issue
Block a user