From e1f75d639c31992f504b45e61a260b1e8e736759 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sat, 31 Oct 2020 19:30:27 +0100 Subject: [PATCH] Add OSX --- .gitlab-ci.yml | 31 +++++++++++++++++++++++++++++++ Tools/build.py | 21 +++++++++++++-------- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c35037e6..4d28787d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,6 +45,37 @@ build:windows_release: paths: - build-x64-windows-release/bin/ + +build:osx_debug: + stage: build + allow_failure: true + tags: + - osx + needs: + - check + script: + - cd Tools + - python build.py -t debug + artifacts: + expire_in: '4 weeks' + paths: + - build-x64-osx-debug/bin/ + +build:osx_debug: + stage: build + allow_failure: true + tags: + - osx + needs: + - check + script: + - cd Tools + - python build.py -t release + artifacts: + expire_in: '4 weeks' + paths: + - build-x64-osx-release/bin/ + build:linux_debug: stage: build allow_failure: true diff --git a/Tools/build.py b/Tools/build.py index c6a3f295..a3b77ee6 100644 --- a/Tools/build.py +++ b/Tools/build.py @@ -49,20 +49,21 @@ if platform == "win32": os.environ.update(dict) cmake_prefix_path = "c:/Qt/" + qt_version + "/" + windows_msvc cmake_target_triplet = "x64-windows" - os.system("install_dependencies_windows.bat") + os.system("Tools/install_dependencies_windows.bat") elif platform == "darwin": - cmake_prefix_path = "~/Qt/" + cmake_prefix_path = "~/Qt/" + qt_version "/clang_64" deploy_executable = "macdeployqt" cmake_target_triplet = "x64-osx" - os.system("chmod +x install_dependencies_linux_mac.sh") - os.system("install_dependencies_linux_mac.sh") + print("Executing install_dependencies_linux_mac.sh") + os.system("chmod +x Tools/install_dependencies_linux_mac.sh") + os.system("Tools/install_dependencies_linux_mac.sh") elif platform == "linux": - # Windows... deploy_executable = "linuxdeployqt" cmake_prefix_path = "~/Qt/" cmake_target_triplet = "x64-linux" - os.system("chmod +x install_dependencies_linux_mac.sh") - os.system("install_dependencies_linux_mac.sh") + print("Executing install_dependencies_linux_mac.sh") + os.system("chmod +x Tools/install_dependencies_linux_mac.sh") + os.system("Tools/install_dependencies_linux_mac.sh") # REMOVE OLD BUILD FOLDER cwd = os.getcwd() @@ -96,7 +97,11 @@ cmake_configure_command = """cmake ../ print("cmake_configure_command: %s" % cmake_configure_command) -os.system(cmake_configure_command) +process = subprocess.run(cmake_configure_command, capture_output=True) + +if process.returncode != 0: + sys.exit(process.returncode) + os.system("cmake --build . --target all") os.chdir("bin")