Skip to content

Fix crash by not destroying ROS2 subscriber. #99

Fix crash by not destroying ROS2 subscriber.

Fix crash by not destroying ROS2 subscriber. #99

Workflow file for this run

# This config uses industrial_ci
# (https://github.com/ros-industrial/industrial_ci.git). For
# troubleshooting, see readme
# (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- "**"
jobs:
default:
strategy:
fail-fast: false
matrix:
env:
- IMAGE: humble-ci
CLANG_TIDY: pedantic
env:
CXXFLAGS: "-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-deprecated-copy"
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: .github/workflows/upstream.rosinstall
BEFORE_SETUP_UPSTREAM_WORKSPACE: .github/workflows/upstream_install.sh
# Pull any updates to the upstream workspace (after restoring it from cache)
AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src
# Clear the ccache stats before and log the stats after the build
BEFORE_BUILD_UPSTREAM_WORKSPACE: ccache -z
AFTER_BUILD_TARGET_WORKSPACE: ccache -s
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CLANG_TIDY_BASE_REF: ${{ github.event_name != 'workflow_dispatch' && (github.base_ref || github.ref) || '' }}
BEFORE_CLANG_TIDY_CHECKS: (cd $TARGET_REPO_PATH; clang-tidy --list-checks)
CC: ${{ matrix.env.CLANG_TIDY && 'clang' }}
CXX: ${{ matrix.env.CLANG_TIDY && 'clang++' }}
name: ${{ matrix.env.IMAGE }}${{ matrix.env.CLANG_TIDY && (github.event_name != 'workflow_dispatch' && ' + clang-tidy (delta)' || ' + clang-tidy (all)') || '' }}
runs-on: ubuntu-latest
steps:
- name: "Free up disk space"
if: matrix.env.CCOV
run: |
sudo apt-get -qq purge build-essential ghc\*
sudo apt-get clean
# cleanup docker images not used by us
docker system prune -af
# shift ccache folder to /mnt on a separate disk
sudo mkdir /mnt/ccache
mkdir ${{ env.CCACHE_DIR }}
sudo mount --bind ${{ env.CCACHE_DIR }} /mnt/ccache
# free up a lot of stuff from /usr/local
sudo rm -rf /usr/local
df -h
- uses: actions/checkout@v2
- name: Cache upstream workspace
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/upstream_ws
key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
restore-keys: ${{ env.CACHE_PREFIX }}
env:
CACHE_PREFIX: upstream_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }}
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: Cache target workspace
if: "!matrix.env.CCOV"
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/target_ws
key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
restore-keys: ${{ env.CACHE_PREFIX }}
env:
CACHE_PREFIX: target_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml', '.github/workflows/ci.yaml') }}
- name: Cache ccache
uses: pat-s/[email protected]
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
${{ env.CACHE_PREFIX }}-${{ github.sha }}
${{ env.CACHE_PREFIX }}
env:
CACHE_PREFIX: ccache-${{ matrix.env.IMAGE }}
- name: Configure ccache
run: |
mkdir -p ${{ env.CCACHE_DIR }}
cp .github/ccache.conf ${{ env.CCACHE_DIR }}/ccache.conf
- id: ici
name: Run industrial_ci
uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env }}
- name: Upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
with:
name: test-results-${{ matrix.env.IMAGE }}
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: Upload clang-tidy changes
uses: rhaschke/upload-git-patch-action@main
if: matrix.env.CLANG_TIDY
with:
name: clang-tidy
path: ${{ env.BASEDIR }}/target_ws/src/$(basename $(pwd))
- name: Prepare target_ws for cache
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws