Fixing wayland cmake definitions and linkage. #264
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
# https://github.com/openblack/bgfx.cmake/blob/master/.github/workflows/format.yml | |
name: Format | |
on: | |
push: | |
branches: [ master ] | |
pull_request_target: | |
branches: [ master ] | |
jobs: | |
cmake-format-check: | |
name: cmake-format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Add base repo to git config | |
run: git remote add upstream ${{ github.event.pull_request.base.repo.html_url }} | |
if: startsWith(github.event_name, 'pull_request') | |
- name: Format CMake files | |
id: cmake-format | |
uses: PuneetMatharu/cmake-format-lint-action@main | |
with: | |
args: --config-files .cmake-format.py --check | |
# Run only if a PR and cmake-format has failed | |
cmake-format-action-suggester: | |
name: cmake-format fix suggester | |
runs-on: ubuntu-latest | |
needs: cmake-format-check | |
if: always() && startsWith(github.event_name, 'pull_request') && needs.cmake-format-check.result == 'failure' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Add base repo to git config | |
run: git remote add upstream ${{ github.event.pull_request.base.repo.html_url }} | |
if: startsWith(github.event_name, 'pull_request') | |
- name: Format CMake files | |
id: cmake-format | |
uses: PuneetMatharu/[email protected] | |
with: | |
args: --config-files .cmake-format.py --in-place | |
- run: | | |
git diff > cmake-format.patch | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: formatting-fix-${{github.sha}} | |
path: cmake-format.patch | |
- uses: reviewdog/action-suggester@v1 | |
with: | |
tool_name: cmake-format |