Skip to content

feat:

feat: #1

name: Building Conda
on:
workflow_dispatch: {}
push:
branches: [ "**" ]
tags: [ "*" ]
jobs:
conda-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04']
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: ['1.11.0', '1.13.1']
cuda-version: ['cpu', 'cu113']
#exclude:
# - torch-version: 1.12.0
# cuda-version: 'cu115'
# - os: ubuntu-18.04
# cuda-version: 'cu115'
steps:
- uses: actions/checkout@v2
- name: Set up Conda for Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Free up disk space
if: ${{ runner.os == 'Linux' }}
run: |
sudo rm -rf /usr/share/dotnet
- name: Free up disk space
if: ${{ runner.os == 'Linux' }}
run: |
sudo rm -rf /usr/share/dotnet
- 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: Build Conda package for CPU
if: ${{ matrix.cuda-version == 'cpu' }}
run: |
FORCE_CUDA=0 TORCH_CUDA_ARCH_LIST=0 ./conda/torch-points-kernels/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/torch-points-kernels/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }}
shell:
bash -l {0}
- name: Publish Conda package
run: |
conda install anaconda-client --yes
anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.CONDA_TOKEN }}
shell:
bash -l {0}