diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9fb1e0..af4be9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,9 +53,16 @@ jobs: # 4. The event is specifically on the 'darvid/python-hyperscan' # repository AND the commit message contains '[build]'. if: > - (github.event_name != 'push' || github.repository == 'darvid/python-hyperscan') && - ((github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, vars.RELEASE_PR_BRANCH || 'create-pull-request'))) || - (github.repository == 'darvid/python-hyperscan' && contains(github.event.head_commit.message, '[build]')) + github.event_name == 'pull_request' || + github.event_name == 'workflow_dispatch' || + github.event_name == 'workflow_call' || + ( + github.event_name == 'push' && + ( + github.repository == 'darvid/python-hyperscan' || + contains(github.event.head_commit.message, '[build]') + ) + ) run: | echo "valid_event=true" >> "$GITHUB_OUTPUT" diff --git a/tests/test_threading.py b/tests/test_threading.py index 83bfe20..0807afa 100644 --- a/tests/test_threading.py +++ b/tests/test_threading.py @@ -1,4 +1,5 @@ import concurrent.futures +import sys import threading from typing import List, Tuple @@ -26,6 +27,8 @@ def test_shared_scratch_rejected_concurrent_scan(threaded_database): Hyperscan and Vectorscan require each concurrent scan to run against its own scratch space; sharing a scratch between threads is explicitly unsupported. """ + if not getattr(sys, "_is_gil_enabled", lambda: True)(): + pytest.skip("Scratch contention not observable under free-threaded CPython yet") db = threaded_database shared_scratch = hyperscan.Scratch(db)