* 117d382486 nura: use modern url for Alpine binary repos * 7872fd58f7 nura: drop x86 * 3533864541 gitignore: add mkosi.pkgcache * 580c4d94d7 Rename postmarketOS --> Nura * ba96aba91e Bump version to 28~devel (cherry picked from commit b2b8be184edf39022c59eaa5b0fd365eb19afc44)
112 lines
3.7 KiB
YAML
112 lines
3.7 KiB
YAML
---
|
|
# vi: ts=2 sw=2 et:
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
# https://github.com/marketplace/actions/super-linter
|
|
name: Lint Code Base
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- v[0-9]+-stable
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
readme-notice:
|
|
name: Check for README notice
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Repo checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Check that README.md has no review notice
|
|
run: |
|
|
if grep -F "Remove this line to confirm you've reviewed this PR before submitting." README.md >/dev/null; then
|
|
echo "::error file=README.md,line=1::Remove the review notice from README.md before merging."
|
|
exit 1
|
|
fi
|
|
|
|
build:
|
|
name: Lint Code Base
|
|
runs-on: ubuntu-24.04
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
steps:
|
|
- name: Repo checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
# We need a full repo clone
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Lint Code Base
|
|
uses: super-linter/super-linter/slim@4ce20838b8ab83717e78138c5b3a1407148e0918
|
|
env:
|
|
DEFAULT_BRANCH: main
|
|
MULTI_STATUS: false
|
|
VALIDATE_ALL_CODEBASE: false
|
|
VALIDATE_GITHUB_ACTIONS: true
|
|
LINTER_RULES_PATH: .github/linters
|
|
GITHUB_ACTIONS_CONFIG_FILE: actionlint.yml
|
|
ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT: false
|
|
|
|
- uses: systemd/mkosi@71d7b67e01dc47ab5c51f24866c3e2195b9701d2
|
|
|
|
- name: Check that tabs are not used in Python code
|
|
run: sh -c '! git grep -P "\\t" -- src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py'
|
|
|
|
- name: Build tools tree
|
|
run: |
|
|
tee mkosi/mkosi.local.conf <<EOF
|
|
[Build]
|
|
ToolsTreeDistribution=fedora
|
|
ToolsTreeRelease=rawhide
|
|
EOF
|
|
|
|
mkosi -f box -- true
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
mkosi box -- mypy --version
|
|
mkosi box -- mypy src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
|
|
|
|
- name: Run ruff format
|
|
run: |
|
|
mkosi box -- ruff --version
|
|
if ! mkosi box -- ruff format --check
|
|
then
|
|
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
|
|
mkosi box -- ruff format --check --quiet --diff
|
|
fi
|
|
|
|
- name: Run ruff check
|
|
run: |
|
|
mkosi box -- ruff --version
|
|
if ! mkosi box -- ruff check
|
|
then
|
|
echo "Please fix the errors shown by 'ruff check' on the above files or add noqa comments where appropriate."
|
|
echo "Diffs for fixes that can be programmatically generated are shown below:"
|
|
mkosi box -- ruff check --diff
|
|
fi
|
|
|
|
- name: Configure meson
|
|
run: mkosi box -- env CC=clang CXX=clang++ meson setup build
|
|
|
|
- name: Run clang-tidy
|
|
run: mkosi box -- meson test -C build --suite=clang-tidy --print-errorlogs --no-stdsplit --quiet
|
|
|
|
- name: Run coccinelle checks
|
|
run: mkosi box -- meson test -C build --suite=coccinelle --print-errorlogs --no-stdsplit
|
|
|
|
- name: Run man-rules checks
|
|
run: |
|
|
mkosi box -- ninja -C build update-man-rules
|
|
git diff --exit-code -- man/rules/meson.build
|