Skip to content

Commit c2fb7d1

Browse files
committed
have common cross platform compose file
1 parent d4ed2e8 commit c2fb7d1

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docker/compose/ci/stages/dev/compose.windows.x86_64.yml renamed to docker/compose/ci/stages/dev/compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ include:
88
- build/compose.yml
99
- cpack/compose.yml
1010
project_directory: .
11-
env_file: ../.env/platform/windows/.env
11+
env_file: ../.env/platform/${THIS_PROJECT_PLATFORM}/.env

docker/dev.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ def main():
3535
if subprocess.call(["docker", "volume", "inspect", "ssh"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) != 0:
3636
subprocess.run(["docker", "volume", "create", "ssh"], check=True) # create ssh volume if not present
3737

38+
envFile = os.path.abspath("../.env/platform/{platform}/.env")
39+
3840
compose = [
3941
"docker", "compose",
40-
"-f", f"./compose.{platform}.{arch}.yml",
41-
"--env-file", "../.env/platform/windows/.env"
42+
"-f", f"./compose.yml",
43+
"--env-file", envFile
4244
]
4345

4446
subprocess.run(compose + ["build"], check=True)

docker/scripts/nbl/ci/dev/build.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
def parseInputArguments():
55
parser = argparse.ArgumentParser(description="Nabla CI Pipeline nbl.ci.dev.build Framework Module")
66

7-
parser.add_argument("--target-project-directory", help="Build Target project's directory path, relative to top build directory", type=str, default="")
87
parser.add_argument("--config", help="Target CMake configuration", type=str, default="Release")
98
parser.add_argument("--libType", help="Target library type", type=str, default="dynamic")
109

@@ -30,7 +29,9 @@ def main():
3029

3130
if not THIS_PROJECT_NABLA_DIRECTORY:
3231
raise ValueError("THIS_PROJECT_NABLA_DIRECTORY environment variables doesn't exist!")
33-
32+
33+
THIS_SERVICE_BINARY_PROJECT_PATH = os.environ.get('THIS_SERVICE_BINARY_PROJECT_PATH', '')
34+
3435
os.chdir(THIS_PROJECT_NABLA_DIRECTORY)
3536

3637
args = parseInputArguments()
@@ -39,7 +40,7 @@ def main():
3940
libType = args.libType
4041

4142
topBuildDirectory = os.path.normpath(os.path.join(THIS_PROJECT_NABLA_DIRECTORY, f"build/{libType}"))
42-
targetBuildDirectory = os.path.normpath(os.path.join(topBuildDirectory, args.target_project_directory))
43+
targetBuildDirectory = os.path.normpath(os.path.join(topBuildDirectory, THIS_SERVICE_BINARY_PROJECT_PATH))
4344

4445
if topBuildDirectory == targetBuildDirectory:
4546
buildNabla(libType, config)

0 commit comments

Comments
 (0)