From 1391e5269b3e3c466080d27bc3df3c3a37e08c0c Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 25 Oct 2024 00:04:13 -0700 Subject: [PATCH] Revert "ci: merge clang-format and clang-tidy into single pipeline" (#14809) --- .../workflows/{clang.yml => clang-format.yml} | 11 ++--- .github/workflows/clang-tidy.yml | 41 +++++++++++++++++++ 2 files changed, 44 insertions(+), 8 deletions(-) rename .github/workflows/{clang.yml => clang-format.yml} (83%) create mode 100644 .github/workflows/clang-tidy.yml diff --git a/.github/workflows/clang.yml b/.github/workflows/clang-format.yml similarity index 83% rename from .github/workflows/clang.yml rename to .github/workflows/clang-format.yml index 45882f4055c7e1..bb2cca1880c31d 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang-format.yml @@ -1,4 +1,4 @@ -name: clang +name: clang-format permissions: contents: write @@ -15,8 +15,8 @@ env: LLVM_VERSION_MAJOR: "18" jobs: - clang: - name: clang + clang-format: + name: clang-format runs-on: ubuntu-latest steps: - name: Checkout @@ -35,11 +35,6 @@ jobs: LLVM_VERSION: ${{ env.LLVM_VERSION }} run: | bun run clang-format - - name: Clang Tidy - env: - LLVM_VERSION: ${{ env.LLVM_VERSION }} - run: | - bun run clang-tidy:diff - name: Commit uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml new file mode 100644 index 00000000000000..a6f06ad6206216 --- /dev/null +++ b/.github/workflows/clang-tidy.yml @@ -0,0 +1,41 @@ +name: clang-tidy + +permissions: + contents: write + +on: + workflow_call: + workflow_dispatch: + pull_request: + merge_group: + +env: + BUN_VERSION: "1.1.27" + LLVM_VERSION: "18.1.8" + LLVM_VERSION_MAJOR: "18" + +jobs: + clang-tidy: + name: clang-tidy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Bun + uses: ./.github/actions/setup-bun + with: + bun-version: ${{ env.BUN_VERSION }} + - name: Install LLVM + run: | + curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.LLVM_VERSION_MAJOR }} all + - name: Clang Tidy + env: + LLVM_VERSION: ${{ env.LLVM_VERSION }} + run: | + bun run clang-tidy:diff + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "`bun run clang-tidy`"