Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,bugprone-*,modernize-*,performance-*,readability-*,concurrency-*,-modernize-use-trailing-return-type,-readability-else-after-return,-readability-math-missing-parentheses,-bugprone-easily-swappable-parameters,-readability-identifier-length,-readability-magic-numbers,-performance-implicit-conversion-in-loop,-bugprone-exception-escape'
CheckOptions: [{key: readability-function-cognitive-complexity.Threshold, value: 35}]
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
- main
workflow_dispatch:

env:
CI: true

jobs:
ci:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-latest, macos-14]
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-latest]
build: [Release, Debug]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -30,6 +34,10 @@ jobs:
version: pcl-cache-v1
execute_install_scripts: true

- name: Set up Homebrew (MacOS)
if: ${{ contains(matrix.os, 'macos') }}
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew downloads (macOS)
if: ${{ contains(matrix.os, 'macos') }}
uses: actions/cache@v4
Expand All @@ -39,10 +47,6 @@ jobs:
restore-keys: |
homebrew-cache-${{ runner.os }}-

- name: Set up Homebrew (MacOS)
if: ${{ contains(matrix.os, 'macos') }}
uses: Homebrew/actions/setup-homebrew@master

- name: Brew update (MacOS)
if: ${{ contains(matrix.os, 'macos') }}
run: brew update
Expand Down Expand Up @@ -112,15 +116,16 @@ jobs:

# Build all (Cross-platform)
- name: Build all
run: make OPT=Release
run: make OPT=${{ matrix.build }}

# Run tests (Cross-platform)
- name: Run tests
run: make test_ply OPT=Release
run: make test_ply OPT=${{ matrix.build }}

# Run benchmarks (Cross-platform)
- name: Run benchmarks
run: make bench OPT=Release
if: matrix.build == 'Release'
run: make bench OPT=${{ matrix.build }}

# Test install (Cross-platform)
- name: Test install
Expand Down
81 changes: 76 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,86 @@
name: Code Style
name: Lint

on:
pull_request:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
env:
CI: true

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- uses: DoozyX/clang-format-lint-action@v0.18.1

- name: Add clang apt repository
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'

- name: apt update
run: sudo apt-get update

- name: Cache APT packages (Ubuntu)
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libpcl-dev libeigen3-dev libsdl2-dev mpich clang-tidy
version: lint-cache-v1
execute_install_scripts: true

# Install Eigen (Cross-platform)
- name: Install Eigen
run: |
sudo apt-get install -y libeigen3-dev

# Install SDL2 (Cross-platform)
- name: Install SDL2
run: |
sudo apt-get install -y libsdl2-dev

- name: Install PCL
run: |
sudo apt-get install mpich
sudo apt-get install libpcl-dev

# Install sdl-wrapper (Cross-platform)
- name: Install sdl-wrapper
run: |
git clone https://github.com/cornellev/sdl-wrapper.git
cd sdl-wrapper
sudo make install

# Install libcmdapp2 (Cross-platform)
- name: Install libcmdapp2
run: |
git clone https://github.com/cornellev/libcmdapp2.git
cd libcmdapp2
sudo make install

# Install libconfig (Cross-platform)
- name: Install libconfig
run: |
git clone https://github.com/cornellev/config
cd config
sudo make install

# Install simple-test (Cross-platform)
- name: Install simple-test
run: |
git clone https://github.com/cornellev/simple-test
cd simple-test
sudo make install

- name: Install clang-tidy
run: |
sudo apt-get install clang-tidy-19
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 100
clang-tidy --version

- name: Run clang-tidy
run: make tidy
Loading
Loading