Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
- "pypy-3.9"
os: ["ubuntu-latest"]
include:
# - os: "macos-latest"
# python-version: 3.7
- os: "macos-latest"
python-version: 3.7
- os: "windows-latest"
python-version: 3.7
steps:
Expand All @@ -81,9 +81,7 @@ jobs:
uses: ilammy/[email protected]
if: runner.os == 'Windows'
- name: Install build dependencies (MacOS)
run: brew install ninja
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install make
if: runner.os == 'macOS'
- name: Run tests
run: tox
Expand Down
16 changes: 10 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ def build_zlib_ng():
build_env["CFLAGS"] = build_env.get("CFLAGS", "") + " -fPIC"
# Add -fPIC flag to allow static compilation
run_args = dict(cwd=build_dir, env=build_env)
subprocess.run(["cmake", build_dir], **run_args)
# Do not create test suite and do not perform tests to shorten build times.
# There is no need when stable releases of zlib-ng are used.
subprocess.run(["cmake", "--build", build_dir, "--config", "Release",
"--target", "zlibstatic",
"-j", str(cpu_count)], **run_args)
if sys.platform == "darwin": # Cmake does not work properly
subprocess.run([os.path.join(build_dir, "configure")], **run_args)
subprocess.run(["gmake", "libz-ng.a"], **run_args)
else:
subprocess.run(["cmake", build_dir], **run_args)
# Do not create test suite and do not perform tests to shorten build times.
# There is no need when stable releases of zlib-ng are used.
subprocess.run(["cmake", "--build", build_dir, "--config", "Release",
"--target", "zlibstatic",
"-j", str(cpu_count)], **run_args)
if BUILD_CACHE:
BUILD_CACHE_FILE.write_text(build_dir)
return build_dir
Expand Down