forked from USC-ACTLab/crazyswarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (87 loc) · 3.19 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
cache:
apt
git:
submodules: false
os:
- linux
- osx
dist:
xenial
env:
global:
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
- ROS_PARALLEL_JOBS='-j8 -l6'
jobs:
- ANACONDA=false ROS_DISTRO=kinetic
- ANACONDA=true ROS_DISTRO=
# TODO: support ROS w/ Anaconda?
language: generic
jobs:
exclude:
- env: ANACONDA=false ROS_DISTRO=kinetic
os: osx
allow_failures:
- env: ANACONDA=true ROS_DISTRO=
os: osx
# Something around March 2020 caused the Mac build to start failing.
# It seems related to ctypes and/or libffi - the Python standard library?
before_install:
- |
if "$ANACONDA"; then
# Install the right Miniconda for the OS.
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
bash miniconda.sh -b -p $HOME/miniconda
source "$HOME/miniconda/etc/profile.d/conda.sh"
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
conda env create -f conda_env.yaml
conda activate crazyswarm
else
# assert not TRAVIS_OS_NAME == "osx"
# Install non-ROS system dependencies.
sudo apt install -y git swig libpython-dev python-numpy python-yaml python-matplotlib python-pytest
# Install firmware cross-compiler and hardware driver dependencies.
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt install -y gcc-arm-embedded libusb-1.0-0-dev sdcc
# Set the python path manually to include /usr/-/python2.7/dist-packages
# as this is where apt-get installs python packages.
PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
fi
- |
if [ "$ROS_DISTRO" != "" ]; then
# assert TRAVIS_OS_NAME == "linux"
# assert not ANACONDA
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update -qq
sudo apt-get install dpkg
sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-ros-base
source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep to install dependencies.
sudo rosdep init
rosdep update
sudo apt install -y ros-$ROS_DISTRO-vrpn ros-$ROS_DISTRO-tf ros-$ROS_DISTRO-tf-conversions
# Install non-ROS dependencies that only seem to install correctly
# in the post-ROS system state. (TODO: figure out why.)
sudo apt install -y libpcl-dev
fi
script:
- |
if [ "$ROS_DISTRO" != "" ]; then
./build.sh
else
./buildSimOnly.sh
fi
cd ros_ws/src/crazyswarm/scripts
python -m pytest