diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 790ca5d2f..87df191a7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,12 +67,8 @@ jobs: build-linux: needs: [get_python_versions] - name: Build ${{ matrix.arch }} 🎡 and source 📦 on Linux - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - arch: [ auto64, aarch64 ] + name: Build x86_64 🎡 and source 📦 on Linux + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: @@ -85,12 +81,7 @@ jobs: - name: Build source tarball run: | python -m pip install --upgrade pip build - python -m build --sdist --config-setting=--formats=gztar --config-setting=--with-cython --config-setting=--fail-on-error - if: ${{ matrix.arch == 'auto64' }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: all + python -m build --sdist --config-setting=--formats=gztar --config-setting=--with-cython --config-setting=--fail-on-error - name: Install platformdirs run: python -m pip install platformdirs - name: Display cibuildwheel cache dir @@ -111,8 +102,52 @@ jobs: uses: pypa/cibuildwheel@v2.22.0 env: CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ needs.get_python_versions.outputs.min-python }}" - CIBW_ARCHS_LINUX: ${{ matrix.arch }} + CIBW_ARCHS_LINUX: auto64 CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py + CIBW_TEST_REQUIRES: pytest + with: + output-dir: dist + - name: store distribution 📦 + uses: actions/upload-artifact@v4 + with: + name: packages-linux-auto64 + path: dist + + build-linux-arm: + needs: [get_python_versions] + name: Build aarch64 🎡 on Linux + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - name: Set up Python 3.x + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install platformdirs + run: python -m pip install platformdirs + - name: Display cibuildwheel cache dir + id: cibuildwheel-cache + run: | + from platformdirs import user_cache_path + import os + + with open(os.getenv('GITHUB_OUTPUT'), 'w') as f: + f.write(f"dir={str(user_cache_path(appname='cibuildwheel', appauthor='pypa'))}") + shell: python + - name: Cache cibuildwheel tools + uses: actions/cache@v4 + with: + path: ${{ steps.cibuildwheel-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.arch }}-cibuildwheel + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_PROJECT_REQUIRES_PYTHON: ">=${{ needs.get_python_versions.outputs.min-python }}" + CIBW_ARCHS_LINUX: aarch64 CIBW_SKIP: 'pp* *-musllinux_aarch64' CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py CIBW_TEST_REQUIRES: pytest @@ -121,7 +156,7 @@ jobs: - name: store distribution 📦 uses: actions/upload-artifact@v4 with: - name: packages-linux-${{ matrix.arch }} + name: packages-linux-aarch64 path: dist deploy_dev: