Skip to content

Commit

Permalink
switching to windows-2019 builds due to microsoft/STL#4875
Browse files Browse the repository at this point in the history
  • Loading branch information
fakufaku committed Aug 7, 2024
1 parent 30b9369 commit 7fb15a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
#os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
#python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest]
python-version: [3.8, 3.9]
# switch temporarily to windows-2019 due to a breaking
# change making mutex constexpr
# a crash occurs if python and the extension are built
# with different versions
# over time, this should hopefully resolves itself
# ref: https://github.com/microsoft/STL/issues/4875
os: [ubuntu-latest, macos-13, macos-latest, windows-2019]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: 3.8
Expand Down
8 changes: 0 additions & 8 deletions pyroomacoustics/tests/test_build_rir.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,8 @@ def measure_runtime(dtype=np.float32, num_threads=4):
if __name__ == "__main__":
import matplotlib.pyplot as plt

print("frac del 1", flush=True)
test_fractional_delay(np.float32, 2e-2)
print("frac del 2", flush=True)
test_fractional_delay(np.float64, 2e-2)
print("del sum", flush=True)
test_delay_sum(np.float32, 1e-4)

for t, a, v in zip(times, alphas, visibilities):
Expand All @@ -333,17 +330,12 @@ def measure_runtime(dtype=np.float32, num_threads=4):
plt.plot(ir_cython, label="cython")
plt.legend()

print("short", flush=True)
test_short()
print("long", flush=True)
test_long()
print("errors", flush=True)
test_errors()

num_threads = os.cpu_count()
print("measure 1", flush=True)
measure_runtime(dtype=np.float32, num_threads=num_threads)
print("measure 2", flush=True)
measure_runtime(dtype=np.float64, num_threads=num_threads)

plt.show()
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ def cpp_flag(compiler):
class BuildExt(build_ext):
"""A custom build extension for adding compiler-specific options."""

# see https://github.com/microsoft/STL/issues/4875
c_opts = {
"msvc": ["/EHsc", "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"],
"msvc": ["/EHsc"],
"unix": [],
}

Expand Down

0 comments on commit 7fb15a5

Please sign in to comment.