- Improved the GitHub python binding workflow: (#2072)
- Added fullMode input in workflow_dispatch
- Take decision whether to build either in debug or release mode and if to build for all python versions according to the commit message patterns
- Set proper artifact names
- Removed not needed steps
- Compacted some steps in order to leverage more the matrix feature
- Bumped cibuildwheel action to 2.22.0
- Run actual regress tests in place of sample scripts
- Specify optional test install in pyproject.toml with proper requirements
- Derive package version from git tags
- Add GENERATORS env var support in setup.py to specify cmake generator and minor refactoring
- Minor cleanup/refactoring for the regress test suite
- Marked some regress tests with skipIf to skip them in case of old python versions
- Marked some failing regress tests to be checked with skipIf
This commit is contained in:
@@ -102,12 +102,17 @@ def build_libraries():
|
||||
|
||||
has_msbuild = shutil.which('msbuild') is not None
|
||||
conf = 'Debug' if int(os.getenv('DEBUG', 0)) else 'Release'
|
||||
cmake_args = ['cmake', '-B', BUILD_DIR, "-DCMAKE_BUILD_TYPE=" + conf]
|
||||
if os.getenv("UNICORN_TRACER"):
|
||||
cmake_args += ["-DUNICORN_TRACER=on"]
|
||||
if conf == 'Debug':
|
||||
cmake_args += ["-DUNICORN_LOGGING=on"]
|
||||
|
||||
if has_msbuild and sys.platform == 'win32':
|
||||
generators = os.getenv('GENERATORS') or 'Visual Studio 16 2019'
|
||||
plat = 'Win32' if platform.architecture()[0] == '32bit' else 'x64'
|
||||
|
||||
subprocess.check_call(['cmake', '-B', BUILD_DIR, '-G', "Visual Studio 16 2019", "-A", plat,
|
||||
"-DCMAKE_BUILD_TYPE=" + conf], cwd=UC_DIR)
|
||||
cmake_args += ['-G', generators, "-A", plat]
|
||||
subprocess.check_call(cmake_args, cwd=UC_DIR)
|
||||
subprocess.check_call(['msbuild', 'unicorn.sln', '-m', '-p:Platform=' + plat, '-p:Configuration=' + conf],
|
||||
cwd=BUILD_DIR)
|
||||
|
||||
@@ -115,11 +120,7 @@ def build_libraries():
|
||||
shutil.copy(os.path.join(obj_dir, LIBRARY_FILE), LIBS_DIR)
|
||||
shutil.copy(os.path.join(obj_dir, STATIC_LIBRARY_FILE), LIBS_DIR)
|
||||
else:
|
||||
cmake_args = ["cmake", '-B', BUILD_DIR, '-S', UC_DIR, "-DCMAKE_BUILD_TYPE=" + conf]
|
||||
if os.getenv("TRACE"):
|
||||
cmake_args += ["-DUNICORN_TRACER=on"]
|
||||
if conf == "Debug":
|
||||
cmake_args += ["-DUNICORN_LOGGING=on"]
|
||||
cmake_args += ['-S', UC_DIR]
|
||||
subprocess.check_call(cmake_args, cwd=UC_DIR)
|
||||
threads = os.getenv("THREADS", "4")
|
||||
subprocess.check_call(["cmake", "--build", ".", "-j" + threads], cwd=BUILD_DIR)
|
||||
|
||||
Reference in New Issue
Block a user