-
Notifications
You must be signed in to change notification settings - Fork 73
/
.travis.yml
96 lines (89 loc) · 3.27 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
language: cpp
branches:
only:
- master
sudo: enabled
compiler:
- gcc
matrix:
include:
- os: osx
python: "3.7"
env:
- BADGE=py3.7
before_install:
### Update RCS keywords
- printf '\n[filter "rcs-keywords"]\n\tclean = .git_filters/rcs-keywords.clean\n\tsmudge = .git_filters/rcs-keywords.smudge %f\n' >> .git/config
- rm -rf src/*.c
- git checkout src/*.c
### Install libomp
- export HOMEBREW_NO_AUTO_UPDATE=1
- export HOMEBREW_NO_INSTALL_CLEANUP=1
- brew install libomp
- brew link --force libomp
- pyenv install --list
- pyenv install 3.6.0
- pyenv install 3.8.0
### Install CUDA
- curl -o cuda.zip --insecure https://mcx.space/dev/ci/cuda-10-2-0.zip
- unzip cuda.zip
- sudo mv cuda/ /usr/local/
- sudo chmod +x /usr/local/cuda/bin/*
- sudo chmod +x /usr/local/cuda/nvvm/bin/*
- CUDA_HOME=/usr/local/cuda
- CUDA_PATH=${CUDA_HOME}/bin
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
- PATH=${CUDA_PATH}:.:${PATH}
- ln -s /usr/local/opt/libomp/include/*.h /usr/local/cuda/include
script:
- mv src pmcx
- cd pmcx/
- perl -pi -e 's/..\/src\//src\//g' setup.py
### build module with python 3.6
- pyenv global 3.6.0
- unlink $(which python)
- ln -s $(pyenv which python) /usr/local/bin/python
- unlink $(which pip)
- ln -s $(pyenv which pip) /usr/local/bin/pip
- python --version
- python -m pip install --upgrade pip
- python -m pip install wheel
- python -m pip wheel . -w ../dist/ --verbose
### build module with python 3.8
- pyenv global 3.8.0
- unlink $(which python)
- ln -s $(pyenv which python) /usr/local/bin/python
- unlink $(which pip)
- ln -s $(pyenv which pip) /usr/local/bin/pip
- python --version
- python -m pip install --upgrade pip
- python -m pip install wheel
- python -m pip wheel . -w ../dist/ --verbose
### build module with python 3.7
- unlink $(which python)
- ln -s $(which python3) /usr/local/bin/python
- unlink $(which pip)
- ln -s $(which pip3) /usr/local/bin/pip
- python --version
- python -m pip install --upgrade pip
- python -m pip install wheel
- python -m pip wheel . -w ../dist/ --verbose
### checking pypi upload status
- cd ..
- ls -lt dist/*
- chmod +x .github/check-pypi-upload.sh
- GITHUB_OUTPUT=./pypi_upload .github/check-pypi-upload.sh
- export UPLOAD_TO_PYPI=`cat ./pypi_upload | sed -e 's/.*=\([01]\)/\1/g'`
- pip install --upgrade setuptools twine
- mv pmcx pmcx0
- mv test test0
- mv pmcx0/* .
deploy:
provider: pypi
username: "__token__"
distributions: "bdist_wheel"
skip_cleanup: true
password:
secure: cY74UjxKDiP3tTgQoYlAt06MlD8A1t2HPDDWqv+8UN9O0npoBZvyheXkaGRxd5Qx8CmapI12KfLCZl4wC3xEh9zUtPn20JwglKOYi6myOtnzn1QtUU9cNsP3IOFdZmDUNivaa02vyCONwg98d7nRUKaG9OoIJ7dN1zO26gT8G0cY5xnwmqw9ycwqQWb5waRFxS9Pel4QA3jm8gRC7FYezXWkvwLSCsMHPvf4ddYiMk5aTKmASAJ2gvieHzefuoswB+ujHUDt+UMwlr9iL9QgIwJtV6jO0z5aW7ruOSQa6ZvbN62Vtrd/ocY7ADx5MeOOb3S8hDsI7a1osJHGQKePzE22+dcBU92UOWfkEgefzdd2L26kyst3Qjlqh3eR4frPUTQUipeK/XIQ4o0sL4gMd4zXpXskyUXQr6Y0EsdRT5buDure2qiLBVA+3USTKCv8Gu2WJIwHwrNab0LThtAtKkgiwvebQBEbRYR2mkJicjZYJSsvEbL7aKounBxNv2lqOl+wul9sH5BEWcnBrbZ5h15BbNGJoTjmNQINTbkNSvsITHA2u3CT7aRL+WJ6XuoRSX8WNOn8+OLaOJoHSCpoDo6MR4Z+B4Q0IGvjdbOmzH3KVYopGjQb1YCu+a5m+QqRKO7SXAX6aJd9KLav9mLUIWVZCvFodvEhJwuW34RqeG8=
on:
condition: $UPLOAD_TO_PYPI = 1