Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Update action (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
marbre authored Feb 20, 2024
1 parent b45d51f commit 97fbe9d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,28 @@ name: Lint

on: [pull_request]

permissions:
contents: read

jobs:

# Forked from
# https://github.com/google/iree/blob/main/.github/workflows/lint.yml
clang-format:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Installing dependencies
run: |
sudo apt-get update -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends clang-format-10
sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends clang-format-14
wget https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/git-clang-format -O /tmp/git-clang-format
chmod +x /tmp/git-clang-format
- name: Checking out repository
uses: actions/checkout@v2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Fetching Base Branch
# We have to explicitly fetch the base branch as well
run: git fetch --no-tags --prune --depth=1 origin "${GITHUB_BASE_REF?}:${GITHUB_BASE_REF?}"
- name: Running clang-format on changed source files
run: |
/tmp/git-clang-format "${GITHUB_BASE_REF?}" --binary=clang-format-12 --style=file
/tmp/git-clang-format "${GITHUB_BASE_REF?}" --binary=clang-format-14 --style=file
git diff --exit-code

0 comments on commit 97fbe9d

Please sign in to comment.