Skip to content
Snippets Groups Projects
Commit 614f54e0 authored by calrama's avatar calrama
Browse files

[ci] add macos support

parent 18194ff2
Branches
No related tags found
No related merge requests found
Pipeline #35504 passed
......@@ -11,6 +11,9 @@ stages:
tags: [linux, docker]
image: git.imp.fu-berlin.de:5000/bioroboticslab/auto/ci/centos:latest
.macos:
tags: [macos, shell]
.windows:
tags: [windows, docker]
image: git.imp.fu-berlin.de:5000/bioroboticslab/auto/ci/windows:latest-devel
......@@ -59,6 +62,10 @@ stages:
extends: .centos
<<: *build_cpp
"build cpp: [macos]":
extends: .macos
<<: *build_cpp
"build cpp: [windows]":
extends: .windows
<<: *build_cpp
......@@ -81,6 +88,24 @@ stages:
variables:
<<: [*python39]
"build python: [macos, 3.7]":
extends: .macos
<<: *build_python
variables:
<<: [*python37]
"build python: [macos, 3.8]":
extends: .macos
<<: *build_python
variables:
<<: [*python38]
"build python: [macos, 3.9]":
extends: .macos
<<: *build_python
variables:
<<: [*python39]
"build python: [windows, 3.7]":
extends: .windows
<<: *build_python
......@@ -128,6 +153,12 @@ stages:
- "build cpp: [centos]"
<<: *package_cpp
"package cpp: [macos]":
extends: .macos
dependencies:
- "build cpp: [macos]"
<<: *package_cpp
"package cpp: [windows]":
extends: .windows
dependencies:
......@@ -152,6 +183,24 @@ stages:
- "build python: [centos, 3.9]"
<<: *package_python
"package python: [macos, 3.7]":
extends: .macos
dependencies:
- "build python: [macos, 3.7]"
<<: *package_python
"package python: [macos, 3.8]":
extends: .macos
dependencies:
- "build python: [macos, 3.8]"
<<: *package_python
"package python: [macos, 3.9]":
extends: .macos
dependencies:
- "build python: [macos, 3.9]"
<<: *package_python
"package python: [windows, 3.7]":
extends: .windows
dependencies:
......@@ -181,6 +230,9 @@ deploy python to staging:
- "package python: [centos, 3.7]"
- "package python: [centos, 3.8]"
- "package python: [centos, 3.9]"
- "package python: [macos, 3.7]"
- "package python: [macos, 3.8]"
- "package python: [macos, 3.9]"
- "package python: [windows, 3.7]"
- "package python: [windows, 3.8]"
- "package python: [windows, 3.9]"
......@@ -196,6 +248,9 @@ deploy python to production:
- "package python: [centos, 3.7]"
- "package python: [centos, 3.8]"
- "package python: [centos, 3.9]"
- "package python: [macos, 3.7]"
- "package python: [macos, 3.8]"
- "package python: [macos, 3.9]"
- "package python: [windows, 3.7]"
- "package python: [windows, 3.8]"
- "package python: [windows, 3.9]"
......
......@@ -48,6 +48,8 @@ if __name__ == "__main__":
os_name = "windows"
elif system() == "Linux":
os_name = "centos"
elif system() == "Darwin":
os_name = "macos"
else:
assert False
......
......@@ -11,7 +11,7 @@ from shutil import which
def python_executable():
if system() == "Windows":
return f"/Python{''.join(env['PYTHON_VERSION'].split('.'))}/python.exe"
elif system() == "Linux":
elif system() == "Linux" or system() == "Darwin":
return which(f"python{env['PYTHON_VERSION']}")
assert False
......@@ -28,9 +28,12 @@ if __name__ == "__main__":
"gmpxx.so.4",
"mpfr.so.4",
]
elif system() == "Darwin":
shared_libraries = []
else:
assert False
if len(shared_libraries) > 0:
env["INSTALL_SHARED_LIBRARIES"] = ";".join(shared_libraries)
env["CMAKE_PREFIX_PATH"] = str(Path("vendor").resolve())
......
......@@ -11,7 +11,7 @@ from shutil import which
def python_executable():
if system() == "Windows":
return f"/Python{''.join(env['PYTHON_VERSION'].split('.'))}/python.exe"
elif system() == "Linux":
elif system() == "Linux" or system() == "Darwin":
return which(f"python{env['PYTHON_VERSION']}")
assert False
......
......@@ -11,7 +11,7 @@ from shutil import which
def python_executable():
if system() == "Windows":
return f"/Python{''.join(env['PYTHON_VERSION'].split('.'))}/python.exe"
elif system() == "Linux":
elif system() == "Linux" or system() == "Darwin":
return which(f"python{env['PYTHON_VERSION']}")
assert False
......@@ -19,7 +19,7 @@ def python_executable():
def python_venv_executable():
if system() == "Windows":
return str(Path("python/.venv/Scripts/python.exe").resolve())
elif system() == "Linux":
elif system() == "Linux" or system() == "Darwin":
return str(Path("python/.venv/bin/python").resolve())
assert False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment