Skip to content

Building Conda

Building Conda #60

Workflow file for this run

name: Building Conda
on: [workflow_dispatch]
jobs:
conda-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# We have trouble building for Windows - drop for now.
os: [ubuntu-20.04, macos-11] # windows-2019
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
torch-version: [2.2.0] # [2.1.0, 2.2.0]
cuda-version: ['cpu', 'cu118', 'cu121']
exclude:
- python-version: '3.12' # Python 3.12 not yet supported in `conda-build`.
- torch-version: 2.1.0
python-version: '3.12'
- os: macos-11
cuda-version: 'cu118'
- os: macos-11
cuda-version: 'cu121'
# Fails with:
# * note: 'value' has been explicitly marked unavailable here
# * error: 'value' is unavailable: introduced in macOS 10.13
- torch-version: 2.2.0
os: macos-11
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Conda for Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Free Disk Space (Ubuntu)
if: ${{ runner.os == 'Linux' }}
uses: jlumbroso/free-disk-space@main
- name: Install Conda packages
run: |
conda install conda-build conda-verify --yes
shell:
bash -l {0}
- name: Install CUDA ${{ matrix.cuda-version }}
if: ${{ matrix.cuda-version != 'cpu' }}
run: |
bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh
shell:
bash
- name: Install METIS
if: ${{ runner.os != 'Windows' }}
run: |
bash .github/workflows/metis.sh
- name: Install METIS on Windows
if: ${{ runner.os == 'Windows' }}
run: |
bash .github/workflows/metis-${{ runner.os }}.sh
shell:
bash -l {0}
- name: Build Conda package for CPU
if: ${{ matrix.cuda-version == 'cpu' }}
run: |
FORCE_CUDA=0 TORCH_CUDA_ARCH_LIST=0 ./conda/pytorch-sparse/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
shell:
bash -l {0}
- name: Build Conda package for GPU
if: ${{ matrix.cuda-version != 'cpu' }}
run: |
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh
./conda/pytorch-sparse/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
shell:
bash -l {0}
- name: Publish Conda package on organization channel
run: |
conda install anaconda-client --yes
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.PYG_ANACONDA_TOKEN }}
shell:
bash -l {0}
- name: Publish Conda package on personal channel
run: |
conda install anaconda-client --yes
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.RUSTY1S_ANACONDA_TOKEN }}
shell:
bash -l {0}