From 6cbdbe5f70212596112afe18091f1438b32717b4 Mon Sep 17 00:00:00 2001 From: "Iracki, Patryk" Date: Mon, 16 Feb 2026 10:52:15 +0100 Subject: [PATCH 1/5] debug version of workflow --- .github/workflows/coverity.yml | 107 +++++++++++++++++---------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 4fb598b55..4275fdccc 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -38,6 +38,7 @@ jobs: with: persist-credentials: false fetch-depth: 0 # Fetch all history for accurate diff + ref: 4b2b119568189314f3e9a21015725f765ae49026 - name: "Detect changed languages" id: detect-langs @@ -89,56 +90,56 @@ jobs: persist-credentials: false fetch-depth: 0 - - name: "Setup dependencies" - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends cmake curl g++ git libeigen3-dev libgtest-dev make \ - pkg-config python3-dev pybind11-dev python3-pip python3-scipy python-is-python3 libopencv-dev python3-venv - pip3 install --use-pep517 -r .github/resources/coverity-requirements.txt - - - name: "Download Coverity Scan Tool" - run: | - wget --quiet https://scan.coverity.com/download/linux64 \ - --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=${{ secrets.COVERITY_PROJECT }}" \ - -O coverity_tool.tgz - mkdir coverity - tar xzf coverity_tool.tgz --strip-components=1 -C coverity - - - name: "Add Coverity to PATH" - run: | - echo "$PWD/coverity/bin" >> $GITHUB_PATH - - - name: "Show Coverity version" - run: | - coverity --version - - - name: "Run Coverity build" - run: | - cov-build --dir cov-int make build-coverity - - - name: "Create Coverity results tarball" - run: | - tar czvf scenescape-coverity.tgz cov-int - - - name: "Print Coverity build log" - if: always() - run: | - echo "Coverity results:" - cat cov-int/build-log.txt - - - name: Upload to Coverity Scan - env: - GIT_BRANCH: ${{ github.ref_name }} - run: | - curl --form token=${{ secrets.COVERITY_TOKEN }} \ - --form email=${{ secrets.COVERITY_EMAIL }} \ - --form file=@scenescape-coverity.tgz \ - --form version="$GIT_BRANCH-`date +%Y%m%d%H%M%S`" \ - --form description="GitHub Action upload" \ - https://scan.coverity.com/builds?project=${{ secrets.COVERITY_PROJECT }} - - - name: Upload coverity results - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: coverity-results-${{ github.run_id }} - path: ./scenescape-coverity.tgz + # - name: "Setup dependencies" + # run: | + # sudo apt-get update + # sudo apt-get install -y --no-install-recommends cmake curl g++ git libeigen3-dev libgtest-dev make \ + # pkg-config python3-dev pybind11-dev python3-pip python3-scipy python-is-python3 libopencv-dev python3-venv + # pip3 install --use-pep517 -r .github/resources/coverity-requirements.txt + + # - name: "Download Coverity Scan Tool" + # run: | + # wget --quiet https://scan.coverity.com/download/linux64 \ + # --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=${{ secrets.COVERITY_PROJECT }}" \ + # -O coverity_tool.tgz + # mkdir coverity + # tar xzf coverity_tool.tgz --strip-components=1 -C coverity + + # - name: "Add Coverity to PATH" + # run: | + # echo "$PWD/coverity/bin" >> $GITHUB_PATH + + # - name: "Show Coverity version" + # run: | + # coverity --version + + # - name: "Run Coverity build" + # run: | + # cov-build --dir cov-int make build-coverity + + # - name: "Create Coverity results tarball" + # run: | + # tar czvf scenescape-coverity.tgz cov-int + + # - name: "Print Coverity build log" + # if: always() + # run: | + # echo "Coverity results:" + # cat cov-int/build-log.txt + + # - name: Upload to Coverity Scan + # env: + # GIT_BRANCH: ${{ github.ref_name }} + # run: | + # curl --form token=${{ secrets.COVERITY_TOKEN }} \ + # --form email=${{ secrets.COVERITY_EMAIL }} \ + # --form file=@scenescape-coverity.tgz \ + # --form version="$GIT_BRANCH-`date +%Y%m%d%H%M%S`" \ + # --form description="GitHub Action upload" \ + # https://scan.coverity.com/builds?project=${{ secrets.COVERITY_PROJECT }} + + # - name: Upload coverity results + # uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + # with: + # name: coverity-results-${{ github.run_id }} + # path: ./scenescape-coverity.tgz From 29c1ea02e2c0c6494235df54eeed655d9869d633 Mon Sep 17 00:00:00 2001 From: "Iracki, Patryk" Date: Mon, 16 Feb 2026 10:56:37 +0100 Subject: [PATCH 2/5] changed detection logic --- .github/workflows/coverity.yml | 48 ++++++++-------------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 4275fdccc..54b20298a 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -31,7 +31,7 @@ jobs: permissions: contents: read outputs: - run-analysis: ${{ steps.detect-langs.outputs.run-analysis }} + run-analysis: ${{ steps.changes.outputs.cpp }} steps: - name: "Checkout code" uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2 @@ -39,42 +39,16 @@ jobs: persist-credentials: false fetch-depth: 0 # Fetch all history for accurate diff ref: 4b2b119568189314f3e9a21015725f765ae49026 - - - name: "Detect changed languages" - id: detect-langs - run: | - if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - echo "Manual dispatch: always run analysis." - echo "run-analysis=true" >> $GITHUB_OUTPUT - exit 0 - else - if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then - git fetch origin main:main - echo "Fetched main branch" - fi - if [ -z "$GITHUB_SHA" ]; then - echo "Error: GITHUB_SHA is not set or empty." - exit 1 - fi - changed_files=$(git diff --name-only main...$GITHUB_SHA -- '*.h' '*.hpp' '*.c' '*.cpp') - if [ $? -ne 0 ]; then - echo "Error: git diff command failed." - exit 1 - fi - echo "Performed git diff" - if [ -z "$changed_files" ]; then - echo "No relevant changed files detected." - echo "run-analysis=false" >> $GITHUB_OUTPUT - exit 0 - else - run_analysis=true - fi - echo "Changed files:" - echo "$changed_files" - echo "Run analysis:" - echo "$run_analysis" - echo "run-analysis=$run_analysis" >> $GITHUB_OUTPUT - fi + - name: Detect C/C++ changes + id: changes + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + with: + filters: | + cpp: + - '**/*.cpp' + - '**/*.c' + - '**/*.h' + - '**/*.hpp' coverity-scan: name: "Coverity Scan" From 48bb9ff5769dd526359340eaa9601e082d62ad79 Mon Sep 17 00:00:00 2001 From: "Iracki, Patryk" Date: Mon, 16 Feb 2026 11:31:39 +0100 Subject: [PATCH 3/5] added tracker service --- .github/workflows/coverity.yml | 75 ++++++++++++++++++---------------- Makefile | 5 ++- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 54b20298a..350f3d694 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -64,42 +64,45 @@ jobs: persist-credentials: false fetch-depth: 0 - # - name: "Setup dependencies" - # run: | - # sudo apt-get update - # sudo apt-get install -y --no-install-recommends cmake curl g++ git libeigen3-dev libgtest-dev make \ - # pkg-config python3-dev pybind11-dev python3-pip python3-scipy python-is-python3 libopencv-dev python3-venv - # pip3 install --use-pep517 -r .github/resources/coverity-requirements.txt - - # - name: "Download Coverity Scan Tool" - # run: | - # wget --quiet https://scan.coverity.com/download/linux64 \ - # --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=${{ secrets.COVERITY_PROJECT }}" \ - # -O coverity_tool.tgz - # mkdir coverity - # tar xzf coverity_tool.tgz --strip-components=1 -C coverity - - # - name: "Add Coverity to PATH" - # run: | - # echo "$PWD/coverity/bin" >> $GITHUB_PATH - - # - name: "Show Coverity version" - # run: | - # coverity --version - - # - name: "Run Coverity build" - # run: | - # cov-build --dir cov-int make build-coverity - - # - name: "Create Coverity results tarball" - # run: | - # tar czvf scenescape-coverity.tgz cov-int - - # - name: "Print Coverity build log" - # if: always() - # run: | - # echo "Coverity results:" - # cat cov-int/build-log.txt + - name: "Setup dependencies" + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends cmake curl g++ git libeigen3-dev libgtest-dev make \ + pkg-config python3-dev pybind11-dev python3-pip python3-scipy python-is-python3 libopencv-dev python3-venv + pip3 install --use-pep517 -r .github/resources/coverity-requirements.txt + sudo make -C tracker install-deps + make -C tracker install-tools + conan profile detect --force + + - name: "Download Coverity Scan Tool" + run: | + wget --quiet https://scan.coverity.com/download/linux64 \ + --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=${{ secrets.COVERITY_PROJECT }}" \ + -O coverity_tool.tgz + mkdir coverity + tar xzf coverity_tool.tgz --strip-components=1 -C coverity + + - name: "Add Coverity to PATH" + run: | + echo "$PWD/coverity/bin" >> $GITHUB_PATH + + - name: "Show Coverity version" + run: | + coverity --version + + - name: "Run Coverity build" + run: | + cov-build --dir cov-int make build-coverity + + - name: "Create Coverity results tarball" + run: | + tar czvf scenescape-coverity.tgz cov-int + + - name: "Print Coverity build log" + if: always() + run: | + echo "Coverity results:" + cat cov-int/build-log.txt # - name: Upload to Coverity Scan # env: diff --git a/Makefile b/Makefile index 283e06ab6..12ef9d0ad 100644 --- a/Makefile +++ b/Makefile @@ -491,8 +491,9 @@ add-licensing: # =========================== Coverity ============================== .PHONY: build-coverity build-coverity: - $(MAKE) -C scene_common/src/fast_geometry/ || (echo "scene_common/fast_geometry build failed" && exit 1) - @export OpenCV_DIR=$${OpenCV_DIR:-$$(pkg-config --variable=pc_path opencv4 | cut -d':' -f1)} && cd controller/src/robot_vision && python3 setup.py bdist_wheel || (echo "robot vision build failed" && exit 1) +# $(MAKE) -C scene_common/src/fast_geometry/ || (echo "scene_common/fast_geometry build failed" && exit 1) +# @export OpenCV_DIR=$${OpenCV_DIR:-$$(pkg-config --variable=pc_path opencv4 | cut -d':' -f1)} && cd controller/src/robot_vision && python3 setup.py bdist_wheel || (echo "robot vision build failed" && exit 1) + $(MAKE) -C tracker build || (echo "tracker build failed" && exit 1) # ===================== Docker Compose Demo ========================== .PHONY: convert-dls-videos From 6f54be5171a2254cdacc4a4f1c46a12ff6189f12 Mon Sep 17 00:00:00 2001 From: "Iracki, Patryk" Date: Mon, 16 Feb 2026 11:33:45 +0100 Subject: [PATCH 4/5] debug detecting changes --- tracker/src/cli.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tracker/src/cli.cpp b/tracker/src/cli.cpp index 472d9b12d..634b78252 100644 --- a/tracker/src/cli.cpp +++ b/tracker/src/cli.cpp @@ -9,6 +9,7 @@ namespace tracker { + CliConfig parse_cli_args(int argc, char* argv[]) { CliConfig config; From 48cd53ea534a67ad637f588b2571d5d65b43ae1c Mon Sep 17 00:00:00 2001 From: "Iracki, Patryk" Date: Mon, 16 Feb 2026 11:48:01 +0100 Subject: [PATCH 5/5] prepare version to merge into main --- .github/workflows/coverity.yml | 39 +++++++++++++++------------------- Makefile | 4 ++-- tracker/src/cli.cpp | 1 - 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 350f3d694..a0b4854f8 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -6,17 +6,12 @@ name: "[Code Analysis] Coverity (C/C++)" run-name: "[Code Analysis] Coverity (C/C++)" on: - workflow_call: {} workflow_dispatch: {} push: branches: - main - release-* - # Trigger workflow when enqueued to a merge group - # (must be under 'on') - merge_group: {} - permissions: {} # Only run at most 1 workflow concurrently per PR or per branch to keep costs down @@ -53,7 +48,7 @@ jobs: coverity-scan: name: "Coverity Scan" needs: detect-languages - if: ${{ needs.detect-languages.outputs.run-analysis == 'true' }} + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-languages.outputs.run-analysis == 'true' }} runs-on: ubuntu-latest permissions: contents: read @@ -104,19 +99,19 @@ jobs: echo "Coverity results:" cat cov-int/build-log.txt - # - name: Upload to Coverity Scan - # env: - # GIT_BRANCH: ${{ github.ref_name }} - # run: | - # curl --form token=${{ secrets.COVERITY_TOKEN }} \ - # --form email=${{ secrets.COVERITY_EMAIL }} \ - # --form file=@scenescape-coverity.tgz \ - # --form version="$GIT_BRANCH-`date +%Y%m%d%H%M%S`" \ - # --form description="GitHub Action upload" \ - # https://scan.coverity.com/builds?project=${{ secrets.COVERITY_PROJECT }} - - # - name: Upload coverity results - # uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - # with: - # name: coverity-results-${{ github.run_id }} - # path: ./scenescape-coverity.tgz + - name: Upload to Coverity Scan + env: + GIT_BRANCH: ${{ github.ref_name }} + run: | + curl --form token=${{ secrets.COVERITY_TOKEN }} \ + --form email=${{ secrets.COVERITY_EMAIL }} \ + --form file=@scenescape-coverity.tgz \ + --form version="$GIT_BRANCH-`date +%Y%m%d%H%M%S`" \ + --form description="GitHub Action upload" \ + https://scan.coverity.com/builds?project=${{ secrets.COVERITY_PROJECT }} + + - name: Upload coverity results + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: coverity-results-${{ github.run_id }} + path: ./scenescape-coverity.tgz diff --git a/Makefile b/Makefile index 12ef9d0ad..6c3cfe4ca 100644 --- a/Makefile +++ b/Makefile @@ -491,8 +491,8 @@ add-licensing: # =========================== Coverity ============================== .PHONY: build-coverity build-coverity: -# $(MAKE) -C scene_common/src/fast_geometry/ || (echo "scene_common/fast_geometry build failed" && exit 1) -# @export OpenCV_DIR=$${OpenCV_DIR:-$$(pkg-config --variable=pc_path opencv4 | cut -d':' -f1)} && cd controller/src/robot_vision && python3 setup.py bdist_wheel || (echo "robot vision build failed" && exit 1) + $(MAKE) -C scene_common/src/fast_geometry/ || (echo "scene_common/fast_geometry build failed" && exit 1) + @export OpenCV_DIR=$${OpenCV_DIR:-$$(pkg-config --variable=pc_path opencv4 | cut -d':' -f1)} && cd controller/src/robot_vision && python3 setup.py bdist_wheel || (echo "robot vision build failed" && exit 1) $(MAKE) -C tracker build || (echo "tracker build failed" && exit 1) # ===================== Docker Compose Demo ========================== diff --git a/tracker/src/cli.cpp b/tracker/src/cli.cpp index 634b78252..472d9b12d 100644 --- a/tracker/src/cli.cpp +++ b/tracker/src/cli.cpp @@ -9,7 +9,6 @@ namespace tracker { - CliConfig parse_cli_args(int argc, char* argv[]) { CliConfig config;