Skip to content

Commit

Permalink
Try 32-bit Windows builds. (#358)
Browse files Browse the repository at this point in the history
* Try 32-bit Windows builds.

* Update all.yml

* Update all.yml

* Disable external plugin tests on 32-bit systems.

* Disable non-32-bit-compatible tests.
  • Loading branch information
psobot authored Jul 22, 2024
1 parent ae541a5 commit 1c64da0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,13 @@ jobs:
- { os: windows-latest, build: pp37-win_amd64 }
- { os: windows-latest, build: pp38-win_amd64 }
- { os: windows-latest, build: pp39-win_amd64 }
- { os: windows-latest, build: cp36-win32 }
- { os: windows-latest, build: cp37-win32 }
- { os: windows-latest, build: cp38-win32 }
- { os: windows-latest, build: cp39-win32 }
- { os: windows-latest, build: cp310-win32 }
- { os: windows-latest, build: cp311-win32 }
- { os: windows-latest, build: cp312-win32 }
- { os: 'ubuntu-20.04', build: cp36-manylinux_x86_64 }
- { os: 'ubuntu-20.04', build: cp36-manylinux_aarch64 }
- { os: 'ubuntu-20.04', build: cp37-manylinux_x86_64 }
Expand Down Expand Up @@ -746,7 +753,7 @@ jobs:
CIBW_TEST_REQUIRES: -r test-requirements.txt
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: auto64 # Only support building 64-bit wheels. It's 2022!
CIBW_ARCHS_WINDOWS: auto # Allow 32-bit Windows builds
CIBW_ARCHS_LINUX: auto64 aarch64 # Useful for building linux images with Apple Silicon
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 # Support Apple Silicon
# on macOS and with Python 3.10: building NumPy from source fails without these options:
Expand Down
9 changes: 8 additions & 1 deletion tests/test_external_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import shutil
import signal
import subprocess
import sys
import threading
import time
from concurrent.futures import ThreadPoolExecutor
Expand Down Expand Up @@ -72,9 +73,11 @@
]

IS_TESTING_MUSL_LIBC_ON_CI = "musl" in os.getenv("CIBW_BUILD", "")
if IS_TESTING_MUSL_LIBC_ON_CI:
IS_64BIT = sys.maxsize > 2**32
if IS_TESTING_MUSL_LIBC_ON_CI or not IS_64BIT:
# We can't load any external plugins at all on musl libc (unless they don't require glibc,
# but I don't know of any that fit that description)
# We also can't load 64-bit plugins (the default) on 32-bit systems.
AVAILABLE_EFFECT_PLUGINS_IN_TEST_ENVIRONMENT = []
AVAILABLE_INSTRUMENT_PLUGINS_IN_TEST_ENVIRONMENT = []

Expand Down Expand Up @@ -242,6 +245,10 @@ def max_volume_of(x: np.ndarray) -> float:
IS_TESTING_MUSL_LIBC_ON_CI,
reason="External plugins are not officially supported without glibc.",
)
@pytest.mark.skipif(
not IS_64BIT,
reason="External plugins are not officially supported on 32-bit platforms.",
)
def test_at_least_one_plugin_is_available_for_testing():
assert AVAILABLE_EFFECT_PLUGINS_IN_TEST_ENVIRONMENT

Expand Down
2 changes: 2 additions & 0 deletions tests/test_io_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


import random
import sys
import threading
from concurrent.futures import ThreadPoolExecutor
from functools import lru_cache
Expand Down Expand Up @@ -160,6 +161,7 @@ def do_work(af, lock):
should_error.clear()


@pytest.mark.skipif(sys.maxsize <= 2**32, reason="This test OOMs on 32-bit platforms.")
@pytest.mark.parametrize("num_workers", [2, 4])
@pytest.mark.parametrize("locking_scheme", ["lock", "no lock"])
@pytest.mark.parametrize("raise_exceptions", [False, True])
Expand Down

0 comments on commit 1c64da0

Please sign in to comment.