summaryrefslogtreecommitdiff
path: root/.github/actions
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 09:05:12 +0800
committerGitHub <noreply@github.com>2024-10-29 09:05:12 +0800
commita1032dd738305b56bd2df5b654dd8c5296408848 (patch)
tree9f29d9d5eec525ad49703fc3eb84ddb297b0b51d /.github/actions
parentb7a619b45b0745f166d2dcc5985b994fb1d85d13 (diff)
Improvements to formatting bot (#5421)
* Use github token for formatting command dispatch * Open PR instead of committing directly when formatting * Add --no-version-check option to formatting script * Colorful diff output for cmake formatting
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/format-setup/action.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/actions/format-setup/action.yml b/.github/actions/format-setup/action.yml
new file mode 100644
index 000000000..58eddac77
--- /dev/null
+++ b/.github/actions/format-setup/action.yml
@@ -0,0 +1,21 @@
+name: Formatting tools setup
+
+description: Performs setup common to the code formatting actions
+
+runs:
+ using: composite
+ steps:
+ - name: install gersemi
+ shell: bash
+ run: |
+ pip3 install gersemi colorama
+
+ - name: install clang-format
+ shell: bash
+ run: |
+ tmpdir=$(mktemp -d)
+ curl -L -H "Authorization: token ${{github.token}}" \
+ -o "$tmpdir/clang-format" \
+ https://github.com/shader-slang/slang-binaries/raw/4e88845ec51641b4c92e68027e359090bdb219e0/clang-format/x86_64-linux/bin/clang-format
+ chmod +x "$tmpdir/clang-format"
+ echo "$tmpdir" >> $GITHUB_PATH