diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8685b18..662f17c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,44 +44,41 @@ jobs: fail-fast: false matrix: info: - - { machine: 'ubuntu-20.04', python: '3.6', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.7', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.8', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.9', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.10', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.11', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'ubuntu-20.04', python: '3.12', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } - - { machine: 'windows-2022', python: '3.6', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.7', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.8', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.9', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.10', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.11', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'windows-2022', python: '3.12', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } - - { machine: 'macos-11', python: '3.6', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.7', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.8', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.9', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.10', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.11', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - { machine: 'macos-11', python: '3.12', pythonArchitecture: 'x64', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - # Add M1 powered runners when available - # https://github.com/jpy-consortium/jpy/issues/110 +# - { machine: 'ubuntu-20.04', python: '3.6', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.7', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.8', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.9', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.10', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.11', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'ubuntu-20.04', python: '3.12', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' } +# - { machine: 'windows-2022', python: '3.6', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.7', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.8', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.9', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.10', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.11', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } +# - { machine: 'windows-2022', python: '3.12', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' } + - { machine: 'macos-12', python: '3.6', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + - { machine: 'macos-12', python: '3.7', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + - { machine: 'macos-12', python: '3.11', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + - { machine: 'macos-12', python: '3.12', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.info.python }} - architecture: ${{ matrix.info.pythonArchitecture }} - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 id: setup-java with: - distribution: 'temurin' + distribution: 'zulu' java-version: '8' + - run: pip install --upgrade pip + - run: pip install --upgrade setuptools - run: ${{ matrix.info.cmd }} - uses: actions/upload-artifact@v3 @@ -90,35 +87,79 @@ jobs: path: dist/*.whl retention-days: 1 - bdist-wheels-linux-arm64: - runs-on: 'ubuntu-22.04' - steps: - - uses: actions/checkout@v3 + # https://github.com/actions/setup-python/issues/547 + # https://github.com/actions/python-versions/pull/114 + # https://github.com/actions/python-versions/pull/175 + # https://github.com/pypa/cibuildwheel/blob/v2.16.2/cibuildwheel/macos.py#L247-L260 + # Python 3.11+ has universal2 support + # https://github.com/actions/runner-images/issues/4133 + bdist-wheel-universal2-hack: + runs-on: ${{ matrix.info.machine }} + env: + _PYTHON_HOST_PLATFORM: macosx-11.0-universal2 + ARCHFLAGS: -arch arm64 -arch x86_64 + strategy: + fail-fast: false + matrix: + info: + - { machine: 'macos-12', python: '3.8', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + - { machine: 'macos-12', python: '3.9', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } + - { machine: 'macos-12', python: '3.10', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' } - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + steps: + - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.info.python }} - - name: Bake - uses: docker/bake-action@v3.1.0 + - uses: actions/setup-java@v4 + id: setup-java with: - files: .github/docker/docker-bake.hcl - pull: true - set: | - *.platform=linux/arm64/v8 - *.output=type=local,dest=/tmp/dist + distribution: 'zulu' + java-version: '8' + + - run: pip install --upgrade pip + - run: pip install --upgrade setuptools + - run: ${{ matrix.info.cmd }} - uses: actions/upload-artifact@v3 with: - name: bdist-wheels-linux-arm64 - path: /tmp/dist/*.whl + name: build-${{ matrix.info.python }}-${{ matrix.info.machine }}-${{ matrix.info.arch }} + path: dist/*.whl retention-days: 1 + +# bdist-wheels-linux-arm64: +# runs-on: 'ubuntu-22.04' +# steps: +# - uses: actions/checkout@v3 +# +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v2 +# +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v2 +# +# - name: Bake +# uses: docker/bake-action@v3.1.0 +# with: +# files: .github/docker/docker-bake.hcl +# pull: true +# set: | +# *.platform=linux/arm64/v8 +# *.output=type=local,dest=/tmp/dist +# +# - uses: actions/upload-artifact@v3 +# with: +# name: bdist-wheels-linux-arm64 +# path: /tmp/dist/*.whl +# retention-days: 1 + collect-artifacts: runs-on: ubuntu-22.04 - needs: ['sdist', 'bdist-wheel', 'bdist-wheels-linux-arm64'] +# needs: ['sdist', 'bdist-wheel', 'bdist-wheels-linux-arm64'] + needs: [ 'sdist', 'bdist-wheel', 'bdist-wheel-universal2-hack' ] steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 @@ -165,4 +206,4 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}