Skip to content

Commit

Permalink
Added CI files
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jan 17, 2024
1 parent 06e9c98 commit 6b3c41d
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Clang-Format

on:
push:
branches:
- master
pull_request:
paths:
- 'snp**'
- '.github/workflows/clang_format.yml'
- '**clang-format'
schedule:
- cron: '0 5 * * *'

jobs:
clang_format:
runs-on: ubuntu-20.04
steps:
- 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)
if [ -n "$output" ]; then exit 1; else exit 0; fi
26 changes: 26 additions & 0 deletions .github/workflows/cmake_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CMake-Format

on:
push:
branches:
- master
pull_request:
paths:
- 'snp**'
- '.github/workflows/cmake_format.yml'
- '**cmake-format'
schedule:
- cron: '0 5 * * *'

jobs:
cmake_format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1

- name: Run CMake Lang Format Check
run: |
sudo pip3 install cmakelang
./.run-cmake-format
output=$(git diff)
if [ -n "$output" ]; then exit 1; else exit 0; fi
41 changes: 41 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Ubuntu

on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
release:
types:
- released

jobs:
ci:
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [noetic]
container:
image: ros:${{ matrix.distro }}
env:
CCACHE_DIR: ${{ github.workspace }}/${{ matrix.distro }}/.ccache
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src

- name: Build and Tests
uses: tesseract-robotics/colcon-action@v6
with:
before-script: source /opt/ros/${{ matrix.distro }}/setup.bash
ccache-prefix: ${{ matrix.distro }}
target-path: target_ws/src
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Debug
1 change: 1 addition & 0 deletions ci

0 comments on commit 6b3c41d

Please sign in to comment.