-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
45 lines (40 loc) · 1.44 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
---
os: linux
dist: trusty
python: "2.7"
before_script:
- export PATH=/usr/local/cuda-8.0/bin:$PATH
- export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
install:
- pip install ansible>=2.0.0 ansible-lint
- ansible --version
script:
- ansible-lint tasks/main.yml
# Prepare tests
- echo localhost > inventory
# Check syntax
- ansible-playbook --syntax-check -i inventory test.yml
# First run
- ansible-playbook -i inventory test.yml --connection=local --sudo
## Tests:
# Test nvcc installed. NOTE: refresh environment first.
- export $(env | grep PATH)
- echo $PATH
# - command -v nvcc >/dev/null 2>&1
- command -v nvcc
# Test that CUDA libraries path is in LD_LIBRARY_PATH. In Ubuntu the path
# should be in /etc/ld.so.conf.d/<name>.conf file, which exists after cuda
# Installation. Verify, that it is the same as symlink from official
# documentation: /usr/local/cuda-8.0/lib64
- diff <(readlink --canonicalize /usr/local/cuda-8.0/lib64) /etc/ld.so.conf.d/cuda-8-0.conf 2>&1
# Second run Idempotence test
- >
ansible-playbook -i inventory test.yml --connection=local --sudo
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/