diff --git a/.github/workflows/reusable-lint-py.yml b/.github/workflows/reusable-lint-py.yml index f30e4898b..e3bea6fe7 100644 --- a/.github/workflows/reusable-lint-py.yml +++ b/.github/workflows/reusable-lint-py.yml @@ -24,10 +24,7 @@ jobs: path: repo - name: Install dependencies - run: | - ./ci/ci-install.bash build - sudo apt install python3-clang || \ - sudo apt install python3-clang + run: ./ci/ci-install.bash lint-py - name: Configure run: | diff --git a/ci/ci-install.bash b/ci/ci-install.bash index 1f58184ea..04ce8958b 100755 --- a/ci/ci-install.bash +++ b/ci/ci-install.bash @@ -146,10 +146,21 @@ elif [ "$STAGE" = "test" ]; then install-wavediff # Workaround -fsanitize=address crash sudo sysctl -w vm.mmap_rnd_bits=28 +elif [ "$STAGE" = "lint-py" ]; then + # nodist/clang_check_attributes. + if [ "$HOST_OS" = "linux" ] && [ "$DISTRO_ID" = "ubuntu" ]; then + PACKAGES=( + python3-clang # Not run, but importers are linted + ) + sudo apt-get update || + sudo apt-get update + sudo apt-get install --yes "${PACKAGES[@]}" || + sudo apt-get install --yes "${PACKAGES[@]}" + fi else ############################################################################## # Unknown build stage - fatal "Unknown stage '$STAGE' (expected 'build' or 'test')" + fatal "Unknown stage '$STAGE' (expected 'build', 'test' or 'lint-py')" fi # Report where the tools we may have installed live (ok if some are missing)