Add GetDefaultTarget and SetDefaultTarget APIs #2158
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
branches: [main, hirte-*] | |
workflow_dispatch: | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
clang: ${{ steps.filter.outputs.clang }} | |
md: ${{ steps.filter.outputs.md }} | |
python: ${{ steps.filter.outputs.python }} | |
apispec: ${{ steps.filter.outputs.apispec }} | |
steps: | |
- name: Detect changed files | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
clang: | |
- '**/*.c' | |
- '**/*.h' | |
- '**/meson.build' | |
- 'meson_options.txt' | |
md: | |
- '**/*.md' | |
python: | |
- 'tests/**/*.py' | |
- 'doc/**/*.py' | |
apispec: | |
- 'data/*.xml' | |
common: | |
name: Common | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Check SPDX headers | |
run: | | |
./build-scripts/spdx-header-check.sh | |
- name: Check Copyright headers | |
run: | | |
./build-scripts/copyright-header-check.sh | |
- name: Running codespell checker | |
run: | | |
make check-codespell | |
clang: | |
needs: changes | |
if: ${{ needs.changes.outputs.clang == 'true' }} | |
name: C | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Initialize meson configuration | |
run: | | |
meson setup builddir | |
- name: Running source code format check | |
run: | | |
ninja -C builddir clang-format-check | |
- name: Running static analysis | |
run: | | |
ninja -C builddir clang-tidy | |
markdown: | |
needs: changes | |
if: ${{ needs.changes.outputs.md == 'true' }} | |
name: Markdown | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Running markdown lint | |
uses: DavidAnson/markdownlint-cli2-action@v15 | |
python: | |
needs: changes | |
if: ${{ needs.changes.outputs.python == 'true' }} | |
name: Python | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Run flake8 | |
run: | | |
source /opt/bluechi-env/bin/activate | |
flake8 doc tests | |
deactivate | |
- name: Run isort | |
run: | | |
source /opt/bluechi-env/bin/activate | |
isort doc tests --check --diff | |
deactivate | |
- name: Run black | |
run: | | |
source /opt/bluechi-env/bin/activate | |
black doc --check --diff | |
black tests --check --diff | |
deactivate | |
apispec: | |
needs: changes | |
if: ${{ needs.changes.outputs.apispec == 'true' }} | |
name: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install dependencies | |
run: | | |
python3 -m ensurepip --default-pip | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install -r src/bindings/generator/requirements.txt | |
pip install wheel | |
dnf install -y python3-gobject | |
- name: Generate and build python bindings | |
run: | | |
./build-scripts/generate-bindings.sh python | |
./build-scripts/build-bindings.sh python | |
- name: Check for changes in generated python code | |
run: | | |
git config --global --add safe.directory $(pwd) | |
git diff --exit-code src/bindings/python/ | |
- name: Prompt rebuilding python bindings | |
if: ${{ failure() }} | |
run: | | |
echo "Changes in D-Bus API spec detected. Please generated them." |