Skip to content

Nightly Wheels

Nightly Wheels #1025

Workflow file for this run

name: Nightly Wheels
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Everyday at 4:00am UTC/8:00pm PST
jobs:
wheel:
if: github.repository == 'pyg-team/pyg-lib'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-14, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12']
torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0]
cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121', 'cu124']
exclude:
- torch-version: 1.12.0
python-version: '3.12'
- torch-version: 1.13.0
python-version: '3.12'
- torch-version: 2.0.0
python-version: '3.12'
- torch-version: 2.1.0
python-version: '3.12'
- torch-version: 1.12.0
python-version: '3.11'
- torch-version: 1.12.0
cuda-version: 'cu117'
- torch-version: 1.12.0
cuda-version: 'cu118'
- torch-version: 1.12.0
cuda-version: 'cu121'
- torch-version: 1.12.0
cuda-version: 'cu124'
- torch-version: 1.13.0
python-version: '3.11'
- torch-version: 1.13.0
cuda-version: 'cu113'
- torch-version: 1.13.0
cuda-version: 'cu118'
- torch-version: 1.13.0
cuda-version: 'cu121'
- torch-version: 1.13.0
cuda-version: 'cu124'
- torch-version: 2.0.0
cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu116'
- torch-version: 2.0.0
cuda-version: 'cu124'
- torch-version: 2.1.0
cuda-version: 'cu113'
- torch-version: 2.1.0
cuda-version: 'cu116'
- torch-version: 2.1.0
cuda-version: 'cu117'
- torch-version: 2.1.0
cuda-version: 'cu124'
- torch-version: 2.2.0
cuda-version: 'cu113'
- torch-version: 2.2.0
cuda-version: 'cu116'
- torch-version: 2.2.0
cuda-version: 'cu117'
- torch-version: 2.2.0
cuda-version: 'cu124'
- torch-version: 2.3.0
cuda-version: 'cu113'
- torch-version: 2.3.0
cuda-version: 'cu116'
- torch-version: 2.3.0
cuda-version: 'cu117'
- torch-version: 2.3.0
cuda-version: 'cu124'
- torch-version: 2.4.0
cuda-version: 'cu113'
- torch-version: 2.4.0
cuda-version: 'cu116'
- torch-version: 2.4.0
cuda-version: 'cu117'
- torch-version: 2.5.0
cuda-version: 'cu113'
- torch-version: 2.5.0
cuda-version: 'cu116'
- torch-version: 2.5.0
cuda-version: 'cu117'
- os: macos-14
cuda-version: 'cu113'
- os: macos-14
cuda-version: 'cu116'
- os: macos-14
cuda-version: 'cu117'
- os: macos-14
cuda-version: 'cu118'
- os: macos-14
cuda-version: 'cu121'
- os: macos-14
cuda-version: 'cu124'
- os: windows-2019
torch-version: 2.0.0
cuda-version: 'cu121'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup packages
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
torch-version: ${{ matrix.torch-version }}
cuda-version: ${{ matrix.cuda-version }}
- name: Set version on non-macOS
if: ${{ runner.os != 'macOS' }}
run: |
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py`
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
CUDA_VERSION=`echo ${{ matrix.cuda-version }}`
TODAY=`date +'%Y%m%d'`
echo "New version name: $VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION"
sed -i "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION/" setup.py
sed -i "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION/" pyg_lib/__init__.py
shell: bash
- name: Set version on macOS
if: ${{ runner.os == 'macOS' }}
run: |
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py`
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
TODAY=`date +'%Y%m%d'`
echo "New version name: $VERSION.dev$TODAY+$TORCH_VERSION"
sed -i "" "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION/" setup.py
sed -i "" "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION/" pyg_lib/__init__.py
shell: bash
- name: Build wheel
run: |
source ./.github/workflows/cuda/${{ runner.os }}-env.sh ${{ matrix.cuda-version }}
python setup.py bdist_wheel --dist-dir=dist
shell: bash
env:
TORCH_CUDA_ARCH_LIST: "5.0+PTX;6.0;7.0;7.5;8.0;8.6"
- name: Test wheel
run: |
cd dist
ls -lah
pip install *.whl
python -c "import pyg_lib; print('pyg-lib:', pyg_lib.__version__)"
python -c "import pyg_lib; print('CUDA:', pyg_lib.cuda_version())"
cd ..
shell: bash
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Upload wheel
run: |
aws s3 sync dist s3://data.pyg.org/whl/nightly/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
boto3:
if: ${{ always() }}
needs: [wheel]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install boto3
- name: Upload index
run: |
python ./.github/workflows/aws/upload_nightly_index.py
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}