mirror of https://github.com/xemu-project/xemu.git
ci: Migrate lint to build.yml
This commit is contained in:
parent
68b3683f77
commit
d6a285e173
|
@ -270,6 +270,19 @@ jobs:
|
|||
with:
|
||||
name: ${{ matrix.artifact_name }}
|
||||
path: ${{ matrix.artifact_filename }}
|
||||
- name: Lint
|
||||
if: matrix.configuration == 'Debug' && matrix.arch == 'x86_64'
|
||||
uses: cpp-linter/cpp-linter-action@8ae6cfaea8cc035c6155b5fe79d7991a9bf638af # v2.14.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
version: '18' # clang-format version
|
||||
repo-root: ${{ github.workspace }}/src
|
||||
style: file:${{ github.workspace }}/src/.clang-format
|
||||
database: ${{ github.workspace }}/src/build/compile_commands.json
|
||||
lines-changed-only: true
|
||||
format-review: true
|
||||
passive-reviews: true
|
||||
|
||||
macOS:
|
||||
name: Build for macOS (${{ matrix.arch }}, ${{ matrix.configuration }})
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '!.github/workflows/lint.yml'
|
||||
- 'README.md'
|
||||
- 'ubuntu-win64-cross/**'
|
||||
|
||||
jobs:
|
||||
Check:
|
||||
name: Check formatting and lints
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Clone tree
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check formatting/lints
|
||||
uses: cpp-linter/cpp-linter-action@832a609fe16e1c98ea764641f07dec5d39db5a56 # v2.13.4
|
||||
id: linter
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
version: '16'
|
||||
style: file
|
||||
lines-changed-only: true
|
||||
format-review: true
|
||||
- name: Report result
|
||||
if: steps.linter.outputs.checks-failed > 0
|
||||
run: exit 1
|
||||
|
Loading…
Reference in New Issue