Skip to content
Open
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: 8 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
binary_name: stagehand-server-v3-linux-x64
output_path: src/stagehand/_sea/stagehand-linux-x64
wheel_platform_tag: manylinux2014_x86_64
- os: ubuntu-latest
binary_name: stagehand-server-v3-linux-arm64
output_path: src/stagehand/_sea/stagehand-linux-arm64
wheel_platform_tag: manylinux2014_aarch64
- os: macos-latest
binary_name: stagehand-server-v3-darwin-arm64
output_path: src/stagehand/_sea/stagehand-darwin-arm64
Expand All @@ -32,6 +36,10 @@ jobs:
binary_name: stagehand-server-v3-win32-x64.exe
output_path: src/stagehand/_sea/stagehand-win32-x64.exe
wheel_platform_tag: win_amd64
- os: windows-latest
binary_name: stagehand-server-v3-win32-arm64.exe
output_path: src/stagehand/_sea/stagehand-win32-arm64.exe
wheel_platform_tag: win_arm64

runs-on: ${{ matrix.os }}
permissions:
Expand Down
21 changes: 21 additions & 0 deletions tests/test_sea_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ def _load_download_binary_module():
download_binary = _load_download_binary_module()


@pytest.mark.parametrize(
("sys_platform", "machine", "expected"),
[
("linux", "aarch64", "stagehand-linux-arm64"),
("linux", "x86_64", "stagehand-linux-x64"),
("win32", "ARM64", "stagehand-win32-arm64.exe"),
("win32", "AMD64", "stagehand-win32-x64.exe"),
],
)
def test_default_binary_filename_matches_published_wheel(
monkeypatch: pytest.MonkeyPatch,
sys_platform: str,
machine: str,
expected: str,
) -> None:
monkeypatch.setattr(sea_binary.sys, "platform", sys_platform)
monkeypatch.setattr(sea_binary.platform, "machine", lambda: machine)

assert sea_binary.default_binary_filename() == expected


def test_resolve_binary_path_defaults_cache_version_to_package_version(
monkeypatch: pytest.MonkeyPatch,
tmp_path: Path,
Expand Down