From d9c5b1360227f05f82309c83ce1f92459489095d Mon Sep 17 00:00:00 2001 From: Michael Ripperger Date: Thu, 4 Jan 2024 09:59:21 -0600 Subject: [PATCH] Updated CI --- .github/workflows/clang_format.yml | 20 +++++------ .github/workflows/ubuntu.yml | 57 +++++++++++++----------------- 2 files changed, 35 insertions(+), 42 deletions(-) diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml index 68a62c0b..34388103 100644 --- a/.github/workflows/clang_format.yml +++ b/.github/workflows/clang_format.yml @@ -4,27 +4,27 @@ on: push: branches: - master + - dev pull_request: - branches: - - master + paths: + - 'noether**' + - '.github/workflows/clang_format.yml' + - '**clang-format' schedule: - cron: '0 5 * * *' jobs: clang_format: - name: Clang-Format runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 - - - name: Install clang format - run: | - sudo apt update -qq - sudo apt install -y -qq git clang-format coreutils + - uses: actions/checkout@v4 - name: Run clang format run: | + sudo apt update + sudo apt install -y git clang-format + if [ $? -ge 1 ]; then return 1; fi ./.run-clang-format + if [ $? -ge 1 ]; then return 1; fi output=$(git diff) - git diff --color-words | cat if [ -n "$output" ]; then exit 1; else exit 0; fi diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 36812439..a1dd223b 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -4,9 +4,17 @@ on: push: branches: - master + - dev pull_request: + paths: + - 'noether**' + - '.github/workflows/ubuntu.yml' schedule: - cron: '0 5 * * *' + workflow_dispatch: + release: + types: + - released jobs: ci: @@ -15,38 +23,23 @@ jobs: strategy: fail-fast: false matrix: - distro: [noetic] + distro: [focal] + container: + image: ubuntu:${{ matrix.distro }} + env: + CCACHE_DIR: ${{ github.workspace }}/${{ matrix.distro }}/.ccache + DEBIAN_FRONTEND: noninteractive + TZ: Etc/UTC steps: - - uses: actions/checkout@v2 - - - name: Free Disk Space - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker rmi $(docker image ls -aq) - df -h - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - - name: ccache cache files - uses: actions/cache@v1.1.0 + - name: Checkout repository + uses: actions/checkout@v4 with: - path: ${{ matrix.distro }}/.ccache - key: ${{ matrix.distro }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} - restore-keys: | - ${{ matrix.distro }}-ccache- + path: target_ws/src - - uses: 'ros-industrial/industrial_ci@master' - env: - ROS_DISTRO: ${{ matrix.distro }} - ROS_REPO: main - NOT_TEST_BUILD: true - UPSTREAM_WORKSPACE: 'dependencies.repos' - CCACHE_DIR: "/home/runner/work/noether/noether/${{ matrix.distro }}/.ccache" - TARGET_CMAKE_ARGS: "-DNURBS_FOUND=FALSE" + - name: Build and Tests + uses: tesseract-robotics/colcon-action@v5 + with: + ccache-prefix: ${{ matrix.distro }} + vcs-file: dependencies.repos + target-path: target_ws/src + target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug