| 1 |
name: Building Conda |
| 2 |
|
| 3 |
on: [workflow_dispatch] |
| 4 |
|
| 5 |
jobs: |
| 6 |
|
| 7 |
conda-build: |
| 8 |
runs-on: ${{ matrix.os }} |
| 9 |
|
| 10 |
strategy: |
| 11 |
fail-fast: false |
| 12 |
matrix: |
| 13 |
# We have trouble building for Windows - drop for now. |
| 14 |
os: [ubuntu-20.04, macos-11] # windows-2019 |
| 15 |
python-version: ['3.8', '3.9', '3.10', '3.11'] |
| 16 |
torch-version: [2.0.0, 2.1.0] |
| 17 |
cuda-version: ['cpu', 'cu117', 'cu118', 'cu121'] |
| 18 |
exclude: |
| 19 |
- torch-version: 2.0.0 |
| 20 |
cuda-version: 'cu121' |
| 21 |
- torch-version: 2.1.0 |
| 22 |
cuda-version: 'cu117' |
| 23 |
- os: macos-11 |
| 24 |
cuda-version: 'cu117' |
| 25 |
- os: macos-11 |
| 26 |
cuda-version: 'cu118' |
| 27 |
- os: macos-11 |
| 28 |
cuda-version: 'cu121' |
| 29 |
|
| 30 |
steps: |
| 31 |
- uses: actions/checkout@v2 |
| 32 |
- name: Set up Conda for Python ${{ matrix.python-version }} |
| 33 |
uses: conda-incubator/setup-miniconda@v2 |
| 34 |
with: |
| 35 |
python-version: ${{ matrix.python-version }} |
| 36 |
|
| 37 |
- name: Free Disk Space (Ubuntu) |
| 38 |
if: ${{ runner.os == 'Linux' }} |
| 39 |
uses: jlumbroso/free-disk-space@main |
| 40 |
|
| 41 |
- name: Install Conda packages |
| 42 |
run: | |
| 43 |
conda install conda-build conda-verify --yes |
| 44 |
shell: |
| 45 |
bash -l {0} |
| 46 |
|
| 47 |
- name: Install CUDA ${{ matrix.cuda-version }} |
| 48 |
if: ${{ matrix.cuda-version != 'cpu' }} |
| 49 |
run: | |
| 50 |
bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh |
| 51 |
shell: |
| 52 |
bash |
| 53 |
|
| 54 |
- name: Build Conda package for CPU |
| 55 |
if: ${{ matrix.cuda-version == 'cpu' }} |
| 56 |
run: | |
| 57 |
FORCE_CUDA=0 TORCH_CUDA_ARCH_LIST=0 ./conda/pytorch-scatter/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }} |
| 58 |
shell: |
| 59 |
bash -l {0} |
| 60 |
|
| 61 |
- name: Build Conda package for GPU |
| 62 |
if: ${{ matrix.cuda-version != 'cpu' }} |
| 63 |
run: | |
| 64 |
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh |
| 65 |
./conda/pytorch-scatter/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }} |
| 66 |
shell: |
| 67 |
bash -l {0} |
| 68 |
|
| 69 |
- name: Publish Conda package on organization channel |
| 70 |
run: | |
| 71 |
conda install anaconda-client --yes |
| 72 |
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2 |
| 73 |
env: |
| 74 |
ANACONDA_API_TOKEN: ${{ secrets.PYG_ANACONDA_TOKEN }} |
| 75 |
shell: |
| 76 |
bash -l {0} |
| 77 |
|
| 78 |
- name: Publish Conda package on personal channel |
| 79 |
run: | |
| 80 |
conda install anaconda-client --yes |
| 81 |
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2 |
| 82 |
env: |
| 83 |
ANACONDA_API_TOKEN: ${{ secrets.RUSTY1S_ANACONDA_TOKEN }} |
| 84 |
shell: |
| 85 |
bash -l {0} |