add gallon UK #4
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 Code Base | |
on: [pull_request] | |
jobs: | |
build: | |
name: Lint Code Base | |
runs-on: ${{ (github.repository == 'numworks/epsilon-internal') && 'self-hosted' || 'ubuntu-latest' }} | |
steps: | |
- name: Fetch target branch and PR branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Find most recent ancestor of PR and target branch | |
id: common_ancestor | |
run: echo "commit_sha=$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: false | |
# TODO Only install clang-format | |
- name: Install dependencies | |
uses: numworks/setup-llvm@latest | |
- name: Lint files changed by PR | |
run: make format BASE=${{ steps.common_ancestor.outputs.commit_sha }} CXXFORMATARGS="--dry-run --Werror" |