From ee7e5544bbf574ac8ab5b1c7c401fd2c2398d9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cie=C5=9Blik?= Date: Thu, 21 May 2026 23:12:14 +0200 Subject: [PATCH] Fix CI: install tools natively instead of using Docker-in-Docker Volume mounts with -v $PWD:/src fail when the runner itself runs inside a container (the path exists in the runner container but not on the Docker daemon host). Switch all four jobs to native apt-get installs of the same packages that are in the Dockerfile. The container-based just recipes remain unchanged for local use. --- .gitea/workflows/ci.yml | 79 ++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 400570b..c522e45 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [main] -env: - IMAGE: ptt-builder - jobs: build: name: Build firmware @@ -18,25 +15,18 @@ jobs: with: submodules: recursive - - name: Build container image - run: docker build -t $IMAGE . + - name: Install toolchain + run: | + sudo apt-get update -q + sudo apt-get install -y --no-install-recommends \ + gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \ + cmake ninja-build - name: Compile firmware - run: | - docker run --rm \ - --user "$(id -u):$(id -g)" \ - -v "$PWD:/src" \ - $IMAGE \ - sh -c "cmake -B /src/build -G Ninja \ - -DCMAKE_BUILD_TYPE=MinSizeRel /src \ - && ninja -C /src/build" + run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel . && ninja -C build - name: Print size - run: | - docker run --rm \ - -v "$PWD:/src" \ - $IMAGE \ - arm-none-eabi-size /src/build/firmware + run: arm-none-eabi-size build/firmware format: name: Check formatting @@ -44,18 +34,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build container image - run: docker build -t $IMAGE . + - name: Install clang-format + run: | + sudo apt-get update -q + sudo apt-get install -y --no-install-recommends clang-format - name: clang-format check run: | - docker run --rm \ - --user "$(id -u):$(id -g)" \ - -v "$PWD:/src" \ - $IMAGE \ - sh -c "find /src/src /src/include -name '*.c' -o -name '*.h' | \ - xargs clang-format --dry-run --Werror \ - --style=file:/src/.clang-format" + find src include -name '*.c' -o -name '*.h' | \ + xargs clang-format --dry-run --Werror --style=file:.clang-format lint: name: Static analysis @@ -63,22 +50,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build container image - run: docker build -t $IMAGE . + - name: Install cppcheck + run: | + sudo apt-get update -q + sudo apt-get install -y --no-install-recommends cppcheck - name: cppcheck run: | - docker run --rm \ - --user "$(id -u):$(id -g)" \ - -v "$PWD:/src" \ - $IMAGE \ - sh -c "cppcheck --error-exitcode=1 \ - --enable=warning,style,performance,portability \ - --suppress=missingInclude \ - --inline-suppr \ - --std=c11 \ - -I /src/include \ - /src/src/" + cppcheck --error-exitcode=1 \ + --enable=warning,style,performance,portability \ + --suppress=missingInclude \ + --inline-suppr \ + --std=c11 \ + -I include \ + src/ docs: name: Build documentation @@ -86,14 +71,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build container image - run: docker build -t $IMAGE . + - name: Install Doxygen + run: | + sudo apt-get update -q + sudo apt-get install -y --no-install-recommends doxygen - name: Doxygen run: | - docker run --rm \ - --user "$(id -u):$(id -g)" \ - -v "$PWD:/src" \ - $IMAGE \ - sh -c "cd /src && doxygen Doxyfile 2>&1 | tee /tmp/doxy.log && \ - ! grep -q 'warning:' /tmp/doxy.log" + doxygen Doxyfile 2>&1 | tee /tmp/doxy.log + ! grep -q 'warning:' /tmp/doxy.log