[InertialSense] Reconnect after failure with delay #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration (SDK) | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
push: | |
branches: | |
- '**' | |
pull_request: | |
- 'development' | |
- 'dev_v2' | |
- 'master' | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ba_linux: | |
name: "General Software Linux" | |
runs-on: ubuntu-latest | |
# if: false # disable this job | |
defaults: | |
run: | |
working-directory: scripts | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
# token: ${{ secrets.ALL_REPO_PAT }} | |
submodules: recursive | |
fetch-depth: 0 # Fetches full commit history, needed for repo info steps in build | |
- name: Install dependencies | |
run: | | |
./install_sdk_dependencies.sh | |
./install_gtest.sh | |
- name: Clean All | |
run: | | |
rm -rf ../cltool/build ../ExampleProjects/build | |
- name: SDK Unit Tests | |
run: ./build_test_cmake.sh --build --test "SDK Unit Tests" ../src/test | |
- name: Build cltool | |
run: ./build_test_cmake.sh --build "cltool" ../cltool | |
- name: Build SDK Example Projects | |
run: ./build_test_cmake.sh --build "SDK Example Projects" ../ExampleProjects | |
ba_windows: | |
name: "General Software Windows" | |
runs-on: [self-hosted, windows, x64] | |
if: false # disable this job | |
# if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/development') || (github.ref == 'refs/heads/dev_v2') # Only run job on these branches | |
defaults: | |
run: | |
working-directory: scripts/windows | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
# token: ${{ secrets.ALL_REPO_PAT }} | |
submodules: recursive | |
fetch-depth: 0 # Fetches full commit history, needed for repo info steps in build | |
- name: Clean all | |
run: ./clean_all.bat | |
- name: Build SDK Examples | |
run: ./build_sdk_examples.bat | |
- name: Build CLTool | |
run: ./build_cltool.bat | |
ros-bridge-tests: | |
name: "ROS Bridge Tests" | |
runs-on: [self-hosted, linux, x64, focal] | |
if: false # disable this job | |
timeout-minutes: 5 | |
env: | |
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...] | |
ROS_DISTRO: noetic | |
container: | |
image: ros:noetic | |
options: --privileged -v /dev:/dev | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Update Git version to make actions/checkout happy | |
run: | | |
echo "::group::Install software-properties-common and dependencies." | |
apt-get update && apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates libyaml-cpp-dev | |
echo "::endgroup::" | |
echo "::group::Configure git-core ppa and install latest." | |
add-apt-repository ppa:git-core/ppa -y && apt -y install git | |
echo "::endgroup::" | |
git --version | |
- name: Checkout source and submodules | |
uses: actions/checkout@v3 | |
with: | |
# token: ${{ secrets.ALL_REPO_PAT }} | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
cd ${GITHUB_WORKSPACE}/scripts | |
../SDK/scripts/install_sdk_dependencies.sh | |
./install_gtest.sh | |
- name: Setup ROS environment | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
echo "::group::Install ROS packages." | |
apt -y install ros-${ROS_DISTRO}-tf libusb-1.0-0-dev | |
echo "::endgroup::" | |
- name: Setup Catkin Workspace and Build | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
cd ${GITHUB_WORKSPACE}/catkin_ws && catkin_make && catkin_make test_unit_tests && catkin_make test_ros_bridge | |
- name: Run Unit Tests | |
run: | | |
cd ${GITHUB_WORKSPACE}/catkin_ws && source devel/setup.bash | |
rm -rf build/test_results | |
roscore & | |
catkin_make run_tests_inertial_sense_ros_gtest_test_unit_tests && catkin_test_results | |
pkill roscore | |
- name: Run Functional/Integration Tests (via hardware) | |
run: | | |
cd ${GITHUB_WORKSPACE}/catkin_ws && source devel/setup.bash | |
rostest inertial_sense_ros test_ros_bridge.launch && catkin_test_results || (rostest --text inertial_sense_ros test_ros_bridge.launch && catkin_test_results && false) | |