diff --git a/.github/workflows/_build_windows.yml b/.github/workflows/_build_windows.yml index ccd6765ff..4d09caeb8 100644 --- a/.github/workflows/_build_windows.yml +++ b/.github/workflows/_build_windows.yml @@ -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' defaults: run: @@ -32,7 +37,8 @@ jobs: torch-version: ${{ matrix.torch-version }} cuda-version: ${{ matrix.cuda-version }} - - 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"` @@ -41,6 +47,17 @@ 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 + - name: Build wheel run: | source ./.github/workflows/cuda/Windows-env.sh ${{ matrix.cuda-version }} @@ -63,3 +80,19 @@ jobs: run: | pip install pytest pytest-cov pytest --cov --cov-report=xml + + - name: Upload wheel (final) + if: ${{ inputs.release-type == 'final' }} + run: | + aws s3 sync dist s3://data.pyg.org/whl/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Upload wheel (nightly) + if: ${{ inputs.release-type == 'nightly' }} + 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 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5f0a98799..d5e4e5755 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -11,6 +11,7 @@ jobs: outputs: matrix-linux: ${{ steps.set-matrix.outputs.matrix-linux }} matrix-macos: ${{ steps.set-matrix.outputs.matrix-macos }} + matrix-windows: ${{ steps.set-matrix.outputs.matrix-windows }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -34,6 +35,14 @@ jobs: echo "matrix-macos=$matrix" echo ::endgroup:: + # Set Windows matrix + echo ::group::Set Windows matrix + filename=".github/workflows/utils/full_matrix_windows.json" + matrix=$(jq -c '[.[] | { "torch-version": .["torch-version"], "python-version": .["python-version"][], "cuda-version": .["cuda-version"][] }]' $filename) + echo "matrix-windows=$matrix" >> $GITHUB_OUTPUT + echo "matrix-windows=$matrix" + echo ::endgroup:: + linux: needs: [trigger] uses: ./.github/workflows/_build_linux.yml @@ -54,9 +63,17 @@ jobs: release-type: nightly secrets: inherit + windows: + needs: [trigger] + uses: ./.github/workflows/_build_windows.yml + with: + test-matrix: ${{ needs.trigger.outputs.matrix-windows }} + release-type: nightly + secrets: inherit + index: if: always() - needs: [linux, macos] + needs: [linux, macos, windows] uses: ./.github/workflows/_upload_index.yml with: release-type: nightly diff --git a/.github/workflows/nightly_legacy.yml b/.github/workflows/nightly_legacy.yml deleted file mode 100644 index 50fa01a5a..000000000 --- a/.github/workflows/nightly_legacy.yml +++ /dev/null @@ -1,198 +0,0 @@ -name: Nightly Wheels (Legacy) - -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: - max-parallel: 10 - fail-fast: false - matrix: - # NOTE: ubuntu and macos are disabled here in favor of nightly.yml. - os: [windows-2022] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - # TODO: Uncomment this once we split the workflow to avoid GitHub Actions' 256 matrix configuration limit. - # torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0] - torch-version: [1.13.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0] - cuda-version: ['cpu', 'cu117', 'cu118', 'cu121', 'cu124', 'cu126', 'cu128'] - exclude: - - torch-version: 1.13.0 - python-version: '3.13' - - torch-version: 2.0.0 - python-version: '3.13' - - torch-version: 2.1.0 - python-version: '3.13' - - torch-version: 2.2.0 - python-version: '3.13' - - torch-version: 2.3.0 - python-version: '3.13' - - torch-version: 2.4.0 - python-version: '3.13' - - torch-version: 2.5.0 - python-version: '3.13' - - 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.13.0 - python-version: '3.11' - - 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: 1.13.0 - cuda-version: 'cu126' - - torch-version: 1.13.0 - cuda-version: 'cu128' - - torch-version: 2.0.0 - cuda-version: 'cu124' - - torch-version: 2.0.0 - cuda-version: 'cu126' - - torch-version: 2.0.0 - cuda-version: 'cu128' - - torch-version: 2.1.0 - cuda-version: 'cu117' - - torch-version: 2.1.0 - cuda-version: 'cu124' - - torch-version: 2.1.0 - cuda-version: 'cu126' - - torch-version: 2.1.0 - cuda-version: 'cu128' - - torch-version: 2.2.0 - cuda-version: 'cu117' - - torch-version: 2.2.0 - cuda-version: 'cu124' - - torch-version: 2.2.0 - cuda-version: 'cu126' - - torch-version: 2.2.0 - cuda-version: 'cu128' - - torch-version: 2.3.0 - cuda-version: 'cu117' - - torch-version: 2.3.0 - cuda-version: 'cu124' - - torch-version: 2.3.0 - cuda-version: 'cu126' - - torch-version: 2.3.0 - cuda-version: 'cu128' - - torch-version: 2.4.0 - cuda-version: 'cu117' - - torch-version: 2.4.0 - cuda-version: 'cu126' - - torch-version: 2.4.0 - cuda-version: 'cu128' - - torch-version: 2.5.0 - cuda-version: 'cu117' - - torch-version: 2.5.0 - cuda-version: 'cu126' - - torch-version: 2.5.0 - cuda-version: 'cu128' - - torch-version: 2.6.0 - cuda-version: 'cu117' - - torch-version: 2.6.0 - cuda-version: 'cu121' - - torch-version: 2.6.0 - cuda-version: 'cu128' - - torch-version: 2.7.0 - cuda-version: 'cu117' - - torch-version: 2.7.0 - cuda-version: 'cu121' - - torch-version: 2.7.0 - cuda-version: 'cu124' - - 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: macos-14 - cuda-version: 'cu126' - - os: macos-14 - cuda-version: 'cu128' - - os: windows-2022 - torch-version: 2.0.0 - cuda-version: 'cu121' - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install dependencies - 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 }} - echo $TORCH_CUDA_ARCH_LIST - pip install build - python -m build --wheel --no-isolation --outdir dist - shell: bash - - - 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@v4 - 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] - uses: .github/workflows/_upload_index.yml - with: - release-type: nightly - secrets: inherit