diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1688793bdc..d4e7a17444 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,7 @@ experimental_i: except: - tags script: - - PYTHONPATH="$PYTHONPATH:/darwin-containers" python3 build-system/Make/Make.py remote-build --darwinContainersHost="http://host.docker.internal:8650" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath=build-system/appstore-configuration.json --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=appstore --configuration=release_arm64 + - PYTHONPATH="$PYTHONPATH:/darwin-containers" python3 -u build-system/Make/Make.py remote-build --darwinContainersHost="http://host.docker.internal:8650" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath=build-system/appstore-configuration.json --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=appstore --configuration=release_arm64 environment: name: experimental artifacts: diff --git a/build-system/Make/BuildEnvironment.py b/build-system/Make/BuildEnvironment.py index 1f78fe7edd..db75c30f5e 100644 --- a/build-system/Make/BuildEnvironment.py +++ b/build-system/Make/BuildEnvironment.py @@ -28,7 +28,7 @@ def resolve_executable(program): return None -def run_executable_with_output(path, arguments, decode=True, input=None, stderr_to_stdout=True, check_result=False): +def run_executable_with_output(path, arguments, decode=True, input=None, stderr_to_stdout=True, print_command=False, check_result=False): executable_path = resolve_executable(path) if executable_path is None: raise Exception('Could not resolve {} to a valid executable file'.format(path)) @@ -37,6 +37,9 @@ def run_executable_with_output(path, arguments, decode=True, input=None, stderr_ if stderr_to_stdout: stderr_assignment = subprocess.STDOUT + if print_command: + print('Running {} {}'.format(executable_path, arguments)) + process = subprocess.Popen( [executable_path] + arguments, stdout=subprocess.PIPE, diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index ba7eed35b9..2443143251 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -554,7 +554,7 @@ def build(bazel, arguments): bazel_command_line.invoke_build() if arguments.outputBuildArtifactsPath is not None: - artifacts_path = arguments.outputBuildArtifactsPath + artifacts_path = os.path.abspath(arguments.outputBuildArtifactsPath) if os.path.exists(artifacts_path + '/Telegram.ipa'): os.remove(path) if os.path.exists(artifacts_path + '/DSYMs'): @@ -574,13 +574,15 @@ def build(bazel, arguments): dsym_paths = glob.glob('bazel-out/applebin_ios-ios_arm*-opt-ST-*/bin/Telegram/*.dSYM') for dsym_path in dsym_paths: file_name = os.path.basename(dsym_path) - shutil.copyfile(ipa_paths[0], artifacts_path + '/DSYMs/{}'.format(file_name)) + shutil.copytree(dsym_path, artifacts_path + '/DSYMs/{}'.format(file_name)) + previous_directory = os.getcwd() + os.chdir(artifacts_path) run_executable_with_output('zip', arguments=[ - '-9', '-r', - artifacts_path + '/Telegram.DSYMs.zip', - artifacts_path + '/DSYMs' + 'Telegram.DSYMs.zip', + './DSYMs' ], check_result=True) + os.chdir(previous_directory) shutil.rmtree(artifacts_path + '/DSYMs')