Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
test-matrix:
type: string
required: true
release-type:
type: string
required: false
default: ''
description: 'nightly or final'
docker-hub-username:
type: string
required: true
Expand Down Expand Up @@ -72,7 +77,8 @@ jobs:
run: |
pip install cibuildwheel auditwheel

- name: Set version
- name: Set version (final)
if: ${{ inputs.release-type == 'final' }}
run: |
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py`
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
Expand All @@ -81,6 +87,28 @@ jobs:
sed -i "s/$VERSION/$VERSION+$TORCH_VERSION$CUDA_VERSION/" setup.py
sed -i "s/$VERSION/$VERSION+$TORCH_VERSION$CUDA_VERSION/" pyg_lib/__init__.py

- name: Set version (nightly)
if: ${{ inputs.release-type == 'nightly' }}
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: Build wheel
run: |
bash ./.github/workflows/utils/build_linux.sh ${{ matrix.cuda-version }} ${{ matrix.python-version }} ${{ matrix.torch-version }}

- name: Upload wheel (final)
if: ${{ inputs.release-type == 'final' }}
run: |
aws s3 sync --dryrun dist s3://data.pyg.org/whl/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

- name: Upload wheel (nightly)
if: ${{ inputs.release-type == 'nightly' }}
run: |
aws s3 sync --dryrun dist s3://data.pyg.org/whl/nightly/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
61 changes: 61 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build Nightly Wheels

on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Everyday at 4:00am UTC/8:00pm PST

jobs:
trigger:
runs-on: ubuntu-latest
outputs:
linux-matrix: ${{ steps.set-matrix.outputs.linux-matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure matrix
id: set-matrix
run: |
# Set Linux matrix
filename=".github/workflows/utils/full_matrix.json"
# TODO: Build for CUDA versions.
matrix=$(jq -c '[.[] | { "torch-version": .["torch-version"], "python-version": .["python-version"][], "cuda-version": "cpu" }]' $filename)
echo "linux-matrix=$matrix" >> $GITHUB_OUTPUT
echo "linux-matrix=$matrix"

linux:
needs: [trigger]
uses: ./.github/workflows/_build_linux.yml
with:
test-matrix: ${{ needs.trigger.outputs.linux-matrix }}
release-type: nightly
docker-hub-username: ${{ vars.DOCKERHUB_USERNAME }}
secrets:
docker-hub-token: ${{ secrets.DOCKERHUB_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

index:
if: always()
needs: [linux]
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.11

- 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 }}
3 changes: 3 additions & 0 deletions .github/workflows/nightly_legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ jobs:
- os: windows-2022
torch-version: 2.0.0
cuda-version: 'cu121'
# Disabled in favor of nightly.yml.
- os: ubuntu-22.04
cuda-version: 'cpu'

steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [0.5.0] - 2023-MM-DD
### Added
- Added `manylinux_2_28` wheel support in nightly releases ([#480](https://github.com/pyg-team/pyg-lib/pull/480))
- Added CUDA 12.9 support ([#494](https://github.com/pyg-team/pyg-lib/pull/494))
- Added PyTorch 2.8 support ([#494](https://github.com/pyg-team/pyg-lib/pull/494))
- Added PyTorch 2.7 support ([#442](https://github.com/pyg-team/pyg-lib/pull/442))
Expand Down
5 changes: 4 additions & 1 deletion test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@


def test_version():
assert len(pyg_lib.__version__.split('.')) == 3
if 'dev' in pyg_lib.__version__:
assert len(pyg_lib.__version__.split('.')) == 4
else:
assert len(pyg_lib.__version__.split('.')) == 3
Loading