From 7891aad2a6bfe43a1a358be69469bdf74aad162f Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Mon, 20 Nov 2023 14:28:21 -0600 Subject: [PATCH] Cleanup CI and docker file (#966) --- .github/workflows/add_ros_apt_sources.sh | 4 ---- .github/workflows/clang_format.yml | 6 ++++-- .github/workflows/nightly.yml | 2 +- docker/Dockerfile | 19 +++++-------------- 4 files changed, 10 insertions(+), 21 deletions(-) delete mode 100755 .github/workflows/add_ros_apt_sources.sh diff --git a/.github/workflows/add_ros_apt_sources.sh b/.github/workflows/add_ros_apt_sources.sh deleted file mode 100755 index 30655db02f2..00000000000 --- a/.github/workflows/add_ros_apt_sources.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/bash -curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg -echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null -apt update -qq diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml index 8a1a6adb715..089a88125fc 100644 --- a/.github/workflows/clang_format.yml +++ b/.github/workflows/clang_format.yml @@ -15,14 +15,16 @@ on: jobs: clang_format: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v1 - name: Run clang format run: | sudo apt update - sudo apt install -y git clang-format + sudo apt install -y git clang-format-8 + if [ $? -ge 1 ]; then return 1; fi ./.run-clang-format + if [ $? -ge 1 ]; then return 1; fi output=$(git diff) if [ -n "$output" ]; then exit 1; else exit 0; fi diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c8ce182cbc2..cb5b0265c06 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - industrial_ci: + ci: if: contains(github.event.pull_request.labels.*.name, 'check-tesseract-ros') || github.event.schedule == true name: ${{ matrix.distro }} runs-on: ubuntu-latest diff --git a/docker/Dockerfile b/docker/Dockerfile index a2a1a1e2c34..fc160cad57c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,20 +9,11 @@ USER root # Install RUN apt update \ - && apt install -y \ - curl \ - lsb-release \ - git \ - build-essential - -# Install ROS sources and tooling dependencies -COPY .github/workflows/add_ros_apt_sources.sh /tmp/add_ros_apt_sources.sh -RUN ./tmp/add_ros_apt_sources.sh \ - && apt install -y \ - python3-colcon-common-extensions \ - python3-rosdep \ - python3-vcstool \ - liboctomap-dev \ + && apt upgrade -y \ + && apt install -y cmake curl git python3 python3-distutils python3-pip liboctomap-dev \ + && python3 -m pip install vcstool -q \ + && python3 -m pip install colcon-common-extensions -q \ + && python3 -m pip install rosdep -q \ && rosdep init \ && rosdep update