Skip to content

Commit

Permalink
.github: Update CI & fix build failures
Browse files Browse the repository at this point in the history
- Fix CI Docker image namespace, following upstream [1] (possibly
  temporary)

- Update CI Docker image and CI config to Humble/Jammy

- Remove `clang` tests & ccache config; fixes failure on Ubuntu
  Jammy, with no `clang-format-10` package; no C code here anyway

- Update pre-commit GH action tag to latest 3.0.0

[1]: moveit/moveit2#1908
  • Loading branch information
zultron committed May 15, 2023
1 parent ed7907e commit 6a85462
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 35 deletions.
33 changes: 4 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ jobs:
fail-fast: false
matrix:
env:
- IMAGE: foxy-ci
CLANG_TIDY: pedantic
- IMAGE: humble-ci
env:
CXXFLAGS: "-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-deprecated-copy"
DOCKER_IMAGE: ghcr.io/ros-planning/moveit2:${{ matrix.env.IMAGE }}
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)
Expand All @@ -32,18 +31,14 @@ jobs:
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)') || '' }}
name: ${{ matrix.env.IMAGE }}
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 -qq purge build-essential ghc\*
sudo apt-get clean
# cleanup docker images not used by us
docker system prune -af
Expand Down Expand Up @@ -74,20 +69,6 @@ jobs:
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
Expand All @@ -98,12 +79,6 @@ jobs:
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
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install clang-format-10
run: sudo apt-get install clang-format-10
- name: Install black
run: sudo -H pip3 install black
- uses: pre-commit/action@v2.0.3
- uses: pre-commit/action@v3.0.0
id: precommit
- name: Upload pre-commit changes
if: failure() && steps.precommit.outcome == 'failure'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upstream.rosinstall
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- git:
local-name: hal_ros_control
uri: https://github.com/zultron/hal_ros_control.git
version: 2022-01-07-foxy-devel
version: zultron/2023-04-14-humble-devel
- git:
local-name: ros2_control_demos
# FIXME The rrbot demo avoids duplicating the rrbot description
Expand All @@ -11,6 +11,6 @@
# packages.
#
# uri: https://github.com/ros-controls/ros2_control_demos.git
# version: foxy
# version: humble
uri: https://github.com/zultron/ros2_control_demos.git
version: foxy-dev-parameterize-hardware-plugin
version: zultron/2023-04-14-humble-dev-parameterize-hardware-plugin

0 comments on commit 6a85462

Please sign in to comment.