-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.travis.yml
135 lines (127 loc) · 5.68 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
sudo: required
env:
global:
# for pip (--user)
- PATH=$HOME/.local/bin:$PATH
services:
- docker
language: generic
cache:
directories:
- $HOME/.nimtorch/
- $HOME/.torch-folder/
- $HOME/.conda/
stages:
- compile
- test
- deploy
notifications:
slack:
secure: GboTdvcsbPacYBE9XArFxryJdKwCXGPWGDDkgu1KgOc9R0rVvXfbPZ8WR4qEY/yeR/Dr7xphNazxB5mEfiloUjSbUeMTrdUafTQhXqNWJrSd88ZZ1DYN4EFmGCu3NXA1EjFdrP3zk2JOmldJtuAAg/Y4Th7kvmNyw2afR8LsCNEa2bVRZkJkTBhq9SJ9wNkhh4COlG0DMQK1sKPk613GuiTxB2tJNWWoueWv9tHoa+ZfRoG6PJKgumWl8uu3B5z6hSXc1byq9R6wya3CNOPcDmMFpM87D0fNWjg2+KxRfUEX6EQewG/PcUe2Wt54RYDzORMsv66N6sxi9Gv4mK8EKm3octTO330oWnyQflPfw2csPeYQ01d9+X2PmXXWiCf8SGNTqE5/BWCBxM5N5OVzTsrU9vL7LVecirtGPXWX1JshHVin7isi8i3uhAR7R6zddhHsMJesHj6Uqj79bBDPPZ5yWDoCtVsvGnclulc/uIGZmg96LX9v103iyGNWIyGvKj5oPeoxQQgnm+/APo1hJ53g/AHcmvBZhAgJs7SufWGq0ttacPFXWqNynKHSqY/Mu93LoZkgJUi5UDRjx7VyzREFHMTAj36hQPZvm8n/BmecoCwdUVVUu/RhmbzhGHhtNb+9o5cXpEJdqnz8k26wra/zFpFx2xlaSzk/4ZoIP10=
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
matrix:
include:
- stage: compile
if: branch = release
name: "Compile ATEN static-lite"
os: linux
script:
# Build
- cd docker
- docker build -f Dockerfile-aten-static-lite -t docker_aten --build-arg TOKEN=$CONDA_TOKEN --build-arg PYTORCH_COMMIT=`cat ../torch/commit.txt` .
- stage: compile
if: branch = release
name: "Compile ATEN static-mkl"
os: linux
script:
# Build
- cd docker
- docker build -f Dockerfile-aten-static-mkl -t docker_aten --build-arg TOKEN=$CONDA_TOKEN --build-arg PYTORCH_COMMIT=`cat ../torch/commit.txt` .
- stage: compile
if: branch = release
name: "Compile ATEN static-lite"
os: osx
script:
# go home
- cd
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda install pip cmake conda-build anaconda-client
- pip install pyyaml
- pip install typing
- export PYTORCH_COMMIT=`cat torch/commit.txt`
- export MACOSX_DEPLOYMENT_TARGET=10.13
- git clone -b fragcolor-devel https://github.com/fragcolor-xyz/pytorch.git
- cd pytorch
- git reset --hard $PYTORCH_COMMIT
- git submodule update --init --recursive
- mkdir built
- cd built
- cmake -DPYTHON_EXECUTABLE=python -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_ATEN_ONLY=ON -DCMAKE_INSTALL_PREFIX=`pwd`/output ../
- make -j 10
- make install
- make clean
- cp ../tools/autograd/derivatives.yaml `pwd`/output/share/
- cd ../..
- export ATEN=`pwd`/pytorch/built/output
# go back and build conda pkg + upload
- cd $TRAVIS_BUILD_DIR
- cd docker/conda
- conda build aten_lite
- anaconda -t $CONDA_TOKEN upload --skip ~/miniconda/conda-bld/osx-64/aten-*.tar.bz2
- stage: test
name: "CPU Linux Tests"
os: linux
script:
- docker build -f docker/Dockerfile-tests-cuda10.0 -t nimtorch-test --build-arg USER_ID=`id -u` --build-arg GROUP_ID=`id -g` --build-arg ATEN=`cat conda/nimtorch/meta.yaml | grep -o "aten ==[12][0-9]*.[01][0-9]*.[0-3][0-9]*.[0-9]*" | sed -r "s/aten /aten/g"` .
- docker run --name test_nimtorch_native -t -u`id -u`:`id -g` nimtorch-test:latest nimble test
- docker run --rm -t -u`id -u`:`id -g` nimtorch-test:latest nimble test_clang
- stage: test
name: "CPU macOS Tests"
os: osx
script:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- export MACOSX_DEPLOYMENT_TARGET=10.13
- conda create -n nimtorch_testing -c fragcolor pyyaml pip nim=0.19.9.1 fragments=0.1.27 `cat conda/nimtorch/meta.yaml | grep -o "aten ==[12][0-9]*.[01][0-9]*.[0-3][0-9]*.[0-9]*" | sed -E "s/aten /aten/g"`
- export ATEN=$HOME/miniconda/envs/nimtorch_testing
- export PATH="$PATH:$HOME/miniconda/envs/nimtorch_testing/bin"
- pip install pyyaml # seems needed
- nimble test --nimcache:./nimcache
- stage: test
name: "CPU macOS Tests lite"
os: osx
script:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- export MACOSX_DEPLOYMENT_TARGET=10.13
- conda install -c fragcolor nim=0.19.9.1 fragments=0.1.27 lite `cat conda/nimtorch/meta.yaml | grep -o "aten ==[12][0-9]*.[01][0-9]*.[0-3][0-9]*.[0-9]*" | sed -E "s/aten /aten/g"`
- export ATEN=$HOME/miniconda
- nimble test_static --nimcache:./nimcache
- stage: test
name: "WASM Tests"
os: linux
script:
- docker build -f docker/Dockerfile-tests-wasm -t nimtorch-test --build-arg USER_ID=`id -u` --build-arg GROUP_ID=`id -g` --build-arg ATEN=`cat conda/nimtorch/meta.yaml | grep -o "aten ==[12][0-9]*.[01][0-9]*.[0-3][0-9]*.[0-9]*" | sed -r "s/aten /aten/g"` .
- docker run --rm -t -u`id -u`:`id -g` nimtorch-test:latest /bin/bash -c "source /etc/profile.d/emscripten.sh && nimble test_wasm"