Skip to content

removed non-third party check of clang-format #2

removed non-third party check of clang-format

removed non-third party check of clang-format #2

Workflow file for this run

# CONTINUOUS INTEGRATION WORKFLOW
# LINT TEST -> UNIT TEST -> BUILD
name: Continuous Integration
# ========== TRIGGER EVENT ==========
on:
# PUSH EVENT
push:
branches: [ feature/continuous_integration ]
# PULL REQUEST EVENT
pull_request:
branches: [ feature/continuous_integration]
# ========== JOBS ==========
jobs:
# ----- JOB: 1 -> LINT AND CODE QUALITY
lint:
name: Lint and Code Quality Check
runs-on: ubuntu-latest
steps:
#---------------- STEP 1: CHECKOUT TO SOURCE CODE
- name: Checkout Source Code
uses: actions/checkout@v4
#---------------- STEP 2: CACHE FIRST, THEN INSTALL
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: clang-format clang-tidy shellcheck cmake libcurl4-openssl-dev
version: 1.0
# - name: Cache apt packages
# uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: clang-format clang-tidy shellcheck cmake libcurl4-openssl-dev
# version: 1.0
# RUN CLANG-FORMAT FOR CODE STYLE, INDENTATIONS, SPACING
# DRY RUN MAKE SURE IT WON'T CHANGE CODE ONLY IT WILL CHECK FORMATTING
- name: C++ and HPP formatting
run: |
find src/ \( -name "*.cpp" -o -name "*.hpp" \) | xargs --no-run-if-empty clang-format --dry-run --Werror
# CHECK FOR BUGS AND BAD PRACTICES USING CLANG-TIDY
- name: C++ Static Analysis
run: |
rm -rf build
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_AVX2=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ..
find src/ -name "*.cpp" \
-not -path "*/third_party/*" | \
xargs --no-run-if-empty clang-tidy \
-p build/compile_commands.json \
--header-filter='^.*(src)/.*'
#---------------- STEP 3: CHECK SHELL SCRIPTS
- name: Lint Shell Scripts
run: |
find . -name "*.sh" \
-not -path "*/build/*" \
-not -path "*/third_party/*" | \
xargs --no-run-if-empty shellcheck -x