diff --git a/.github/workflows/build-act-wheels.yml b/.github/workflows/build-act-wheels.yml deleted file mode 100644 index b85f151a89..0000000000 --- a/.github/workflows/build-act-wheels.yml +++ /dev/null @@ -1,577 +0,0 @@ -name: build-act-wheels -'on': - workflow_dispatch: - inputs: - name: - type: string - description: Pkg to build (empty for all) - required: false - graalpy: - type: string - description: GraalPy download url prefix (empty for default) - required: false -jobs: - numpy-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-linux-amd64 - path: numpy*.whl - if-no-files-found: error - numpy-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-linux-aarch64 - path: numpy*.whl - if-no-files-found: error - numpy-macos-amd64: - runs-on: macos-12 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-macos-amd64 - path: numpy*.whl - if-no-files-found: error - numpy-macos-aarch64: - runs-on: macos-latest - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-macos-aarch64 - path: numpy*.whl - if-no-files-found: error - PyYAML-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: numpy-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-linux-amd64 - path: PyYAML*.whl - if-no-files-found: error - PyYAML-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: numpy-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-linux-aarch64 - path: PyYAML*.whl - if-no-files-found: error - PyYAML-macos-amd64: - runs-on: macos-12 - needs: numpy-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-macos-amd64 - path: PyYAML*.whl - if-no-files-found: error - PyYAML-macos-aarch64: - runs-on: macos-latest - needs: numpy-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-macos-aarch64 - path: PyYAML*.whl - if-no-files-found: error - PyYAML-windows-amd64: - runs-on: windows-latest - needs: numpy-windows-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - Invoke-WebRequest https://kumisystems.dl.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-bin.zip -OutFile patch.zip - Expand-Archive patch.zip -DestinationPath ../patch -Force - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest ${{ inputs.graalpy }}-windows-amd64.zip -OutFile graalpy-windows-amd64.zip - Expand-Archive graalpy-windows-amd64.zip - mv graalpy-windows-amd64/* graalpy - graalpy/bin/graalpy.exe -s -m ensurepip - graalpy/bin/graalpy.exe -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-windows-amd64 - - name: Build wheel - run: |- - $env:PIP_FIND_LINKS=$PWD - $env:PATH+=";$PWD\graalpy\bin;$PWD\graalpy\Scripts;$PWD\..\patch\bin" - graalpy/bin/graalpy -m pip wheel --find-links $PWD PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-windows-amd64 - path: PyYAML*.whl - if-no-files-found: error - ujson-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: PyYAML-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-linux-amd64 - path: ujson*.whl - if-no-files-found: error - ujson-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: PyYAML-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-linux-aarch64 - path: ujson*.whl - if-no-files-found: error - ujson-macos-amd64: - runs-on: macos-12 - needs: PyYAML-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-macos-amd64 - path: ujson*.whl - if-no-files-found: error - ujson-macos-aarch64: - runs-on: macos-latest - needs: PyYAML-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-macos-aarch64 - path: ujson*.whl - if-no-files-found: error diff --git a/.github/workflows/build-linux-aarch64-wheels.yml b/.github/workflows/build-linux-aarch64-wheels.yml index c5ab981b23..d35b84cbeb 100644 --- a/.github/workflows/build-linux-aarch64-wheels.yml +++ b/.github/workflows/build-linux-aarch64-wheels.yml @@ -2,946 +2,42 @@ name: build-linux-aarch64-wheels 'on': workflow_dispatch: inputs: - name: + packages: type: string - description: Pkg to build (empty for all) + description: Pkgs to build (comma-separated, empty for all) required: false - graalpy: + graalpy_url: type: string - description: GraalPy download url prefix (empty for default) - required: false + description: GraalPy download url + required: true jobs: - psutil-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'psutil') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) psutil - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: psutil-linux-aarch64 - path: psutil*.whl - if-no-files-found: error - numpy-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: psutil-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy' || inputs.name - == 'pandas' || inputs.name == 'contourpy' || inputs.name == 'matplotlib' || - inputs.name == 'scipy' || inputs.name == 'scikit-learn' || inputs.name == 'torch') - }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from psutil - uses: actions/download-artifact@main - continue-on-error: true - with: - name: psutil-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-linux-aarch64 - path: numpy*.whl - if-no-files-found: error - pandas-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: numpy-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pandas') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pandas - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pandas-linux-aarch64 - path: pandas*.whl - if-no-files-found: error - pybind11-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: pandas-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pybind11' || inputs.name - == 'contourpy' || inputs.name == 'kiwisolver' || inputs.name == 'torch' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pandas - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pandas-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pybind11 - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pybind11-linux-aarch64 - path: pybind11*.whl - if-no-files-found: error - ninja-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: pybind11-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ninja' || inputs.name - == 'contourpy' || inputs.name == 'torch' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ninja - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ninja-linux-aarch64 - path: ninja*.whl - if-no-files-found: error - pillow-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: ninja-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pillow' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel freetype-devel lcms2-devel libwebp-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pillow - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pillow-linux-aarch64 - path: pillow*.whl - if-no-files-found: error - contourpy-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - ninja-linux-aarch64 - - pybind11-linux-aarch64 - - numpy-linux-aarch64 - - pillow-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'contourpy' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-aarch64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-aarch64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) contourpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: contourpy-linux-aarch64 - path: contourpy*.whl - if-no-files-found: error - kiwisolver-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - pybind11-linux-aarch64 - - contourpy-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'kiwisolver' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-aarch64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) kiwisolver - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: kiwisolver-linux-aarch64 - path: kiwisolver*.whl - if-no-files-found: error - matplotlib-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - pillow-linux-aarch64 - - kiwisolver-linux-aarch64 - - numpy-linux-aarch64 - - contourpy-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-linux-aarch64 - - name: Download artifacts from kiwisolver - uses: actions/download-artifact@main - continue-on-error: true - with: - name: kiwisolver-linux-aarch64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) matplotlib - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: matplotlib-linux-aarch64 - path: matplotlib*.whl - if-no-files-found: error - scipy-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - numpy-linux-aarch64 - - matplotlib-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scipy' || inputs.name - == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Download artifacts from matplotlib - uses: actions/download-artifact@main - continue-on-error: true - with: - name: matplotlib-linux-aarch64 - - name: Build wheel - run: |- - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scipy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scipy-linux-aarch64 - path: scipy*.whl - if-no-files-found: error - scikit-learn-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - numpy-linux-aarch64 - - scipy-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Download artifacts from scipy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scipy-linux-aarch64 - - name: Build wheel - run: |- - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scikit-learn - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scikit-learn-linux-aarch64 - path: scikit*learn*.whl - if-no-files-found: error - cffi-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: scikit-learn-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cffi' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y libffi-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from scikit-learn - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scikit-learn-linux-aarch64 - - name: Build wheel - run: |- - graalpy/bin/graalpy -m pip install wheel - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cffi - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cffi-linux-aarch64 - path: cffi*.whl - if-no-files-found: error - PyYAML-linux-aarch64: + build_wheels: runs-on: - self-hosted - Linux - ARM64 container: quay.io/pypa/manylinux_2_28_aarch64 - needs: cffi-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-linux-aarch64 - path: PyYAML*.whl - if-no-files-found: error - cmake-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: PyYAML-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cmake' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cmake - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cmake-linux-aarch64 - path: cmake*.whl - if-no-files-found: error - ujson-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: cmake-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-linux-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-linux-aarch64 - path: ujson*.whl - if-no-files-found: error - torch-linux-aarch64: - runs-on: - - self-hosted - - Linux - - ARM64 - container: quay.io/pypa/manylinux_2_28_aarch64 - needs: - - numpy-linux-aarch64 - - ninja-linux-aarch64 - - cmake-linux-aarch64 - - pybind11-linux-aarch64 - - cffi-linux-aarch64 - - PyYAML-linux-aarch64 - - ujson-linux-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'torch') }} env: - MAX_JOBS: 4 - BUILD_TEST: 0 + PACKAGES_TO_BUILD: ${{ inputs.packages }} steps: - - uses: ilammy/msvc-dev-cmd@v1 - name: Install dependencies - run: |- + run: | dnf install -y epel-release crb enable dnf makecache --refresh dnf module install -y nodejs:18 dnf install -y /usr/bin/patch - dnf install -y openblas-devel /usr/bin/cmake /usr/bin/sudo libffi-devel - name: Checkout uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-aarch64 - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-aarch64 - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-linux-aarch64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-aarch64 - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-linux-aarch64 - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-aarch64 - - name: Download artifacts from ujson - uses: actions/download-artifact@main - continue-on-error: true with: - name: ujson-linux-aarch64 - - name: Build wheel - run: |- - export USE_CUDA=0 - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) torch + python-version: 3.12 + - name: Build wheels + run: python3 scripts/wheelbuilder/build_wheels.py ${{ inputs.graalpy_url }} - name: Store wheels uses: actions/upload-artifact@main with: - name: torch-linux-aarch64 - path: torch*.whl + name: wheels + path: wheelhouse/*.whl if-no-files-found: error diff --git a/.github/workflows/build-linux-amd64-wheels.yml b/.github/workflows/build-linux-amd64-wheels.yml index ee070f604b..9aab57bcbc 100644 --- a/.github/workflows/build-linux-amd64-wheels.yml +++ b/.github/workflows/build-linux-amd64-wheels.yml @@ -2,969 +2,24 @@ name: build-linux-amd64-wheels 'on': workflow_dispatch: inputs: - name: + packages: type: string - description: Pkg to build (empty for all) + description: Pkgs to build (comma-separated, empty for all) required: false - graalpy: + graalpy_url: type: string - description: GraalPy download url prefix (empty for default) - required: false + description: GraalPy download url + required: true jobs: - psutil-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'psutil' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) psutil - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: psutil-linux-amd64 - path: psutil*.whl - if-no-files-found: error - numpy-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: psutil-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy' || inputs.name - == 'pandas' || inputs.name == 'contourpy' || inputs.name == 'matplotlib' || - inputs.name == 'scipy' || inputs.name == 'scikit-learn' || inputs.name == 'torch' - || inputs.name == 'opt_einsum' || inputs.name == 'Keras_Preprocessing' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from psutil - uses: actions/download-artifact@main - continue-on-error: true - with: - name: psutil-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-linux-amd64 - path: numpy*.whl - if-no-files-found: error - pandas-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: numpy-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pandas') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pandas - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pandas-linux-amd64 - path: pandas*.whl - if-no-files-found: error - pybind11-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: pandas-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pybind11' || inputs.name - == 'contourpy' || inputs.name == 'kiwisolver' || inputs.name == 'torch' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pandas - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pandas-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pybind11 - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pybind11-linux-amd64 - path: pybind11*.whl - if-no-files-found: error - ninja-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: pybind11-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ninja' || inputs.name - == 'contourpy' || inputs.name == 'torch' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ninja - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ninja-linux-amd64 - path: ninja*.whl - if-no-files-found: error - pillow-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: ninja-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pillow' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel freetype-devel lcms2-devel libwebp-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pillow - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pillow-linux-amd64 - path: pillow*.whl - if-no-files-found: error - contourpy-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - ninja-linux-amd64 - - pybind11-linux-amd64 - - numpy-linux-amd64 - - pillow-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'contourpy' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-amd64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-amd64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) contourpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: contourpy-linux-amd64 - path: contourpy*.whl - if-no-files-found: error - kiwisolver-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - pybind11-linux-amd64 - - contourpy-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'kiwisolver' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-amd64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) kiwisolver - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: kiwisolver-linux-amd64 - path: kiwisolver*.whl - if-no-files-found: error - matplotlib-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - pillow-linux-amd64 - - kiwisolver-linux-amd64 - - numpy-linux-amd64 - - contourpy-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-linux-amd64 - - name: Download artifacts from kiwisolver - uses: actions/download-artifact@main - continue-on-error: true - with: - name: kiwisolver-linux-amd64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) matplotlib - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: matplotlib-linux-amd64 - path: matplotlib*.whl - if-no-files-found: error - scipy-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - numpy-linux-amd64 - - matplotlib-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scipy' || inputs.name - == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y gcc-toolset-12-gcc-gfortran openblas-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from matplotlib - uses: actions/download-artifact@main - continue-on-error: true - with: - name: matplotlib-linux-amd64 - - name: Build wheel - run: |- - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scipy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scipy-linux-amd64 - path: scipy*.whl - if-no-files-found: error - scikit-learn-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - numpy-linux-amd64 - - scipy-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from scipy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scipy-linux-amd64 - - name: Build wheel - run: |- - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scikit-learn - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scikit-learn-linux-amd64 - path: scikit*learn*.whl - if-no-files-found: error - cffi-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: scikit-learn-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cffi' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y libffi-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from scikit-learn - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scikit-learn-linux-amd64 - - name: Build wheel - run: |- - graalpy/bin/graalpy -m pip install wheel - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cffi - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cffi-linux-amd64 - path: cffi*.whl - if-no-files-found: error - PyYAML-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: cffi-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-linux-amd64 - path: PyYAML*.whl - if-no-files-found: error - cmake-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: PyYAML-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cmake' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cmake - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cmake-linux-amd64 - path: cmake*.whl - if-no-files-found: error - ujson-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: cmake-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-linux-amd64 - path: ujson*.whl - if-no-files-found: error - torch-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - numpy-linux-amd64 - - ninja-linux-amd64 - - cmake-linux-amd64 - - pybind11-linux-amd64 - - cffi-linux-amd64 - - PyYAML-linux-amd64 - - ujson-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'torch') }} + build_wheels: + runs-on: + - self-hosted + - Linux + - ARM64 + container: quay.io/pypa/manylinux_2_28_amd64 env: - MAX_JOBS: 4 - BUILD_TEST: 0 - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas-devel /usr/bin/cmake /usr/bin/sudo libffi-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-linux-amd64 - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-linux-amd64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-linux-amd64 - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-linux-amd64 - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-linux-amd64 - - name: Download artifacts from ujson - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ujson-linux-amd64 - - name: Build wheel - run: |- - export USE_CUDA=0 - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) torch - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: torch-linux-amd64 - path: torch*.whl - if-no-files-found: error - opt_einsum-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - numpy-linux-amd64 - - torch-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'opt_einsum' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from torch - uses: actions/download-artifact@main - continue-on-error: true - with: - name: torch-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) opt_einsum - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: opt_einsum-linux-amd64 - path: opt*einsum*.whl - if-no-files-found: error - Keras_Preprocessing-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - numpy-linux-amd64 - - opt_einsum-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'Keras_Preprocessing' - || inputs.name == 'tensorflow') }} + PACKAGES_TO_BUILD: ${{ inputs.packages }} steps: - - uses: ilammy/msvc-dev-cmd@v1 - name: Install dependencies run: | dnf install -y epel-release @@ -974,336 +29,15 @@ jobs: dnf install -y /usr/bin/patch - name: Checkout uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from opt_einsum - uses: actions/download-artifact@main - continue-on-error: true - with: - name: opt_einsum-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) Keras_Preprocessing - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: Keras_Preprocessing-linux-amd64 - path: Keras*Preprocessing*.whl - if-no-files-found: error - grpcio-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: Keras_Preprocessing-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'grpcio' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from Keras_Preprocessing - uses: actions/download-artifact@main - continue-on-error: true - with: - name: Keras_Preprocessing-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) grpcio - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: grpcio-linux-amd64 - path: grpcio*.whl - if-no-files-found: error - ml_dtypes-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: grpcio-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ml_dtypes' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from grpcio - uses: actions/download-artifact@main - continue-on-error: true - with: - name: grpcio-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ml_dtypes - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ml_dtypes-linux-amd64 - path: ml*dtypes*.whl - if-no-files-found: error - wrapt-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: ml_dtypes-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'wrapt' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ml_dtypes - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ml_dtypes-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) wrapt - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: wrapt-linux-amd64 - path: wrapt*.whl - if-no-files-found: error - h5py-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: wrapt-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'h5py' || inputs.name - == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y hdf5-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from wrapt - uses: actions/download-artifact@main - continue-on-error: true - with: - name: wrapt-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) h5py - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: h5py-linux-amd64 - path: h5py*.whl - if-no-files-found: error - tensorflow-linux-amd64: - runs-on: ubuntu-latest - container: quay.io/pypa/manylinux_2_28_x86_64 - needs: - - grpcio-linux-amd64 - - psutil-linux-amd64 - - wrapt-linux-amd64 - - ml_dtypes-linux-amd64 - - h5py-linux-amd64 - - numpy-linux-amd64 - - opt_einsum-linux-amd64 - - Keras_Preprocessing-linux-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'tensorflow') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: |- - dnf install -y epel-release - crb enable - dnf makecache --refresh - dnf module install -y nodejs:18 - dnf install -y /usr/bin/patch - dnf install -y openblas-devel /usr/bin/cmake /usr/bin/sudo /usr/bin/curl java-11-openjdk-devel - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-linux-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from grpcio - uses: actions/download-artifact@main - continue-on-error: true - with: - name: grpcio-linux-amd64 - - name: Download artifacts from psutil - uses: actions/download-artifact@main - continue-on-error: true - with: - name: psutil-linux-amd64 - - name: Download artifacts from wrapt - uses: actions/download-artifact@main - continue-on-error: true - with: - name: wrapt-linux-amd64 - - name: Download artifacts from ml_dtypes - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ml_dtypes-linux-amd64 - - name: Download artifacts from h5py - uses: actions/download-artifact@main - continue-on-error: true - with: - name: h5py-linux-amd64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-linux-amd64 - - name: Download artifacts from opt_einsum - uses: actions/download-artifact@main - continue-on-error: true - with: - name: opt_einsum-linux-amd64 - - name: Download artifacts from Keras_Preprocessing - uses: actions/download-artifact@main - continue-on-error: true with: - name: Keras_Preprocessing-linux-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - pip install pip numpy wheel packaging requests opt_einsum - pip install keras_preprocessing --no-deps - curl -L https://github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-linux-x86_64 -o $(pwd)/graalpy/bin/bazel - chmod +x graalpy/bin/bazel - export PATH=$(pwd)/graalpy/bin/:$PATH - bazel --version - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) tensorflow + python-version: 3.12 + - name: Build wheels + run: python3 scripts/wheelbuilder/build_wheels.py ${{ inputs.graalpy_url }} - name: Store wheels uses: actions/upload-artifact@main with: - name: tensorflow-linux-amd64 - path: tensorflow*.whl + name: wheels + path: wheelhouse/*.whl if-no-files-found: error diff --git a/.github/workflows/build-macos-aarch64-wheels.yml b/.github/workflows/build-macos-aarch64-wheels.yml index f69141f605..7275d62b62 100644 --- a/.github/workflows/build-macos-aarch64-wheels.yml +++ b/.github/workflows/build-macos-aarch64-wheels.yml @@ -1,782 +1,32 @@ -name: build-macos-aarch64-wheels +name: build-macos-amd64-wheels 'on': workflow_dispatch: inputs: - name: + packages: type: string - description: Pkg to build (empty for all) + description: Pkgs to build (comma-separated, empty for all) required: false - graalpy: + graalpy_url: type: string - description: GraalPy download url prefix (empty for default) - required: false + description: GraalPy download url + required: true jobs: - psutil-macos-aarch64: - runs-on: macos-latest - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'psutil') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) psutil - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: psutil-macos-aarch64 - path: psutil*.whl - if-no-files-found: error - numpy-macos-aarch64: - runs-on: macos-latest - needs: psutil-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy' || inputs.name - == 'pandas' || inputs.name == 'contourpy' || inputs.name == 'matplotlib' || - inputs.name == 'scipy' || inputs.name == 'scikit-learn' || inputs.name == 'torch') - }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from psutil - uses: actions/download-artifact@main - continue-on-error: true - with: - name: psutil-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-macos-aarch64 - path: numpy*.whl - if-no-files-found: error - pandas-macos-aarch64: - runs-on: macos-latest - needs: numpy-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pandas') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pandas - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pandas-macos-aarch64 - path: pandas*.whl - if-no-files-found: error - pybind11-macos-aarch64: - runs-on: macos-latest - needs: pandas-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pybind11' || inputs.name - == 'contourpy' || inputs.name == 'kiwisolver' || inputs.name == 'torch' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pandas - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pandas-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pybind11 - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pybind11-macos-aarch64 - path: pybind11*.whl - if-no-files-found: error - ninja-macos-aarch64: - runs-on: macos-latest - needs: pybind11-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ninja' || inputs.name - == 'contourpy' || inputs.name == 'torch' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ninja - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ninja-macos-aarch64 - path: ninja*.whl - if-no-files-found: error - pillow-macos-aarch64: - runs-on: macos-latest - needs: ninja-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pillow' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install libjpeg libtiff little-cms2 openjpeg webp - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pillow - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pillow-macos-aarch64 - path: pillow*.whl - if-no-files-found: error - contourpy-macos-aarch64: - runs-on: macos-latest - needs: - - ninja-macos-aarch64 - - pybind11-macos-aarch64 - - numpy-macos-aarch64 - - pillow-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'contourpy' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-aarch64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-aarch64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) contourpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: contourpy-macos-aarch64 - path: contourpy*.whl - if-no-files-found: error - kiwisolver-macos-aarch64: - runs-on: macos-latest - needs: - - pybind11-macos-aarch64 - - contourpy-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'kiwisolver' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-aarch64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) kiwisolver - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: kiwisolver-macos-aarch64 - path: kiwisolver*.whl - if-no-files-found: error - matplotlib-macos-aarch64: - runs-on: macos-latest - needs: - - pillow-macos-aarch64 - - kiwisolver-macos-aarch64 - - numpy-macos-aarch64 - - contourpy-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-macos-aarch64 - - name: Download artifacts from kiwisolver - uses: actions/download-artifact@main - continue-on-error: true - with: - name: kiwisolver-macos-aarch64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) matplotlib - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: matplotlib-macos-aarch64 - path: matplotlib*.whl - if-no-files-found: error - scipy-macos-aarch64: - runs-on: macos-latest - needs: - - numpy-macos-aarch64 - - matplotlib-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scipy' || inputs.name - == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas pkg-config - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Download artifacts from matplotlib - uses: actions/download-artifact@main - continue-on-error: true - with: - name: matplotlib-macos-aarch64 - - name: Build wheel - run: |- - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scipy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scipy-macos-aarch64 - path: scipy*.whl - if-no-files-found: error - scikit-learn-macos-aarch64: - runs-on: macos-latest - needs: - - numpy-macos-aarch64 - - scipy-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Download artifacts from scipy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scipy-macos-aarch64 - - name: Build wheel - run: |- - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scikit-learn - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scikit-learn-macos-aarch64 - path: scikit*learn*.whl - if-no-files-found: error - cffi-macos-aarch64: - runs-on: macos-latest - needs: scikit-learn-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cffi' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install libffi - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from scikit-learn - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scikit-learn-macos-aarch64 - - name: Build wheel - run: |- - graalpy/bin/graalpy -m pip install wheel - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cffi - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cffi-macos-aarch64 - path: cffi*.whl - if-no-files-found: error - PyYAML-macos-aarch64: - runs-on: macos-latest - needs: cffi-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-macos-aarch64 - path: PyYAML*.whl - if-no-files-found: error - cmake-macos-aarch64: - runs-on: macos-latest - needs: PyYAML-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cmake' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cmake - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cmake-macos-aarch64 - path: cmake*.whl - if-no-files-found: error - ujson-macos-aarch64: - runs-on: macos-latest - needs: cmake-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-macos-aarch64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-macos-aarch64 - path: ujson*.whl - if-no-files-found: error - torch-macos-aarch64: - runs-on: macos-latest - needs: - - numpy-macos-aarch64 - - ninja-macos-aarch64 - - cmake-macos-aarch64 - - pybind11-macos-aarch64 - - cffi-macos-aarch64 - - PyYAML-macos-aarch64 - - ujson-macos-aarch64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'torch') }} + build_wheels: + runs-on: macos-12 env: - MAX_JOBS: 4 - BUILD_TEST: 0 + PACKAGES_TO_BUILD: ${{ inputs.packages }} steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas cmake libffi - name: Checkout uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-aarch64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-aarch64 - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-aarch64 - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-macos-aarch64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-aarch64 - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-macos-aarch64 - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-aarch64 - - name: Download artifacts from ujson - uses: actions/download-artifact@main - continue-on-error: true with: - name: ujson-macos-aarch64 - - name: Build wheel - run: |- - export USE_CUDA=0 - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) torch + python-version: 3.12 + - name: Build wheels + run: python3 scripts/wheelbuilder/build_wheels.py ${{ inputs.graalpy_url }} - name: Store wheels uses: actions/upload-artifact@main with: - name: torch-macos-aarch64 - path: torch*.whl + name: wheels + path: wheelhouse/*.whl if-no-files-found: error diff --git a/.github/workflows/build-macos-amd64-wheels.yml b/.github/workflows/build-macos-amd64-wheels.yml index 1ba8c2ee49..7275d62b62 100644 --- a/.github/workflows/build-macos-amd64-wheels.yml +++ b/.github/workflows/build-macos-amd64-wheels.yml @@ -2,781 +2,31 @@ name: build-macos-amd64-wheels 'on': workflow_dispatch: inputs: - name: + packages: type: string - description: Pkg to build (empty for all) + description: Pkgs to build (comma-separated, empty for all) required: false - graalpy: + graalpy_url: type: string - description: GraalPy download url prefix (empty for default) - required: false + description: GraalPy download url + required: true jobs: - psutil-macos-amd64: - runs-on: macos-12 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'psutil') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) psutil - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: psutil-macos-amd64 - path: psutil*.whl - if-no-files-found: error - numpy-macos-amd64: - runs-on: macos-12 - needs: psutil-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy' || inputs.name - == 'pandas' || inputs.name == 'contourpy' || inputs.name == 'matplotlib' || - inputs.name == 'scipy' || inputs.name == 'scikit-learn' || inputs.name == 'torch') - }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from psutil - uses: actions/download-artifact@main - continue-on-error: true - with: - name: psutil-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-macos-amd64 - path: numpy*.whl - if-no-files-found: error - pandas-macos-amd64: - runs-on: macos-12 - needs: numpy-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pandas') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pandas - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pandas-macos-amd64 - path: pandas*.whl - if-no-files-found: error - pybind11-macos-amd64: + build_wheels: runs-on: macos-12 - needs: pandas-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pybind11' || inputs.name - == 'contourpy' || inputs.name == 'kiwisolver' || inputs.name == 'torch' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pandas - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pandas-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pybind11 - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pybind11-macos-amd64 - path: pybind11*.whl - if-no-files-found: error - ninja-macos-amd64: - runs-on: macos-12 - needs: pybind11-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ninja' || inputs.name - == 'contourpy' || inputs.name == 'torch' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ninja - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ninja-macos-amd64 - path: ninja*.whl - if-no-files-found: error - pillow-macos-amd64: - runs-on: macos-12 - needs: ninja-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'pillow' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install libjpeg libtiff little-cms2 openjpeg webp - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) pillow - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: pillow-macos-amd64 - path: pillow*.whl - if-no-files-found: error - contourpy-macos-amd64: - runs-on: macos-12 - needs: - - ninja-macos-amd64 - - pybind11-macos-amd64 - - numpy-macos-amd64 - - pillow-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'contourpy' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-amd64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-amd64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) contourpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: contourpy-macos-amd64 - path: contourpy*.whl - if-no-files-found: error - kiwisolver-macos-amd64: - runs-on: macos-12 - needs: - - pybind11-macos-amd64 - - contourpy-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'kiwisolver' || inputs.name - == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-amd64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) kiwisolver - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: kiwisolver-macos-amd64 - path: kiwisolver*.whl - if-no-files-found: error - matplotlib-macos-amd64: - runs-on: macos-12 - needs: - - pillow-macos-amd64 - - kiwisolver-macos-amd64 - - numpy-macos-amd64 - - contourpy-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'matplotlib') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from pillow - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pillow-macos-amd64 - - name: Download artifacts from kiwisolver - uses: actions/download-artifact@main - continue-on-error: true - with: - name: kiwisolver-macos-amd64 - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Download artifacts from contourpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: contourpy-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) matplotlib - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: matplotlib-macos-amd64 - path: matplotlib*.whl - if-no-files-found: error - scipy-macos-amd64: - runs-on: macos-12 - needs: - - numpy-macos-amd64 - - matplotlib-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scipy' || inputs.name - == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install gcc openblas pkg-config - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Download artifacts from matplotlib - uses: actions/download-artifact@main - continue-on-error: true - with: - name: matplotlib-macos-amd64 - - name: Build wheel - run: |- - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scipy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scipy-macos-amd64 - path: scipy*.whl - if-no-files-found: error - scikit-learn-macos-amd64: - runs-on: macos-12 - needs: - - numpy-macos-amd64 - - scipy-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'scikit-learn') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Download artifacts from scipy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scipy-macos-amd64 - - name: Build wheel - run: |- - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export FFLAGS=-fallow-argument-mismatch - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) scikit-learn - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: scikit-learn-macos-amd64 - path: scikit*learn*.whl - if-no-files-found: error - cffi-macos-amd64: - runs-on: macos-12 - needs: scikit-learn-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cffi' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install libffi - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from scikit-learn - uses: actions/download-artifact@main - continue-on-error: true - with: - name: scikit-learn-macos-amd64 - - name: Build wheel - run: |- - graalpy/bin/graalpy -m pip install wheel - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cffi - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cffi-macos-amd64 - path: cffi*.whl - if-no-files-found: error - PyYAML-macos-amd64: - runs-on: macos-12 - needs: cffi-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-macos-amd64 - path: PyYAML*.whl - if-no-files-found: error - cmake-macos-amd64: - runs-on: macos-12 - needs: PyYAML-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'cmake' || inputs.name - == 'torch') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) cmake - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: cmake-macos-amd64 - path: cmake*.whl - if-no-files-found: error - ujson-macos-amd64: - runs-on: macos-12 - needs: cmake-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-macos-amd64 - - name: Build wheel - run: |- - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) ujson - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: ujson-macos-amd64 - path: ujson*.whl - if-no-files-found: error - torch-macos-amd64: - runs-on: macos-12 - needs: - - numpy-macos-amd64 - - ninja-macos-amd64 - - cmake-macos-amd64 - - pybind11-macos-amd64 - - cffi-macos-amd64 - - PyYAML-macos-amd64 - - ujson-macos-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'torch') }} env: - MAX_JOBS: 4 - BUILD_TEST: 0 + PACKAGES_TO_BUILD: ${{ inputs.packages }} steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: brew install openblas cmake libffi - name: Checkout uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - curl -L -o graalpy.tar.gz ${{ inputs.graalpy }}-macos-amd64.tar.gz - mkdir -p graalpy - tar -C $(pwd)/graalpy --strip-components=1 -xzf graalpy.tar.gz - graalpy/bin/graalpy -s -m ensurepip - graalpy/bin/graalpy -m pip install wheel - - name: Setup GraalPy + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-macos-amd64 - - name: Download artifacts from ninja - uses: actions/download-artifact@main - continue-on-error: true - with: - name: ninja-macos-amd64 - - name: Download artifacts from cmake - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cmake-macos-amd64 - - name: Download artifacts from pybind11 - uses: actions/download-artifact@main - continue-on-error: true - with: - name: pybind11-macos-amd64 - - name: Download artifacts from cffi - uses: actions/download-artifact@main - continue-on-error: true - with: - name: cffi-macos-amd64 - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-macos-amd64 - - name: Download artifacts from ujson - uses: actions/download-artifact@main - continue-on-error: true with: - name: ujson-macos-amd64 - - name: Build wheel - run: |- - export USE_CUDA=0 - export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig - export PIP_FIND_LINKS=$(pwd) - export PATH=$(pwd)/graalpy/bin/:$PATH - graalpy/bin/graalpy -m pip wheel --find-links $(pwd) torch + python-version: 3.12 + - name: Build wheels + run: python3 scripts/wheelbuilder/build_wheels.py ${{ inputs.graalpy_url }} - name: Store wheels uses: actions/upload-artifact@main with: - name: torch-macos-amd64 - path: torch*.whl + name: wheels + path: wheelhouse/*.whl if-no-files-found: error diff --git a/.github/workflows/build-repository.yml b/.github/workflows/build-repository.yml deleted file mode 100644 index 942b814d88..0000000000 --- a/.github/workflows/build-repository.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: build-repository -'on': workflow_dispatch -jobs: - build-repo: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Download artifacts for linux-amd64 - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - continue-on-error: true - with: - workflow: build-linux-amd64-wheels.yml - workflow_conclusion: '' - if_no_artifact_found: warn - allow_forks: 'false' - - name: Download artifacts for linux-aarch64 - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - continue-on-error: true - with: - workflow: build-linux-aarch64-wheels.yml - workflow_conclusion: '' - if_no_artifact_found: warn - allow_forks: 'false' - - name: Download artifacts for macos-amd64 - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - continue-on-error: true - with: - workflow: build-macos-amd64-wheels.yml - workflow_conclusion: '' - if_no_artifact_found: warn - allow_forks: 'false' - - name: Download artifacts for macos-aarch64 - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - continue-on-error: true - with: - workflow: build-macos-aarch64-wheels.yml - workflow_conclusion: '' - if_no_artifact_found: warn - allow_forks: 'false' - - name: Download artifacts for windows-amd64 - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - continue-on-error: true - with: - workflow: build-windows-amd64-wheels.yml - workflow_conclusion: '' - if_no_artifact_found: warn - allow_forks: 'false' - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Create repository - run: python ${GITHUB_WORKSPACE}/scripts/wheelbuilder/generate_repository.py - - name: Store repository - uses: umutozd/upload-artifact@5c459179e7745e2c730c50b10a6459da0b6f25db - with: - name: repository - path: repository.zip - if-no-files-found: error diff --git a/.github/workflows/build-windows-amd64-wheels.yml b/.github/workflows/build-windows-amd64-wheels.yml index 00a18a2c40..0544499e65 100644 --- a/.github/workflows/build-windows-amd64-wheels.yml +++ b/.github/workflows/build-windows-amd64-wheels.yml @@ -2,141 +2,34 @@ name: build-windows-amd64-wheels 'on': workflow_dispatch: inputs: - name: + packages: type: string - description: Pkg to build (empty for all) + description: Pkgs to build (comma-separated, empty for all) required: false - graalpy: + graalpy_url: type: string - description: GraalPy download url prefix (empty for default) - required: false + description: GraalPy download url + required: true jobs: - numpy-windows-amd64: + build_wheels: runs-on: windows-latest - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'numpy') }} + env: + PACKAGES_TO_BUILD: ${{ inputs.packages }} steps: - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - Invoke-WebRequest https://kumisystems.dl.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-bin.zip -OutFile patch.zip - Expand-Archive patch.zip -DestinationPath ../patch -Force - name: Checkout uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest ${{ inputs.graalpy }}-windows-amd64.zip -OutFile graalpy-windows-amd64.zip - Expand-Archive graalpy-windows-amd64.zip - mv graalpy-windows-amd64/* graalpy - graalpy/bin/graalpy.exe -s -m ensurepip - graalpy/bin/graalpy.exe -m pip install wheel - - name: Setup GraalPy + - name: Setup Python uses: actions/setup-python@v5 - if: inputs.graalpy == '' with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Build wheel - run: |- - $env:PIP_FIND_LINKS=$PWD - $env:PATH+=";$PWD\graalpy\bin;$PWD\graalpy\Scripts;$PWD\..\patch\bin" - graalpy/bin/graalpy -m pip wheel --find-links $PWD numpy - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: numpy-windows-amd64 - path: numpy*.whl - if-no-files-found: error - PyYAML-windows-amd64: - runs-on: windows-latest - needs: numpy-windows-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'PyYAML') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies + python-version: 3.12 + - name: Build wheels run: | - Invoke-WebRequest https://kumisystems.dl.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-bin.zip -OutFile patch.zip - Expand-Archive patch.zip -DestinationPath ../patch -Force - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest ${{ inputs.graalpy }}-windows-amd64.zip -OutFile graalpy-windows-amd64.zip - Expand-Archive graalpy-windows-amd64.zip - mv graalpy-windows-amd64/* graalpy - graalpy/bin/graalpy.exe -s -m ensurepip - graalpy/bin/graalpy.exe -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from numpy - uses: actions/download-artifact@main - continue-on-error: true - with: - name: numpy-windows-amd64 - - name: Build wheel - run: |- - $env:PIP_FIND_LINKS=$PWD - $env:PATH+=";$PWD\graalpy\bin;$PWD\graalpy\Scripts;$PWD\..\patch\bin" - graalpy/bin/graalpy -m pip wheel --find-links $PWD PyYAML - - name: Store wheels - uses: actions/upload-artifact@main - with: - name: PyYAML-windows-amd64 - path: PyYAML*.whl - if-no-files-found: error - ujson-windows-amd64: - runs-on: windows-latest - needs: PyYAML-windows-amd64 - if: ${{ !cancelled() && (inputs.name == '' || inputs.name == 'ujson') }} - steps: - - uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies - run: | - Invoke-WebRequest https://kumisystems.dl.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-bin.zip -OutFile patch.zip - Expand-Archive patch.zip -DestinationPath ../patch -Force - - name: Checkout - uses: actions/checkout@main - - name: Setup custom GraalPy - if: inputs.graalpy != '' - run: |- - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest ${{ inputs.graalpy }}-windows-amd64.zip -OutFile graalpy-windows-amd64.zip - Expand-Archive graalpy-windows-amd64.zip - mv graalpy-windows-amd64/* graalpy - graalpy/bin/graalpy.exe -s -m ensurepip - graalpy/bin/graalpy.exe -m pip install wheel - - name: Setup GraalPy - uses: actions/setup-python@v5 - if: inputs.graalpy == '' - with: - python-version: graalpy24.1 - - name: Setup local GraalPy venv - if: inputs.graalpy == '' - run: python -m venv graalpy - - name: Download artifacts from PyYAML - uses: actions/download-artifact@main - continue-on-error: true - with: - name: PyYAML-windows-amd64 - - name: Build wheel - run: |- - $env:PIP_FIND_LINKS=$PWD - $env:PATH+=";$PWD\graalpy\bin;$PWD\graalpy\Scripts;$PWD\..\patch\bin" - graalpy/bin/graalpy -m pip wheel --find-links $PWD ujson + $env:PATH+=";C:\Program Files\Git\usr\bin" + python3 scripts/wheelbuilder/build_wheels.py ${{ inputs.graalpy_url }} - name: Store wheels uses: actions/upload-artifact@main with: - name: ujson-windows-amd64 - path: ujson*.whl + name: wheels + path: wheelhouse/*.whl if-no-files-found: error diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f44abb658..2effd27a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ language runtime. The main focus is on user-observable behavior of the engine. * This means all Python methods of these types are available on the corresponding foreign objects, which behave as close as possible as if they were Python objects. * See [the documentation](https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md#interacting-with-foreign-objects-from-python-scripts) for more information. * Remove support for running with Sulong managed both in embeddings as well as through the `graalpy-managed` launcher. +* Rewrite wheelbuilder to be easier to use and contribute to. This version is now the same we run internally to build publishable wheels for some platforms we support, so the community can build the same wheels on their own hardware easily if desired. ## Version 24.1.0 * GraalPy is now considered stable for pure Python workloads. While many workloads involving native extension modules work, we continue to consider them experimental. You can use the command-line option `--python.WarnExperimentalFeatures` to enable warnings for such modules at runtime. In Java embeddings the warnings are enabled by default and you can suppress them by setting the context option 'python.WarnExperimentalFeatures' to 'false'. diff --git a/ci.jsonnet b/ci.jsonnet index 44ce2c002c..7064f59cfc 100644 --- a/ci.jsonnet +++ b/ci.jsonnet @@ -1 +1 @@ -{ "overlay": "947e97f768b6e4a5868c3afa76617c2b2f72ff33" } +{ "overlay": "a53f75105e24ff44381970de172a8462fa45b9a7" } diff --git a/graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java b/graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java index e96588a033..23de3bf4ed 100644 --- a/graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java +++ b/graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/common/CExtContext.java @@ -59,6 +59,7 @@ import org.graalvm.shadowed.com.ibm.icu.impl.Punycode; import org.graalvm.shadowed.com.ibm.icu.text.StringPrepParseException; +import com.oracle.graal.python.builtins.PythonOS; import com.oracle.graal.python.builtins.objects.cext.capi.CApiContext; import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.CheckFunctionResultNode; import com.oracle.graal.python.builtins.objects.cext.common.LoadCExtException.ApiInitException; @@ -309,7 +310,10 @@ public static Object loadCExtModule(Node location, PythonContext context, Module String message = "Loading C extension module %s from '%s'. Support for the Python C API is considered experimental."; if (!runViaLauncher) { message += " See https://www.graalvm.org/latest/reference-manual/python/Native-Extensions/#embedding-limitations for the limitations. " + - "You can suppress this warning by setting the context option 'python.WarnExperimentalFeatures' to 'false'"; + "You can suppress this warning by setting the context option 'python.WarnExperimentalFeatures' to 'false'."; + } + if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) { + message += " If loading binary wheels fails, please make sure you installed the latest Microsoft Visual C++ Redistributable from https://aka.ms/vs/17/release/vc_redist.x64.exe."; } getLogger().warning(message.formatted(spec.name, spec.path)); } diff --git a/pyproject.toml b/pyproject.toml index c22420b328..11d5b57856 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,4 +8,4 @@ required-version = '23' # Disables the black formatter in this repository # If individual suites want to enable the formatter, they can create a # pyproject.toml with their own configuration in their suite folder -force-exclude = '.*' +force-exclude = '.*graalpy.*|.*scripts/[^w].*py' diff --git a/scripts/wheelbuilder/README.md b/scripts/wheelbuilder/README.md index 2aa3bfa131..c12d7c5643 100644 --- a/scripts/wheelbuilder/README.md +++ b/scripts/wheelbuilder/README.md @@ -1,10 +1,10 @@ # Scripts to build wheels for GraalPy. [GraalPy](https://github.com/oracle/graalpython) is compatible with many Python libraries, including those that extend the Python runtime with native code. -However, implemented in Java and thus binary incompatible with existing extensions, users of native Python extension libraries such as NumPy, SciPy, or PyTorch have to build their own binaries when installing these libraries. +However, implemented in Java and thus binary incompatible with existing extensions, users of native Python extension libraries such as NumPy, SciPy, or PyTorch have to build their own binaries when installing these libraries if neither the project nor the GraalPy team provides prebuilt wheels. For many libraries, this means installing additional build dependencies and sitting through long and resource-intensive compilation processes. -This project is meant to be a place for the community to collect build recipes for as many popular packages as possible that can then be built once with GitHub Actions for each major release of GraalPy. +This project is meant to be a place for the community to collect build recipes for as many popular packages as possible that can then be built individually or in CI/CD systems like GitHub Actions. ## Quickstart @@ -16,42 +16,20 @@ This project is meant to be a place for the community to collect build recipes f 4. Click on "Run workflow". You can enter a package name or build all packages. - See [the spec list](../../../../blob/master/scripts/wheelbuilder/generate_workflow.py) for which packages are available. + See [the platform subfolders](../../../../blob/master/scripts/wheelbuilder/) for which packages have buildscripts.  ## How to contribute -There should be only one relevant file, `generate_workflow.py`. -In it we collect `BuildSpec` objects that define how to build a particular package. -Many packages do not need special definitions, just a name and maybe which platforms to build it for. -System package dependencies can be specified by platform where needed. -Dependencies between specs are not strictly necessary, but can reduce the overall build times and thus resource usage of GitHub Action runners. - -Changes to `generate_workflow.py` are reflected in the build specs by running the file. -It creates GitHub Action workflow files, one for each platform, and a giant one with all jobs. +We collect simple build scripts per platform and package in the `linux`, `darwin`, and `win32` subdirectories. +The format is simply the package name followed by `.sh` for macOS and Linux or `.bat` for Windows. +An additional component can be added in between the name and the extension. +This file is then only run if the process environment contains a variable matching the middle component. +That can be useful to put things like package installations specific to GitHub Actions while keeping the main build script generic for other platforms. ## How to run this -Many packages use a lot of resources to build, and even those that do not quickly add up. -We have chosen GitHub Action workflows as the cross-platform specification for how to build packages. - -### Running actions locally with nektos/act - -[Act](https://github.com/nektos/act) allows running GitHub actions locally. -We can use that to just build packages on a local machine: - -``` -./act --artifact-server-path /tmp/artifacts \ - -W .github/workflows/build-linux-amd64-wheels.yml \ - -P self-hosted=-self-hosted \ - -P macOS=-self-hosted -P Linux=-self-hosted \ - -P X64=-self-hosted -P ARM64=-self-hosted \ - --input name=psutil -``` - -You can vary the `--input name=` argument to select which package to build or to build all. - -On Linux you will need Docker or Podman. -If you're using Podman, make sure you are running the system service (e.g. -`podman system service -t 0` to run it in a shell), have symlinked or aliased `docker` to `podman`, and prepared you env with `export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock` to allow `act` to pick up where podman is listening. +Just run the `build_wheels.py` script. +It expects a URL to download the GraalPy release from. +You can set the environment variable `PACKAGES_TO_BUILD` to a comma-separated list of package build scripts you want to consider. diff --git a/scripts/wheelbuilder/build_wheels.py b/scripts/wheelbuilder/build_wheels.py new file mode 100644 index 0000000000..bde3e0a15b --- /dev/null +++ b/scripts/wheelbuilder/build_wheels.py @@ -0,0 +1,312 @@ +# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +__doc__ = """ +A very simple script to build wheels for which we have build scripts. +The steps are: + +1. Download GraalPy +2. Make a venv +3. Install some default packages like wheel or auditwheel +4. Go over the build scripts and run them in the venv +""" + +import hashlib +import importlib +import os +import re +import shutil +import subprocess +import sys +import tarfile +import zipfile + +from argparse import ArgumentParser +from glob import glob +from os.path import abspath, basename, dirname, exists, isabs, join, splitext +from tempfile import TemporaryDirectory +from urllib.request import urlretrieve + + +def ensure_installed(name): + try: + return importlib.import_module(name) + except ImportError: + subprocess.check_call([sys.executable, "-m", "pip", "install", name]) + return importlib.import_module(name) + + +def download(url, out): + print("Downloading", url, flush=True) + urlretrieve(url, out) + + +def extract(archive): + print("Extracting", archive, flush=True) + if splitext(archive)[1] == ".zip": + with zipfile.ZipFile(archive) as f: + f.extractall() + else: + with tarfile.open(archive) as f: + f.extractall() + + +def create_venv(): + if sys.platform == "win32": + exe = ".exe" + pip = "graalpy/Scripts/pip.exe" + else: + exe = "" + pip = "graalpy/bin/pip" + binary = next(iter(glob(f"graalpy-*/bin/graalpy{exe}"))) + print("Creating venv with", binary, flush=True) + subprocess.check_call([binary, "-m", "venv", "graalpy"]) + print("Installing wheel with", pip, flush=True) + subprocess.check_call([pip, "install", "wheel"]) + return pip + + +def build_wheels(pip): + packages_selected = [s for s in os.environ.get("PACKAGES_TO_BUILD", "").split(",") if s] + packages_to_build = set() + with open(join(dirname(__file__), "packages.txt")) as f: + for line in f.readlines(): + name, version = line.split("==") + if not packages_selected or name in packages_selected or line in packages_selected: + packages_to_build.add(line) + scriptdir = abspath(join(dirname(__file__), sys.platform)) + if sys.platform == "win32": + script_ext = "bat" + else: + script_ext = "sh" + if exists(scriptdir): + available_scripts = {s.lower(): s for s in os.listdir(scriptdir)} + else: + available_scripts = {} + for spec in packages_to_build: + name, version = spec.split("==") + whl_count = len(glob("*.whl")) + script = f"{name}.{version}.{script_ext}".lower() + if script not in available_scripts: + script = f"{name}.{script_ext}".lower() + if script in available_scripts: + script = join(scriptdir, available_scripts[script]) + env = os.environ.copy() + env["PATH"] = abspath(dirname(pip)) + os.pathsep + env["PATH"] + env["VIRTUAL_ENV"] = abspath(dirname(dirname(pip))) + print("Building", name, version, "with", script, flush=True) + subprocess.check_call([script, version], shell=True, env=env) + if not len(glob("*.whl")) > whl_count: + print("Building wheel for", name, version, "after", script, "did not", flush=True) + subprocess.check_call([pip, "wheel", spec]) + else: + print("Building", name, version, flush=True) + subprocess.check_call([pip, "wheel", spec]) + + +_warned_dlls = [] + + +def repair_wheels_windows(output_dir, wheels): + import pefile + from machomachomangler.pe import redll + + def resolve_dll_src(dll): + # search for dependencies in system directories + dll_search_paths = [ + os.environ["WINDIR"], + join(os.environ["WINDIR"], "System32"), + *os.environ["PATH"].split(";"), + ] + ignored_dlls = [ + # These DLLs are just provided by Windows. + # This list is probably incomplete. + r"advapi32\.dll", + r"advapires32\.dll", + r"atl.*\.dll", + r"comctl32\.dll", + r"comdlg32\.dll", + r"crtdll\.dll", + r"gdi32\.dll", + r"hal.*\.dll", + r"imm32\.dll", + r"iphlpapi\.dll", + r"kernel32\.dll", + r"kernelbase\.dll", + r"msvbvm60\.dll", + r"msvcirt\.dll", + r"msvcrt?.*\.dll", + r"netapi32\.dll", + r"ntdll\.dll", + r"ole32\.dll", + r"pdh\.dll", + r"powrprof\.dll", + r"psapi\.dll", + r"rpcrt4\.dll", + r"sechost\.dll", + r"shell32\.dll", + r"shlwapi\.dll", + r"shscrap\.dll", + r"ucrtbase\.dll", + r"user32\.dll", + r"version\.dll", + r"winmm\.dll", + r"ws2_32\.dll", + # These match DLLs that provide API sets. + # See https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-apisets + r"api-ms-win-.*\.dll", + r"ext-ms-win-.*\.dll", + # These match DLLs that we provide in GraalPy + r"python.*\.dll", + # These are the DLLs typically linked when building with MSVC. See + # https://learn.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute + # When these are included, the user should install the latest + # redist package from + # https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist + # However, https://aka.ms/vs/17/redist.txt lists the libraries + # which can be included in application distributions. + r"concrt.*\.dll", + r"mfc.*\.dll", + r"msvcp.*\.dll", + r"vcamp.*\.dll", + r"vccorlib.*\.dll", + r"vcomp.*\.dll", + r"vcruntime.*\.dll", + ] + if not dll: + return + if any(re.match(pat, basename(dll), re.IGNORECASE) for pat in ignored_dlls): + if dll not in _warned_dlls: + print("Not including", dll, flush=True) + _warned_dlls.append(dll) + return + if isabs(dll): + return dll + for search_path in dll_search_paths: + if exists(src := join(search_path, dll)): + return src + + def resolve_dll_target(dll, dependent, checksum): + return join(dirname(dependent), f"{checksum}.{basename(dll)}") + + def filehash(files): + sha1 = hashlib.sha1() + for file in files: + with open(file, mode="rb") as f: + sha1.update(f.read()) + return sha1.hexdigest()[:8] + + for whl in wheels: + with TemporaryDirectory() as name: + with zipfile.ZipFile(whl) as f: + f.extractall(name) + + # find all pyd files and recursively copy dependencies + dlls = glob(f"{name}/**/*.pyd", recursive=True) + checksum = filehash(dlls) + dependents_to_dependencies = {} + while dlls: + dll = dlls.pop() + with pefile.PE(dll) as pe: + pe_info = pe.dump_dict() + for syms in pe_info.get("Imported symbols", []): + for sym in syms: + if dep_src := resolve_dll_src(sym.get("DLL", b"").decode("utf-8")): + if not exists(dep_tgt := resolve_dll_target(dep_src, dll, checksum)): + print("Including", dep_src, "as", dep_tgt, flush=True) + shutil.copy(dep_src, dep_tgt) + dlls.append(dep_tgt) + dependents_to_dependencies.setdefault(dll, []).append(dep_src) + + for dll, dependencies in dependents_to_dependencies.items(): + mapping = {} + for dep_src in dependencies: + mapping[basename(dep_src).encode("utf-8")] = basename( + resolve_dll_target(dep_src, dll, checksum) + ).encode("utf-8") + with open(dll, mode="rb") as f: + data = f.read() + print( + "Rewriting\n\t", + "\n\t".join([k.decode("utf-8") for k in mapping.keys()]), + "\n\t->\n\t", + "\n\t".join([v.decode("utf-8") for v in mapping.values()]), + "\nin", + dll, + ) + data = redll(data, mapping) + with open(dll, mode="wb") as f: + f.write(data) + + os.makedirs(output_dir, exist_ok=True) + if exists(whl_tgt := join(output_dir, whl)): + os.unlink(whl_tgt) + shutil.make_archive(whl_tgt, "zip", name) + os.rename(f"{whl_tgt}.zip", whl_tgt) + + +def repair_wheels(): + if sys.platform == "win32": + ensure_installed("machomachomangler") + ensure_installed("pefile") + repair_wheels_windows("wheelhouse", glob("*.whl")) + elif sys.platform == "linux": + ensure_installed("auditwheel") + subprocess.check_call( + [join(dirname(sys.executable), "auditwheel"), "repair", "-w", "wheelhouse", *glob("*.whl")] + ) + elif sys.platform == "darwin": + ensure_installed("delocate") + subprocess.check_call( + [join(dirname(sys.executable), "delocate-wheel"), "-v", "-w", "wheelhouse", *glob("*.whl")] + ) + + +if __name__ == "__main__": + parser = ArgumentParser() + parser.add_argument("graalpy_url") + args = parser.parse_args() + ext = splitext(args.graalpy_url)[1] + outpath = f"graalpy{ext}" + + download(args.graalpy_url, outpath) + extract(outpath) + pip = create_venv() + build_wheels(pip) + repair_wheels() diff --git a/scripts/wheelbuilder/darwin/cffi.sh b/scripts/wheelbuilder/darwin/cffi.sh new file mode 100755 index 0000000000..58aa287525 --- /dev/null +++ b/scripts/wheelbuilder/darwin/cffi.sh @@ -0,0 +1,42 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if [ -n "$GITHUB_RUN_ID" ]; then + brew install libffi +fi diff --git a/scripts/wheelbuilder/darwin/numpy.sh b/scripts/wheelbuilder/darwin/numpy.sh new file mode 100755 index 0000000000..b4fa5b7363 --- /dev/null +++ b/scripts/wheelbuilder/darwin/numpy.sh @@ -0,0 +1,42 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if [ -n "$GITHUB_RUN_ID" ]; then + brew install gcc openblas +fi diff --git a/scripts/wheelbuilder/darwin/pillow.sh b/scripts/wheelbuilder/darwin/pillow.sh new file mode 100755 index 0000000000..7058e6880f --- /dev/null +++ b/scripts/wheelbuilder/darwin/pillow.sh @@ -0,0 +1,42 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if [ -n "$GITHUB_RUN_ID" ]; then + brew install libjpeg libtiff little-cms2 openjpeg2 webp +fi diff --git a/scripts/wheelbuilder/darwin/scipy.sh b/scripts/wheelbuilder/darwin/scipy.sh new file mode 100755 index 0000000000..d4ece84988 --- /dev/null +++ b/scripts/wheelbuilder/darwin/scipy.sh @@ -0,0 +1,45 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if [ -n "$GITHUB_RUN_ID" ]; then + brew install gcc openblas pkg-config + export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig +fi +export FFLAGS=-fallow-argument-mismatch +pip wheel "scipy==$1" diff --git a/scripts/wheelbuilder/darwin/torch.sh b/scripts/wheelbuilder/darwin/torch.sh new file mode 100755 index 0000000000..7bb43eaca1 --- /dev/null +++ b/scripts/wheelbuilder/darwin/torch.sh @@ -0,0 +1,47 @@ +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# The Universal Permissive License (UPL), Version 1.0 +# +# Subject to the condition set forth below, permission is hereby granted to any +# person obtaining a copy of this software, associated documentation and/or +# data (collectively the "Software"), free of charge and under any and all +# copyright rights in the Software, and any and all patent rights owned or +# freely licensable by each licensor hereunder covering either (i) the +# unmodified Software as contributed to or provided by such licensor, or (ii) +# the Larger Works (as defined below), to deal in both +# +# (a) the Software, and +# +# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +# one is included with the Software each a "Larger Work" to which the Software +# is contributed by such licensors), +# +# without restriction, including without limitation the rights to copy, create +# derivative works of, display, perform, and distribute the Software and make, +# use, sell, offer for sale, import, export, have made, and have sold the +# Software and the Larger Work(s), and to sublicense the foregoing rights on +# either these or other terms. +# +# This license is subject to the following condition: +# +# The above copyright notice and either this complete permission notice or at a +# minimum a reference to the UPL must be included in all copies or substantial +# portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if [ -n "$GITHUB_RUN_ID" ]; then + brew install openblas cmake libffi pkg-config + export USE_CUDA=0 + export PKG_CONFIG_PATH=/opt/homebrew/opt/openblas/lib/pkgconfig +fi +export MAX_JOBS=4 +export BUILD_TEST=0 +pip wheel "torch==$1" diff --git a/scripts/wheelbuilder/generate_repository.py b/scripts/wheelbuilder/generate_repository.py deleted file mode 100644 index 03783a4e48..0000000000 --- a/scripts/wheelbuilder/generate_repository.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# The Universal Permissive License (UPL), Version 1.0 -# -# Subject to the condition set forth below, permission is hereby granted to any -# person obtaining a copy of this software, associated documentation and/or -# data (collectively the "Software"), free of charge and under any and all -# copyright rights in the Software, and any and all patent rights owned or -# freely licensable by each licensor hereunder covering either (i) the -# unmodified Software as contributed to or provided by such licensor, or (ii) -# the Larger Works (as defined below), to deal in both -# -# (a) the Software, and -# -# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if -# one is included with the Software each a "Larger Work" to which the Software -# is contributed by such licensors), -# -# without restriction, including without limitation the rights to copy, create -# derivative works of, display, perform, and distribute the Software and make, -# use, sell, offer for sale, import, export, have made, and have sold the -# Software and the Larger Work(s), and to sublicense the foregoing rights on -# either these or other terms. -# -# This license is subject to the following condition: -# -# The above copyright notice and either this complete permission notice or at a -# minimum a reference to the UPL must be included in all copies or substantial -# portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -""" -Set up a repository folder following -https://packaging.python.org/en/latest/guides/hosting-your-own-index/ -""" - -import glob -import gzip -import os -import re -import shutil -import sys -import html - - -def normalize(name): - """ - Taken from - https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization - """ - return re.sub(r"[-_.]+", "-", name).lower() - - -if __name__ == "__main__": - if len(sys.argv) > 1: - workspace = sys.argv[1] - else: - workspace = os.environ["GITHUB_WORKSPACE"] - # find wheels either locally in the workspace or in an act artifact root structure - wheels = glob.glob(os.path.join(workspace, "**/*.whl")) or glob.glob( - os.path.join(workspace, "**/**/*.whl.gz__") - ) - repo = os.path.join(workspace, "repository", "simple") - os.makedirs(repo, exist_ok=True) - pkg_index = [ - "