Skip to content

Commit

Permalink
Update code quality CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 10, 2023
1 parent ca81e3a commit 75b7aae
Showing 1 changed file with 47 additions and 24 deletions.
71 changes: 47 additions & 24 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ jobs:
include:
- job_type: clang-tidy
env:
TARGET_CMAKE_ARGS: "-DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON"
NOT_TEST_BUILD: true
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CLANG_TIDY=ON -DTESSERACT_ENABLE_TESTING=ON"
- job_type: codecov
env:
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DTESSERACT_ENABLE_CODE_COVERAGE=ON -DTESSERACT_WARNINGS_AS_ERRORS=OFF"
AFTER_SCRIPT: 'ici_with_unset_variables source ${HOME}/${PREFIX}target_ws/install/setup.bash && cd ${HOME}/${PREFIX}target_ws && colcon build --cmake-target ccov-all --packages-select tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_srdf tesseract_state_solver tesseract_scene_graph tesseract_urdf && cd src/tesseract && git config --global --add safe.directory ${HOME}/${PREFIX}target_ws/src/tesseract && bash <(curl -s https://codecov.io/bash) -t 758610a6-d851-4185-a01a-5b9465889b62 -s ${HOME}/${PREFIX}target_ws/build -f *all-merged.info'
env:
DOCKER_IMAGE: ubuntu:20.04
ROS_DISTRO: false
PREFIX: ${{ github.repository }}_
ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev clang-tidy'
AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh'
UPSTREAM_WORKSPACE: 'dependencies.repos'
ROSDEP_SKIP_KEYS: "fcl opw_kinematics ros_industrial_cmake_boilerplate iwyu octomap catkin"
CCACHE_DIR: "${{ github.workspace }}/${{ matrix.job_type }}/.ccache"
UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release"
container:
image: ubuntu:20.04
env:
CCACHE_DIR: "$GITHUB_WORKSPACE/${{ matrix.job_type }}/.ccache"
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Free Disk Space
continue-on-error: true
- name: Install Depends
shell: bash
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
apt update
apt upgrade -y
apt install -y cmake curl lsb-release ca-certificates gnupg python3 python3-distutils python3-pip ccache git
python3 -m pip install vcstool -q
python3 -m pip install colcon-common-extensions -q
cd $GITHUB_WORKSPACE/target_ws/src
./.github/workflows/add_ros_apt_sources.sh
apt install -y liboctomap-dev libfcl-dev libconsole-bridge-dev libbullet-dev libbullet-extras-dev libyaml-cpp-dev libtinyxml2-dev libassimp-dev liborocos-kdl-dev libpcl-dev liblapack-dev libboost-dev libboost-filesystem-dev libboost-serialization-dev libboost-program-options-dev libboost-graph-dev libbenchmark-dev libccd-dev libgtest-dev clang-tidy
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand All @@ -68,7 +68,30 @@ jobs:
restore-keys: |
${{ matrix.job_type }}-ccache-
- name: Build repository
uses: 'tesseract-robotics/industrial_ci@0109bf3523050402490b56e19c9554e7d7c5379f'
env: ${{ matrix.env }}
- name: Build Upstream Workspace
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/upstream_ws/src
vcs import --input "$GITHUB_WORKSPACE/target_ws/src/dependencies.repos" $GITHUB_WORKSPACE/upstream_ws/src/
cd $GITHUB_WORKSPACE/upstream_ws
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
- name: Build Target Workspace
shell: bash
run: |
cd $GITHUB_WORKSPACE/target_ws
source $GITHUB_WORKSPACE/upstream_ws/install/setup.bash
colcon build --event-handlers console_direct+ --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ env.TARGET_CMAKE_ARGS }}
if [ $? -ge 1 ]; then return 1; fi
- name: Upload CodeCov Results
if: ${{ matrix.job_type }} == codecov
shell: bash
run: |
source $GITHUB_WORKSPACE/target_ws/install/setup.bash
cd $GITHUB_WORKSPACE/target_ws
colcon build --cmake-target ccov-all --packages-select tesseract_collision tesseract_common tesseract_environment tesseract_geometry tesseract_kinematics tesseract_srdf tesseract_state_solver tesseract_scene_graph tesseract_urdf
cd src/tesseract
git config --global --add safe.directory $GITHUB_WORKSPACE/target_ws/src/tesseract
bash <(curl -s https://codecov.io/bash) -t 758610a6-d851-4185-a01a-5b9465889b62 -s $GITHUB_WORKSPACE/target_ws/build -f *all-merged.info'

0 comments on commit 75b7aae

Please sign in to comment.