DarthSim 10 月之前
父節點
當前提交
00977602e8
共有 2 個文件被更改,包括 15 次插入5 次删除
  1. 1 1
      .github/ci-docker/Dockerfile
  2. 14 4
      .github/workflows/lint.yml

+ 1 - 1
.github/ci-docker/Dockerfile

@@ -30,7 +30,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
   && cd /root \
   && git clone --depth 1 https://github.com/DarthSim/quantizr.git \
   && cd quantizr \
-  && cargo cinstall --release --library-type=cdylib \
+  && cargo cinstall --release --library-type=cdylib --prefix=/usr/local --libdir=/usr/local/lib \
   && rm -rf /root/.rustup /root/.cargo
 
 ENV PATH="/root/.python/bin:$PATH"

+ 14 - 4
.github/workflows/lint.yml

@@ -33,9 +33,19 @@ jobs:
         env:
           LD_LIBRARY_PATH: "/usr/local/lib:/root/vips/${{ matrix.vips-version }}/lib"
           PKG_CONFIG_PATH: "/usr/local/lib/pkgconfig:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
-      - name: Clang lint
-        uses: cpp-linter/cpp-linter-action@v2
+
+  c-lint:
+    runs-on: ubuntu-24.04
+    steps:
+      - uses: actions/checkout@v4
+      - uses: cpp-linter/cpp-linter-action@v2
+        id: linter
         with:
           style: file
-          version: 18
-          tidy-checks: '-*'
+          version: 18 # Ubuntu 24.04 provides clang-format-18
+          tidy-checks: '-*' # disable clang-tidy
+
+      - name: Fail fast
+        continue-on-error: true # TODO: remove this line in the future
+        if: steps.linter.outputs.checks-failed > 0
+        run: exit 1