Files
deskflow/.github/workflows/lint-source-code.yml
Nick Bolton 481680d072 Run install_deps.py script when building containers weekly (#7384)
* Don't run CodeQL in PR draft

* Speed up analysis workflows

* Run install deps on Debian

* Add badge to readme

* Fixed copy and use workdir

* Use mount instead of copy

* Fixed unwanted && and changed workdir

* Split deps and deps-full

* Fixed context

* Use /app dir

* Use copy instead

* Revert to --mount and use .py (not .sh)

* Test

* Add `./scripts/install_deps.py` to all platforms

* Add missing syntax

* Fixed Python dep for OpenSUSE

* Temp remove WORKDIR for OpenSUSE

* Re-add workdir

* Increase timeout

* Delete `zypper --non-interactive remove busybox-which`

* Restore python3

* Test

* Rename to `lint-source-code`

* Beef up analysis runners

* Fixed workflow runs-on

* Use deps script

* Try pipx for gcovr

* Use containers with deps

* Add -y arg

* Install curl

* Merge deps step

* Add unzip dep

* Make Git dir safe

* Add .local/bin to env

* Improve step name

* Use `pipx ensurepath`

* Install gcovr with apt

* Use Ubuntu 22 with pip

* Update ChangeLog

* Use 16-core for Windows

* Use choco cache

* Test

* Use 8-core for Windows (picked up quicker, more available?)
2024-07-11 15:26:38 +01:00

34 lines
691 B
YAML

# Lints CMake config and C++ source code.
name: "Lint source code"
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
lint-source-code:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
python3 -m venv build/python
source build/python/bin/activate
pip install pyyaml cmake_format clang_format
- name: Linting with CMake formatter
run: ./scripts/lint_cmake.py
- name: Linting with Clang format
run: ./scripts/lint_clang.py