Skip to content

Commit 253d6df

Browse files
authored
Merge pull request intel#611 from myler/cherry-pick-clang-format
Update clang-format.yml
2 parents e39cd69 + 8bb21e6 commit 253d6df

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/clang-format.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
steps:
12-
- name: Get clang-format first
13-
run: sudo apt-get install -yqq clang-format-9
1411

12+
container:
13+
image: ghcr.io/intel/llvm/sycl_ubuntu2004_nightly:no-drivers
14+
15+
steps:
1516
- uses: actions/checkout@v2
1617
with:
1718
fetch-depth: 2
18-
19-
- name: Get clang-format-diff.py tool
20-
run: |
21-
wget https://raw.githubusercontent.com/intel/llvm/sycl/clang/tools/clang-format/clang-format-diff.py
22-
chmod u+x clang-format-diff.py
2319

2420
- name: Run clang-format for the patch
21+
shell: bash {0}
2522
run: |
26-
git diff -U0 --no-color ${GITHUB_SHA}^1 ${GITHUB_SHA} -- | python clang-format-diff.py -p1 -binary clang-format-9 > ./clang-format.patch
23+
git clang-format ${GITHUB_SHA}^1
24+
git diff > ./clang-format.patch
25+
2726
# Add patch with formatting fixes to CI job artifacts
2827
- uses: actions/upload-artifact@v1
2928
with:

0 commit comments

Comments
 (0)