Respect --nobuild option #2374
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: | |
- 'develop' | |
- 'main' | |
tags: | |
- '\d+.\d.+\d+*' | |
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@v4 | |
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: ./clean_all.sh | |
- name: Build SDK | |
run: ./build_is_sdk.sh | |
- name: Build Unit Tests | |
run: ./build_unit_tests.sh | |
- name: Run Unit Tests | |
run: ./build_unit_tests.sh --nobuild --test | |
- name: Build cltool | |
run: ./build_cltool.sh | |
- name: Build LogInspector | |
run: ./build_log_inspector.sh | |
- name: Build SDK Examples | |
run: python3 build_manager.py SDK_Examples ../ExampleProjects | |
ba_windows: | |
name: "General Software Windows" | |
runs-on: [self-hosted, windows, x64] | |
# if: false # disable this job | |
# if: (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/develop') # Only run job on these branches | |
defaults: | |
run: | |
working-directory: scripts/windows | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
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 IS SDK library | |
run: ./build_is_sdk.bat | |
- name: Build Unit Tests | |
run: ./build_unit_tests.bat | |
- name: Build CLTool | |
run: ./build_cltool.bat | |
- name: Build LogInspector | |
run: ./build_log_inspector.bat | |
- name: Build SDK Examples | |
run: ./build_sdk_examples.bat | |
ros1-bridge-tests: | |
name: "ROS1 Bridge Tests" | |
runs-on: [self-hosted, Linux, X64, docker, focal] | |
# if: false # disable this job | |
env: | |
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...] | |
ROS_DISTRO: noetic | |
container: | |
image: ros:noetic | |
#options: --privileged -v /dev:/dev | |
options: --device-cgroup-rule="c 166:* rmw" | |
volumes: | |
- "/dev:/dev" | |
defaults: | |
run: | |
working-directory: ../ROS/catkin_ws | |
shell: bash | |
steps: | |
- name: Update Git version to make actions/checkout happy | |
working-directory: . | |
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@v4 | |
with: | |
# token: ${{ secrets.ALL_REPO_PAT }} | |
submodules: recursive | |
- name: Install dependencies | |
working-directory: scripts | |
run: | | |
./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 | |
catkin_make -DCATKIN_BLACKLIST_PACKAGES="inertial_sense_ros2" | |
catkin_make test_unit_tests | |
catkin_make test_ros_bridge | |
- name: Run Unit Tests | |
run: | | |
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: | | |
source devel/setup.bash | |
roscore & | |
catkin_make run_tests_inertial_sense_ros_gtest_test_ros_bridge | |
catkin_test_results | |
ros2-bridge-tests: | |
name: "ROS2 Bridge Tests" | |
runs-on: [self-hosted, Linux, X64, docker, focal] | |
# if: false # disable this job | |
container: | |
image: osrf/ros:jazzy-desktop | |
options: --device-cgroup-rule="c 166:* rmw" | |
volumes: | |
- "/dev:/dev" | |
defaults: | |
run: | |
working-directory: ../ROS/ros2_ws # This is outside the scope of git | |
shell: bash | |
steps: | |
- name: Install libboost | |
run: | | |
/ros_entrypoint.sh /bin/bash -e -c " | |
rm -rf ../../inertial-sense-sdk/* log/ build/ install/ &>/dev/null || true | |
apt-get update && apt-get -y install libboost-all-dev | |
" | |
- name: Checkout source and submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# - name: Install dependencies | |
# run: | | |
# /ros_entrypoint.sh /bin/bash -e -c " | |
# ../../inertial-sense-sdk/scripts/install_python_dependencies.sh | |
# " | |
- name: Build IS SDK library | |
run: | | |
/ros_entrypoint.sh /bin/bash -e -c " | |
../../inertial-sense-sdk/scripts/build_is_sdk.sh | |
" | |
- name: Build ROS2 bridge | |
run: | | |
/ros_entrypoint.sh /bin/bash -e -c " | |
colcon build | |
" | |
- name: Run Functional/Integration Tests (via hardware) | |
run: | | |
/ros_entrypoint.sh /bin/bash -e -c " | |
source install/setup.bash | |
ros2 run inertial_sense_ros2 test_inertial_sense_ros2 | |
" |