Skip to content

Commit

Permalink
workflow: Add github action for coding style checking
Browse files Browse the repository at this point in the history
Download clang-format-diff.py from LLVM project and run the script
for changes between main and HEAD.

Signed-off-by: Hyeonggon Yoo <[email protected]>
  • Loading branch information
hygoni committed Jan 17, 2024
1 parent 8bc8dea commit e6ffa56
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is a basic workflow to help you get started with Actions
name: CI

# Controls when the workflow will run
on: [push, pull_request, workflow_dispatch]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a set of commands using the runners shell
- name: Download clang-format-diff.py that checks coding style
run: wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format-diff.py
- name: Run clang-format-diff.py
run: git diff -U0 --no-color origin/main HEAD | python3 ./clang-format-diff.py -p1
# TODO: Run testcases for LLVM pass

0 comments on commit e6ffa56

Please sign in to comment.