Skip to content

Commit

Permalink
Updated CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jan 4, 2024
1 parent 7c3f758 commit d9c5b13
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 42 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
57 changes: 25 additions & 32 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit d9c5b13

Please sign in to comment.