Skip to content

Install pkg-config files for libf3d and libf3d_c_api #14651

Install pkg-config files for libf3d and libf3d_c_api

Install pkg-config files for libf3d and libf3d_c_api #14651

Workflow file for this run

on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
branches:
- master
- release
name: Style Checks
jobs:
#----------------------------------------------------------------------------
# Style checks
#----------------------------------------------------------------------------
style_checks:
name: Formatting Check
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
allow-unsafe-pr-checkout: true
fetch-depth: 1
lfs: false
- name: non-ASCII check in C++ files
shell: bash
run: |
if grep -rPn --include="*.h" --include="*.cxx" '[[:^ascii:]]' .; then
echo "::error::Non-ASCII characters detected"
exit 1
fi
# Run codespell first to avoid issues with style check on same location
- name: Codespell in place
shell: bash
run: |
pip install codespell
codespell -fHw .
- name: C++ Formatting
uses: DoozyX/clang-format-lint-action@8b8bbdd8669eec54682e720ebe2fb19d9387fdb0
with:
source: "."
extensions: "h,cxx,in"
exclude: "./cmake **/*.py.in **/*.log.in **/*.json.in **/*.thumbnailer.in **/*.cmake.in **/*.desktop.in"
clangFormatVersion: 18
inplace: True
- name: Python Formatting
uses: psf/black@stable
with:
options: "--include '(\\.py|\\.py\\.in)'"
- name: Prettier Formatting
continue-on-error: true
uses: creyD/prettier_action@8c18391fdc98ed0d884c6345f03975edac71b8f0
with:
dry: True
prettier_options: "-w **/*.{js,json,md,html,yml}"
- name: JSON Schema Validation
shell: bash
run: pipx run check-jsonschema==0.36.1 --schemafile resources/cli-options.schema.json resources/cli-options.json
- name: Echo Diff
shell: bash
run: git diff --color=always --exit-code
- name: Generate Diff
if: failure()
shell: bash
run: |
diff="$(git diff)"
echo "$diff" > ./f3d_style_diff.patch
printf 'F3D_STYLE_DIFF<<EOF\n%s\nEOF\n' "$diff" >> "$GITHUB_ENV"
- name: Upload diff as an artifact
if: failure()
uses: actions/upload-artifact@v7
with:
path: ./f3d_style_diff.patch
name: f3d-style-checks-diff-${{ github.event.pull_request.head.ref }}
- name: Delete comment
uses: marocchino/sticky-pull-request-comment@v3.0.5
with:
header: style
delete: true
- name: Create comment
if: failure()
uses: marocchino/sticky-pull-request-comment@v3.0.5
with:
header: style
message: |
Style Checks CI failed:
```diff
${{env.F3D_STYLE_DIFF}}
```
You can copy the patch above and apply it locally with:
| Platform | Command |
|------------|-------------------------------------------------|
| X | `xclip -o -selection clipboard \| git apply -v` |
| Wayland | `wl-paste \| git apply -v` |
| Powershell | `Get-Clipboard -Raw \| git apply -v` |
| macOS | `pbpaste \| git apply -v` |