From: Federico Caselli Date: Wed, 22 Jan 2025 20:00:41 +0000 (+0100) Subject: use arm runnes on linux instead of emulation X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f704fb682a0759454a474901b33e0b311044253;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git use arm runnes on linux instead of emulation Fixes: #12249 Change-Id: I4c56a10d09716aa5e1fc4a1688dbfdf7cfcfd2fb --- diff --git a/.github/workflows/create-wheels.yaml b/.github/workflows/create-wheels.yaml index c06cfe80b5..d087afe3c0 100644 --- a/.github/workflows/create-wheels.yaml +++ b/.github/workflows/create-wheels.yaml @@ -30,6 +30,7 @@ jobs: # TODO: macos-14 uses arm macs (only python 3.10+) - make arm wheel on it - "macos-13" - "ubuntu-22.04" + - "ubuntu-22.04-arm" linux_archs: # this is only meaningful on linux. windows and macos ignore exclude all but one arch - "aarch64" @@ -39,13 +40,17 @@ jobs: # create pure python build - os: ubuntu-22.04 wheel_mode: pure-python - python: "cp-311*" + python: "cp-312*" exclude: - os: "windows-2022" linux_archs: "aarch64" - os: "macos-13" linux_archs: "aarch64" + - os: "ubuntu-22.04" + linux_archs: "aarch64" + - os: "ubuntu-22.04-arm" + linux_archs: "x86_64" fail-fast: false @@ -65,11 +70,12 @@ jobs: (get-content pyproject.toml) | %{$_ -replace 'tag-build.?=.?"dev"',""} | set-content pyproject.toml # See details at https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation - - name: Set up QEMU on linux - if: ${{ runner.os == 'Linux' }} - uses: docker/setup-qemu-action@v3 - with: - platforms: all + # no longer needed since arm runners are now available + # - name: Set up QEMU on linux + # if: ${{ runner.os == 'Linux' }} + # uses: docker/setup-qemu-action@v3 + # with: + # platforms: all - name: Build compiled wheels if: ${{ matrix.wheel_mode == 'compiled' }} diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index f3ff016c4a..38e96b250b 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -20,13 +20,14 @@ permissions: jobs: run-test: - name: test-${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.architecture }}-${{ matrix.os }} + name: test-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.build-type }} runs-on: ${{ matrix.os }} strategy: # run this job using this matrix, excluding some combinations below. matrix: os: - "ubuntu-22.04" + - "ubuntu-22.04-arm" - "windows-latest" - "macos-latest" - "macos-13" @@ -51,6 +52,8 @@ jobs: pytest-args: "-k 'not test_autocommit_on and not test_turn_autocommit_off_via_default_iso_level and not test_autocommit_isolation_level'" - os: "ubuntu-22.04" pytest-args: "--dbdriver pysqlite --dbdriver aiosqlite" + - os: "ubuntu-22.04-arm" + pytest-args: "--dbdriver pysqlite --dbdriver aiosqlite" exclude: @@ -59,6 +62,11 @@ jobs: architecture: x86 - os: "ubuntu-22.04" architecture: arm64 + # linux-arm do not have x86 / x64 python + - os: "ubuntu-22.04-arm" + architecture: x86 + - os: "ubuntu-22.04-arm" + architecture: x64 # windows des not have arm64 python - os: "windows-latest" architecture: arm64 @@ -74,9 +82,11 @@ jobs: architecture: arm64 - os: "macos-13" architecture: x86 - # pypy does not have cext or x86 + # pypy does not have cext or x86 or arm on linux - python-version: "pypy-3.10" build-type: "cext" + - os: "ubuntu-22.04-arm" + python-version: "pypy-3.10" - os: "windows-latest" python-version: "pypy-3.10" architecture: x86 @@ -110,45 +120,6 @@ jobs: run: tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} continue-on-error: ${{ matrix.python-version == 'pypy-3.10' }} - run-test-arm64: - # Hopefully something native can be used at some point https://github.blog/changelog/2023-10-30-accelerate-your-ci-cd-with-arm-based-hosted-runners-in-github-actions/ - name: test-arm64-${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.os }} - runs-on: ubuntu-22.04 - strategy: - matrix: - python-version: - - cp39-cp39 - - cp310-cp310 - - cp311-cp311 - - cp312-cp312 - - cp313-cp313 - build-type: - - "cext" - - "nocext" - - fail-fast: false - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up emulation - run: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - - name: Run tests - uses: docker://quay.io/pypa/manylinux2014_aarch64 - with: - args: | - bash -c " - export PATH=/opt/python/${{ matrix.python-version }}/bin:$PATH && - python --version && - python -m pip install --upgrade pip && - pip install --upgrade tox setuptools && - pip list && - tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} - " - run-tox: name: ${{ matrix.tox-env }}-${{ matrix.python-version }} runs-on: ${{ matrix.os }}