diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..79fc83a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..6117ddb --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +name: ROS Industrial CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + industrial-ci: + name: Run Industrial CI + runs-on: ubuntu-24.04-arm + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Log into registry + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Run ROS Industrial CI + uses: ros-industrial/industrial_ci@master + env: + BEFORE_INIT: 'sh .github/workflows/install_deps.sh' + DOCKER_IMAGE: dustynv/ros:humble-ros-base-l4t-r36.3.0 + CXXFLAGS: >- + -Wall -Wextra -Wpedantic -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls diff --git a/.github/workflows/install_deps.sh b/.github/workflows/install_deps.sh new file mode 100644 index 0000000..b47b371 --- /dev/null +++ b/.github/workflows/install_deps.sh @@ -0,0 +1,12 @@ +#!/usr/bin/sh + +apt-key adv --fetch-key https://repo.download.nvidia.com/jetson/jetson-ota-public.asc +echo "deb https://repo.download.nvidia.com/jetson/common r36.3 main" > /etc/apt/sources.list.d/nvidia-l4t-apt-source.list +echo "deb https://repo.download.nvidia.com/jetson/t234 r36.3 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list + + +apt-get update +apt-get install -y \ + libegl-dev \ + libegl1 \ + nvidia-l4t-jetson-multimedia-api diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..8fcc677 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,34 @@ +name: Check pre-commit + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + pre-commit: + name: Format + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install clang-format-14 + run: sudo apt-get install clang-format-14 cppcheck + + - name: Run pre-commit + uses: pre-commit/action@v3.0.1 + id: precommit + + - name: Upload pre-commit changes + if: failure() && steps.precommit.outcome == 'failure' + uses: rhaschke/upload-git-patch-action@main + with: + name: pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47048f2..df48811 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,19 +14,6 @@ repos: - id: mixed-line-ending - id: trailing-whitespace -# - repo: https://github.com/pocc/pre-commit-hooks -# rev: v1.3.5 -# hooks: -# - id: clang-format -# args: [--style=Google] -# - id: clang-tidy -# - id: oclint -# - id: uncrustify -# - id: cppcheck -# - id: cpplint -# args: ["--filter=-build/include_order,-readability/todo,-whitespace/indent_namespace"] -# - id: include-what-you-use - - repo: https://github.com/pre-commit/mirrors-clang-format rev: v20.1.0 hooks: @@ -41,11 +28,12 @@ repos: - id: cpplint exclude: ^(.*\.cu|thirdparty/.*)$ args: ["--filter=-build/include_order,-readability/todo,-whitespace/indent_namespace"] + - id: cppcheck + exclude: .cu - -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 - hooks: - - id: ruff - args: [ --fix ] - - id: ruff-format +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.2 + hooks: + - id: ruff + args: [ --fix ] + - id: ruff-format