|
| 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 | + os: [ubuntu-16.04, macos-10.15, windows-latest] |
| 14 | + python-version: [3.6, 3.7, 3.8, 3.9] |
| 15 | + torch-version: [1.8.0, 1.9.0] |
| 16 | + cuda-version: ['cpu', 'cu101', 'cu102', 'cu111'] |
| 17 | + exclude: |
| 18 | + - torch-version: 1.9.0 |
| 19 | + cuda-version: 'cu101' |
| 20 | + - os: macos-10.15 |
| 21 | + cuda-version: 'cu101' |
| 22 | + - os: macos-10.15 |
| 23 | + cuda-version: 'cu102' |
| 24 | + - os: macos-10.15 |
| 25 | + cuda-version: 'cu111' |
| 26 | + - os: windows-latest |
| 27 | + cuda-version: 'cu101' |
| 28 | + |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v2 |
| 31 | + - name: Set up Conda for Python ${{ matrix.python-version }} |
| 32 | + uses: conda-incubator/setup-miniconda@v2 |
| 33 | + with: |
| 34 | + python-version: ${{ matrix.python-version }} |
| 35 | + |
| 36 | + - name: Install Conda packages |
| 37 | + run: | |
| 38 | + conda install conda-build conda-verify --yes |
| 39 | + shell: |
| 40 | + bash -l {0} |
| 41 | + |
| 42 | + - name: Install CUDA ${{ matrix.cuda-version }} |
| 43 | + if: ${{ matrix.cuda-version != 'cpu' }} |
| 44 | + run: | |
| 45 | + bash .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}.sh |
| 46 | + shell: |
| 47 | + bash |
| 48 | + |
| 49 | + - name: Build Conda package for CPU |
| 50 | + if: ${{ matrix.cuda-version == 'cpu' }} |
| 51 | + run: | |
| 52 | + FORCE_CUDA=0 ./conda/pytorch-scatter/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }} |
| 53 | + shell: |
| 54 | + bash -l {0} |
| 55 | + |
| 56 | + - name: Build Conda package for GPU |
| 57 | + if: ${{ matrix.cuda-version != 'cpu' }} |
| 58 | + run: | |
| 59 | + source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh |
| 60 | + FORCE_CUDA=1 ./conda/pytorch-scatter/build_conda.sh ${{ matrix.python-version }} ${{ matrix.torch-version }} ${{ matrix.cuda-version }} |
| 61 | + shell: |
| 62 | + bash -l {0} |
| 63 | + |
| 64 | + - name: Publish Conda package |
| 65 | + run: | |
| 66 | + conda install anaconda-client --yes |
| 67 | + anaconda upload --force --label main $HOME/conda-bld/*/*.tar.bz2 |
| 68 | + env: |
| 69 | + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} |
| 70 | + shell: |
| 71 | + bash -l {0} |
0 commit comments