aio-libs / aiohttp-sse

Server-sent events support for aiohttp
Other
192 stars 35 forks source link

Python 3.8, 3.9 testing on macOS isssue #489

Closed Olegt0rr closed 2 months ago

Olegt0rr commented 2 months ago

Upstream issue: https://github.com/actions/setup-python/issues/850

Result: The version '3.8' with architecture 'arm64' was not found for macOS 14.4.1. The version '3.9' with architecture 'arm64' was not found for macOS 14.4.1.

https://github.com/aio-libs/aiohttp-sse/actions/runs/8828949346/job/24238941613?pr=488

Screenshot 2024-04-25 at 11 09 57

Looks like it relates to many aio-libs repos

Olegt0rr commented 2 months ago

I researched some solutions

1. Fix macOS version

https://github.com/pyRiemann/pyRiemann/blob/master/.github/workflows/testing.yml

jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
        python-version:
          - '3.8'
          - '3.9'
          - '3.10'
          - '3.11'
          - '3.12'
       exclude:
       - { python-version: "3.8", os: "macos-latest" }
       - { python-version: "3.9", os: "macos-latest" }
       include:
       - { python-version: "3.8", os: "macos-13" }
       - { python-version: "3.9", os: "macos-13" }

2. Use brew

https://github.com/google/temporian/blob/main/.github/workflows/publish.yaml

build-macos-arm:
    runs-on: macos-13-xlarge
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Python
        run: |
          brew update
          brew install python@${{ matrix.python-version }}

      - name: Install pip
        run: |
          curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
          python${{ matrix.python-version }} get-pip.py
webknjaz commented 2 months ago

I ended up pinning to macos-13 elsewhere which allows postponing the solution. Haven't yet decided how to best handle multi-arch matrices. Technically, most pure-python projects don't really need to test against each arch.

Olegt0rr commented 2 months ago

Fixed

https://github.com/actions/setup-python/issues/850#issuecomment-2077454891