.travis.yml 6.37 KB
Newer Older
rusty1s's avatar
rusty1s committed
1
2
3
language: shell

os:
rusty1s's avatar
cmake  
rusty1s committed
4
  - linux
rusty1s's avatar
rusty1s committed
5
  - osx
rusty1s's avatar
rusty1s committed
6
7
  - windows

rusty1s's avatar
rusty1s committed
8
9
10
env:
  global:
    - CUDA_HOME=/usr/local/cuda
rusty1s's avatar
rusty1s committed
11
  jobs:
rusty1s's avatar
rusty1s committed
12
    # Python 3.6
rusty1s's avatar
rusty1s committed
13
14
15
16
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cpu
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu101
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu102
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu111
rusty1s's avatar
reset  
rusty1s committed
17
18
19
20
21
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
    - PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
22
    # Python 3.7
rusty1s's avatar
rusty1s committed
23
24
25
26
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cpu
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu101
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu102
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu111
rusty1s's avatar
reset  
rusty1s committed
27
28
29
30
31
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
    - PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
32
    # Python 3.8
rusty1s's avatar
rusty1s committed
33
34
35
36
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cpu
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu101
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu102
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu111
rusty1s's avatar
reset  
rusty1s committed
37
38
39
40
41
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
    - PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
42

rusty1s's avatar
rusty1s committed
43
jobs:
rusty1s's avatar
rusty1s committed
44
  # For daily builds, we only test on Python 3.6 with 11.0/11.1.
rusty1s's avatar
rusty1s committed
45
46
  # For deployment, we exclude *all* macOS CUDA and Windows CUDA 9.2 jobs.
  exclude:
rusty1s's avatar
rusty1s committed
47
48
49
50
51
52
53
54
55
56
    # Python 3.6 / PyTorch 1.8.0
    - if: not (tag is present or commit_message =~ ci-deploy) and os != osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cpu
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu101
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu102
    - if: os = osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu111
    # Python 3.6 / PyTorch 1.7.0
rusty1s's avatar
rusty1s committed
57
58
59
60
61
62
    - if: not (tag is present or commit_message =~ ci-deploy) and os != osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
    - if: not (tag is present or commit_message =~ ci-deploy) or os != linux
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
rusty1s's avatar
rusty1s committed
63
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
64
65
66
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
    - if: os = osx
      env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
67
68
69
    # Python 3.7 / PyTorch 1.8.0
    - if: not (tag is present or commit_message =~ ci-deploy)
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cpu
rusty1s's avatar
rusty1s committed
70
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
71
72
73
74
75
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu101
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu102
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu111
rusty1s's avatar
rusty1s committed
76
    - if: not (tag is present or commit_message =~ ci-deploy)
rusty1s's avatar
rusty1s committed
77
    # Python 3.7 / PyTorch 1.7.0
rusty1s's avatar
rusty1s committed
78
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
rusty1s's avatar
rusty1s committed
79
    - if: not (tag is present or commit_message =~ ci-deploy) or os != linux
rusty1s's avatar
rusty1s committed
80
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
rusty1s's avatar
rusty1s committed
81
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
82
83
84
85
86
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
87
    # Python 3.8 / PyTorch 1.8.0
rusty1s's avatar
rusty1s committed
88
    - if: not (tag is present or commit_message =~ ci-deploy)
rusty1s's avatar
rusty1s committed
89
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cpu
rusty1s's avatar
rusty1s committed
90
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
91
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu101
rusty1s's avatar
rusty1s committed
92
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
93
94
95
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu102
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu111
rusty1s's avatar
rusty1s committed
96
    - if: not (tag is present or commit_message =~ ci-deploy)
rusty1s's avatar
rusty1s committed
97
    # Python 3.8 / PyTorch 1.7.0
rusty1s's avatar
rusty1s committed
98
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
rusty1s's avatar
rusty1s committed
99
    - if: not (tag is present or commit_message =~ ci-deploy) or os != linux
rusty1s's avatar
rusty1s committed
100
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
rusty1s's avatar
rusty1s committed
101
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
102
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
rusty1s's avatar
rusty1s committed
103
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
rusty1s's avatar
rusty1s committed
104
105
106
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
    - if: not (tag is present or commit_message =~ ci-deploy) or os = osx
      env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
rusty1s's avatar
rusty1s committed
107

rusty1s's avatar
rusty1s committed
108
install:
rusty1s's avatar
rusty1s committed
109
  - source script/gcc.sh
rusty1s's avatar
rusty1s committed
110
111
  - source script/cuda.sh
  - source script/conda.sh
rusty1s's avatar
cmake  
rusty1s committed
112
  - source script/metis.sh
rusty1s's avatar
rusty1s committed
113
114
  - conda create --yes -n test python="${PYTHON_VERSION}"
  - source activate test
rusty1s's avatar
rusty1s committed
115
  - conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch -c conda-forge --yes
rusty1s's avatar
rusty1s committed
116
  - source script/torch.sh
rusty1s's avatar
rusty1s committed
117
  - pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH_VERSION}+${IDX}.html
rusty1s's avatar
rusty1s committed
118
119
  - pip install flake8
  - pip install codecov
rusty1s's avatar
rusty1s committed
120
  - pip install scipy==1.4.1
rusty1s's avatar
rusty1s committed
121
  - travis_wait 30 pip install -e .
rusty1s's avatar
rusty1s committed
122
123
124
125
script:
  - flake8 .
  - python setup.py test
after_success:
rusty1s's avatar
rusty1s committed
126
127
  - python setup.py bdist_wheel --dist-dir=dist
  - ls -lah dist/
rusty1s's avatar
rusty1s committed
128
129
130
131
132
133
134
135
  - codecov
deploy:
  provider: s3
  region: eu-central-1
  edge: true
  access_key_id: ${S3_ACCESS_KEY}
  secret_access_key: ${S3_SECRET_ACCESS_KEY}
  bucket: pytorch-geometric.com
rusty1s's avatar
rusty1s committed
136
137
  local_dir: dist
  upload_dir: whl/torch-${TORCH_VERSION}+${IDX}
rusty1s's avatar
rusty1s committed
138
139
140
141
142
143
144
  acl: public_read
  on:
    all_branches: true
    repo: rusty1s/pytorch_sparse
    condition: $TRAVIS_TAG != "" || $TRAVIS_COMMIT_MESSAGE =~ ci-deploy
notifications:
  email: false