From ce23139d4ff92270f3155718ebb03e58b26f5239 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Sat, 1 Feb 2025 23:38:17 +0100 Subject: [PATCH] Create more musllinux wheels (#800) --- .github/workflows/ci.yml | 15 ++++++++++++--- ci/Dockerfile.alpine | 11 ++++++++--- tests/test_map.py | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9face7ae1..2b09b6a3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -258,7 +258,7 @@ jobs: build-test-musl: name: Musllinux ${{ matrix.platform.target }} ${{ matrix.python-version }} - runs-on: ubuntu-latest + runs-on: ${{ matrix.platform.os || 'ubuntu-latest' }} needs: - info - tests @@ -268,8 +268,16 @@ jobs: platform: - target: x86_64 docker_arch: amd64 - # - target: aarch64 - # docker_arch: arm64 + - target: aarch64 + docker_arch: arm64 + os: ubuntu-24.04-arm + - target: armv7 + docker_arch: arm/v7 + os: ubuntu-24.04-arm + qemu: true + - target: x86 + docker_arch: 386 + qemu: true python-version: ${{ fromJSON(needs.info.outputs.python_versions) }} steps: - uses: actions/checkout@v4 @@ -297,6 +305,7 @@ jobs: with: name: requirements-test.txt - name: Install Qemu + if: ${{ matrix.platform.qemu || false }} uses: docker/setup-qemu-action@v3 - name: Install Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/ci/Dockerfile.alpine b/ci/Dockerfile.alpine index 516cb5c22..a6a7ff568 100644 --- a/ci/Dockerfile.alpine +++ b/ci/Dockerfile.alpine @@ -2,7 +2,8 @@ ARG PYTHON_VERSION=3 FROM python:${PYTHON_VERSION}-alpine ENV \ - UV_SYSTEM_PYTHON=true + UV_SYSTEM_PYTHON=true \ + UV_EXTRA_INDEX_URL="https://wheels.home-assistant.io/musllinux-index/" ENTRYPOINT [ "/entrypoint.sh" ] SHELL ["/bin/sh", "-o", "pipefail", "-c"] @@ -10,9 +11,13 @@ SHELL ["/bin/sh", "-o", "pipefail", "-c"] COPY ci/entrypoint.sh /entrypoint.sh # Install uv -COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv +ADD https://astral.sh/uv/install.sh /uv-installer.sh +RUN \ + sh /uv-installer.sh \ + && rm /uv-installer.sh \ + && mv /root/.local/bin/uv /bin/uv COPY requirements-test.txt /requirements-test.txt RUN \ - uv pip install -r /requirements-test.txt \ No newline at end of file + uv pip install --index-strategy unsafe-best-match -r /requirements-test.txt \ No newline at end of file diff --git a/tests/test_map.py b/tests/test_map.py index 8a9d6008c..bc1e0d5c2 100644 --- a/tests/test_map.py +++ b/tests/test_map.py @@ -44,7 +44,7 @@ async def test_MapData(event_bus: EventBus) -> None: map_data = MapData(event_bus) async def test_cycle() -> None: - for x in range(10000): + for x in range(100): map_data.positions.append(Position(PositionType.DEEBOT, x, x, 0)) map_data.rooms[x] = Room("test", x, "1,2")