Update system_alert publisher to transient local QoS #463
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
defaults: | |
run: | |
shell: bash | |
working-directory: "/opt/carma/" | |
runs-on: ubuntu-latest | |
container: | |
image: usdotfhwastoldev/carma-base:develop | |
env: | |
INIT_ENV: "/home/carma/.base-image/init-env.sh" | |
ROS_2_ENV: "/opt/ros/foxy/setup.bash" | |
TERM: xterm | |
options: "--user root" | |
steps: | |
- name: Checkout ${{ github.event.repository.name }} | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
path: src/${{ github.event.repository.name }} | |
- name: Move source code | |
run: mv $GITHUB_WORKSPACE/src /opt/carma/ | |
- name: Checkout dependencies | |
run: | | |
source "$INIT_ENV" | |
git clone -b develop --depth 1 https://github.com/usdot-fhwa-stol/carma-msgs.git src/CARMAMsgs | |
- name: Build ROS1 | |
run: | | |
source "$INIT_ENV" | |
PACKAGES=$(find . -maxdepth 2 -type f -name package.xml | sed 's/\.\///' | cut -d/ -f1) | |
sed -i '/colcon build/ s/$/ --parallel-workers 4 --packages-up-to $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash | |
make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov | |
- name: Run ROS1 C++ Tests | |
continue-on-error: true | |
run: | | |
source "$INIT_ENV" | |
sed -i '/colcon test/ s/$/ --parallel-workers 4 --packages-above $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash | |
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov | |
- name: Backup ROS1 compile_commands.json | |
run: | | |
mv /opt/carma/build/compile_commands.json /opt/carma/compile_commands.ros1.json | |
- name: Cleanup before ROS 2 build | |
# Clear the build and install folders before building ROS 2 | |
run: | | |
rm -rf /opt/carma/install | |
rm -rf /opt/carma/build | |
- name: Build ROS2 | |
run: | | |
source "$INIT_ENV" | |
source "$ROS_2_ENV" | |
PACKAGES=$(find . -maxdepth 2 -type f -name package.xml | sed 's/\.\///' | cut -d/ -f1) | |
sed -i '/colcon build/ s/$/ --continue-on-error --parallel-workers 4 --packages-up-to $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash | |
make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov | |
- name: Run ROS2 C++ Tests | |
continue-on-error: true | |
run: | | |
source "$INIT_ENV" | |
source "$ROS_2_ENV" | |
sed -i '/colcon test/ s/$/ --parallel-workers 4 --packages-above $PACKAGES/' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash | |
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov | |
- name: Combine ROS1 and ROS2 compile_commands.json files | |
run: | | |
mv /opt/carma/build/compile_commands.json /opt/carma/compile_commands.ros2.json | |
jq -s add /opt/carma/compile_commands.ros1.json /opt/carma/compile_commands.ros2.json > /opt/carma/build/compile_commands.json | |
- name: Run SonarScanner | |
uses: usdot-fhwa-stol/actions/sonar-scanner@main | |
with: | |
sonar-token: ${{ secrets.SONAR_TOKEN }} | |
working-dir: "/opt/carma/src/${{ github.event.repository.name }}" |