Editor Binary and Prerequisites #964
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
# Check all pull requests against the clang-format rules. | |
name: Clang Format | |
# Controls when the action will run. | |
# Run clang-format checks on all pull-requests | |
on: | |
pull_request: | |
paths: | |
- 'src/**.cpp' | |
- 'src/**.h' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-format | |
cancel-in-progress: ${{ github.ref == 'refs/heads/master' }} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
clang-format-check: | |
timeout-minutes: 5 | |
# Ubuntu 18.04 at the time of writing includes clang-format-9 as default | |
runs-on: [ubuntu-20.04] | |
# We want to check all changed files between the pull-request base and the head of the pull request | |
env: | |
FORMAT_BASE: ${{ github.base_ref }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checkout the repository as $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
# Make sure to include the base we want to merge into | |
- run: | | |
git fetch --no-tags --depth=1 origin ${{ github.base_ref }}:${{ github.base_ref }} | |
# Run the clang-format command (in $GITHUB_WORKSPACE, which is where the repo is checked out to) | |
- name: Run clang-format | |
run: ./scripts/clang-format.sh |