-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
2,156 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Format | ||
on: | ||
repository_dispatch: | ||
types: [format-command] | ||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.SLANGBOT_PAT }} | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.client_payload.pull_request.head.ref }} | ||
|
||
- run: pip3 install gersemi | ||
|
||
- name: install clang-format | ||
run: | | ||
tmpdir=$(mktemp -d) | ||
curl -L -H "Authorization: token ${{ secrets.SLANGBOT_PAT }}" \ | ||
-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 | ||
- run: ./extras/formatting.sh | ||
|
||
- name: Configure Git commit signing | ||
run: | | ||
echo "${{ secrets.SLANGBOT_SIGNING_KEY }}" > "${{runner.temp}}"/signing_key | ||
chmod 600 "${{runner.temp}}"/signing_key | ||
git config commit.gpgsign true | ||
git config gpg.format ssh | ||
git config user.signingkey "${{runner.temp}}"/signing_key | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
fetch: false | ||
message: "format code" | ||
push: true | ||
|
||
- name: Add reaction | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.SLANGBOT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
reactions-edit-mode: replace | ||
reactions: hooray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Slash Command Dispatch | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
slashCommandDispatch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Slash Command Dispatch | ||
id: scd | ||
uses: peter-evans/slash-command-dispatch@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reaction-token: ${{ secrets.SLANGBOT_PAT }} | ||
config: > | ||
[ | ||
{ | ||
"command": "format", | ||
"permission": "none", | ||
"issue_type": "pull-request" | ||
} | ||
] | ||
- name: Edit comment with error message | ||
if: steps.scd.outputs.error-message | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.SLANGBOT_PAT }} | ||
comment-id: ${{ github.event.comment.id }} | ||
body: | | ||
> ${{ steps.scd.outputs.error-message }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This script uses `slangc` to generate stdlib reference documentation and push the updated | ||
# This script uses `slangc` to generate the core module reference documentation and push the updated | ||
# documents to shader-slang/stdlib-reference repository. | ||
# The stdlib-reference repository has github-pages setup so that the markdown files we generate | ||
# in this step will be rendered as html pages by Jekyll upon a commit to the repository. | ||
|
@@ -33,12 +33,12 @@ Remove-Item -Path ".\stdlib-reference\attributes" -Recurse -Force | |
git describe --tags | Out-File -FilePath ".\stdlib-reference\_includes\version.inc" -Encoding ASCII | ||
|
||
cd stdlib-reference | ||
& ../../build/Release/bin/slangc -compile-stdlib -doc | ||
& ../../build/Release/bin/slangc -compile-core-module -doc | ||
Move-Item -Path ".\toc.html" -Destination ".\_includes\stdlib-reference-toc.html" -Force | ||
git config user.email "[email protected]" | ||
git config user.name "Stdlib Reference Bot" | ||
git add . | ||
git commit -m "Update stdlib reference" | ||
git commit -m "Update the core module reference" | ||
git push | ||
cd ../ | ||
|
||
|
@@ -49,4 +49,4 @@ cd ../ | |
# Copy-Item -Path .\stdlib-reference\global-decls -Destination D:\git_repo\stdlib-reference\global-decls -Recurse -Force | ||
# Copy-Item -Path .\stdlib-reference\interfaces -Destination D:\git_repo\stdlib-reference\interfaces -Recurse -Force | ||
# Copy-Item -Path .\stdlib-reference\types -Destination D:\git_repo\stdlib-reference\types -Recurse -Force | ||
# Copy-Item -Path .\stdlib-reference\_includes\stdlib-reference-toc.html -Destination D:\git_repo\stdlib-reference\_includes\stdlib-reference-toc.html -Force | ||
# Copy-Item -Path .\stdlib-reference\_includes\stdlib-reference-toc.html -Destination D:\git_repo\stdlib-reference\_includes\stdlib-reference-toc.html -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.