mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
travis: Add native tests
This commit is contained in:
16
.travis.yml
16
.travis.yml
@@ -50,6 +50,22 @@ jobs:
|
||||
tags: true
|
||||
draft: true
|
||||
name: ${TRAVIS_TAG}
|
||||
- stage: Build
|
||||
name: "Native Kinetic build"
|
||||
env:
|
||||
- NATIVE_DOCKER=ros:kinetic-ros-base
|
||||
before_script:
|
||||
- docker pull ${NATIVE_DOCKER}
|
||||
script:
|
||||
- docker run --rm -v $(pwd):/root/catkin_ws/src/clever ${NATIVE_DOCKER} /root/catkin_ws/src/clever/builder/standalone-install.sh
|
||||
- stage: Build
|
||||
name: "Native Melodic build"
|
||||
env:
|
||||
- NATIVE_DOCKER=ros:melodic-ros-base
|
||||
before_script:
|
||||
- docker pull ${NATIVE_DOCKER}
|
||||
script:
|
||||
- docker run --rm -v $(pwd):/root/catkin_ws/src/clever ${NATIVE_DOCKER} /root/catkin_ws/src/clever/builder/standalone-install.sh
|
||||
- stage: Build
|
||||
name: "Documentation"
|
||||
language: node_js
|
||||
|
||||
27
builder/standalone-install.sh
Normal file
27
builder/standalone-install.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Perform a "standalone install" in a Docker container
|
||||
|
||||
# Step 1: Install pip
|
||||
apt update
|
||||
apt install curl
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
python ./get-pip.py
|
||||
|
||||
# Step 2: Run rosdep to install all dependencies
|
||||
cd /root/catkin_ws
|
||||
rosdep install --from-paths src --ignore-src -y
|
||||
# Step 2.5: mavros can't install its geographiclib dependencies
|
||||
curl https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh -o install_geographiclib_datasets.sh
|
||||
chmod a+x ./install_geographiclib_datasets.sh
|
||||
./install_geographiclib_datasets.sh
|
||||
|
||||
# Step 3: Build the packages
|
||||
cd /root/catkin_ws
|
||||
catkin_make
|
||||
|
||||
# Step 4: Run tests
|
||||
pip install --upgrade pytest
|
||||
cd /root/catkin_ws
|
||||
source devel/setup.bash
|
||||
catkin_make run_tests && catkin_test_results
|
||||
Reference in New Issue
Block a user