Skip to content

Commit 22d1e34

Browse files
authored
format yaml and json (#5428)
* format yaml and json * format shell scripts
1 parent 44dc5ea commit 22d1e34

19 files changed

+467
-418
lines changed

.github/actions/format-setup/action.yml

+16
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,19 @@ runs:
1919
https://github.com/shader-slang/slang-binaries/raw/306d22efc0f5f72c7230b0b6b7c99f03c46995bd/clang-format/x86_64-linux/bin/clang-format
2020
chmod +x "$tmpdir/clang-format"
2121
echo "$tmpdir" >> $GITHUB_PATH
22+
23+
- name: install prettier
24+
shell: bash
25+
run: |
26+
npm install -g prettier@3.3.3
27+
echo "$(npm bin -g)" >> $GITHUB_PATH
28+
29+
- name: install shfmt
30+
shell: bash
31+
run: |
32+
tmpdir=$(mktemp -d)
33+
curl -L -H "Authorization: token ${{github.token}}" \
34+
-o "$tmpdir/shfmt" \
35+
https://github.com/mvdan/sh/releases/download/v3.10.0/shfmt_v3.10.0_linux_amd64
36+
chmod +x "$tmpdir/shfmt"
37+
echo "$tmpdir" >> $GITHUB_PATH

.github/workflows/benchmark.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on:
44
push:
55
branches: [master]
66
paths-ignore:
7-
- 'docs/**'
8-
- 'LICENCE'
9-
- 'CONTRIBUTION.md'
10-
- 'README.md'
7+
- "docs/**"
8+
- "LICENCE"
9+
- "CONTRIBUTION.md"
10+
- "README.md"
1111
pull_request:
1212
branches: [master]
1313
paths-ignore:
14-
- 'docs/**'
15-
- 'LICENCE'
16-
- 'CONTRIBUTION.md'
17-
- 'README.md'
14+
- "docs/**"
15+
- "LICENCE"
16+
- "CONTRIBUTION.md"
17+
- "README.md"
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: true
@@ -25,8 +25,8 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
with:
28-
submodules: 'recursive'
29-
fetch-depth: '0'
28+
submodules: "recursive"
29+
fetch-depth: "0"
3030
- name: Common setup
3131
uses: ./.github/actions/common-setup
3232
with:
@@ -41,8 +41,8 @@ jobs:
4141
cmake --workflow --preset release
4242
- uses: actions/checkout@v3
4343
with:
44-
repository: 'shader-slang/MDL-SDK'
45-
path: 'external/MDL-SDK'
44+
repository: "shader-slang/MDL-SDK"
45+
path: "external/MDL-SDK"
4646
- name: Run benchmark
4747
run: |
4848
cd tools/benchmark

.github/workflows/ci.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on:
44
push:
55
branches: [master]
66
paths-ignore:
7-
- 'docs/**'
8-
- 'LICENCE'
9-
- 'CONTRIBUTION.md'
10-
- 'README.md'
7+
- "docs/**"
8+
- "LICENCE"
9+
- "CONTRIBUTION.md"
10+
- "README.md"
1111
pull_request:
1212
branches: [master]
1313
paths-ignore:
14-
- 'docs/**'
15-
- 'LICENCE'
16-
- 'CONTRIBUTION.md'
17-
- 'README.md'
14+
- "docs/**"
15+
- "LICENCE"
16+
- "CONTRIBUTION.md"
17+
- "README.md"
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: true
@@ -87,8 +87,8 @@ jobs:
8787
steps:
8888
- uses: actions/checkout@v3
8989
with:
90-
submodules: 'recursive'
91-
fetch-depth: '0'
90+
submodules: "recursive"
91+
fetch-depth: "0"
9292
- name: Setup
9393
uses: ./.github/actions/common-setup
9494
with:

.github/workflows/compile-regression-test.yml

+35-35
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: Compile Regression-Test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
paths-ignore:
7-
- 'docs/**'
8-
- 'LICENCE'
9-
- 'CONTRIBUTION.md'
10-
- 'README.md'
7+
- "docs/**"
8+
- "LICENCE"
9+
- "CONTRIBUTION.md"
10+
- "README.md"
1111
pull_request:
12-
branches: [ master ]
12+
branches: [master]
1313
paths-ignore:
14-
- 'docs/**'
15-
- 'LICENCE'
16-
- 'CONTRIBUTION.md'
17-
- 'README.md'
14+
- "docs/**"
15+
- "LICENCE"
16+
- "CONTRIBUTION.md"
17+
- "README.md"
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: true
@@ -40,28 +40,28 @@ jobs:
4040
run:
4141
shell: bash
4242
steps:
43-
- uses: actions/checkout@v3
44-
with:
45-
submodules: 'recursive'
46-
fetch-depth: '0'
47-
- name: Setup
48-
uses: ./.github/actions/common-setup
49-
with:
50-
os: ${{matrix.os}}
51-
compiler: ${{matrix.compiler}}
52-
platform: ${{matrix.platform}}
53-
config: ${{matrix.config}}
54-
build-llvm: true
55-
- name: Build Slang
56-
run: |
57-
cmake --preset default --fresh \
58-
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
59-
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
60-
-DSLANG_ENABLE_CUDA=1
61-
cmake --workflow --preset "${{matrix.config}}"
62-
- name: Run compile and validation test
63-
run: |
64-
cp -r /c/slang_compile_test_suite_a .
65-
cd slang_compile_test_suite_a
66-
export SLANGC_PATH="$bin_dir/slangc.exe"
67-
bash ./compile_all_slang.sh
43+
- uses: actions/checkout@v3
44+
with:
45+
submodules: "recursive"
46+
fetch-depth: "0"
47+
- name: Setup
48+
uses: ./.github/actions/common-setup
49+
with:
50+
os: ${{matrix.os}}
51+
compiler: ${{matrix.compiler}}
52+
platform: ${{matrix.platform}}
53+
config: ${{matrix.config}}
54+
build-llvm: true
55+
- name: Build Slang
56+
run: |
57+
cmake --preset default --fresh \
58+
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
59+
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
60+
-DSLANG_ENABLE_CUDA=1
61+
cmake --workflow --preset "${{matrix.config}}"
62+
- name: Run compile and validation test
63+
run: |
64+
cp -r /c/slang_compile_test_suite_a .
65+
cd slang_compile_test_suite_a
66+
export SLANGC_PATH="$bin_dir/slangc.exe"
67+
bash ./compile_all_slang.sh

.github/workflows/ensure-pr-label.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ on:
33
pull_request:
44
types: [opened, labeled, unlabeled, synchronize]
55
paths-ignore:
6-
- 'docs/**'
7-
- 'LICENCE'
8-
- 'CONTRIBUTION.md'
9-
- 'README.md'
6+
- "docs/**"
7+
- "LICENCE"
8+
- "CONTRIBUTION.md"
9+
- "README.md"
1010
jobs:
1111
label:
1212
runs-on: ubuntu-latest
@@ -20,4 +20,4 @@ jobs:
2020
count: 1
2121
labels: |
2222
pr: non-breaking
23-
pr: breaking change
23+
pr: breaking change

.github/workflows/falcor-compiler-perf-test.yml

+59-59
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ name: Falcor Compiler Perf-Test
44

55
on:
66
push:
7-
branches: [ master ]
7+
branches: [master]
88
paths-ignore:
9-
- 'docs/**'
10-
- 'LICENCE'
11-
- 'CONTRIBUTION.md'
12-
- 'README.md'
9+
- "docs/**"
10+
- "LICENCE"
11+
- "CONTRIBUTION.md"
12+
- "README.md"
1313
pull_request:
14-
branches: [ master ]
14+
branches: [master]
1515
paths-ignore:
16-
- 'docs/**'
17-
- 'LICENCE'
18-
- 'CONTRIBUTION.md'
19-
- 'README.md'
16+
- "docs/**"
17+
- "LICENCE"
18+
- "CONTRIBUTION.md"
19+
- "README.md"
2020
concurrency:
2121
group: ${{ github.workflow }}-${{ github.ref }}
2222
cancel-in-progress: true
@@ -42,61 +42,61 @@ jobs:
4242
run:
4343
shell: bash
4444
steps:
45-
- uses: actions/checkout@v3
46-
with:
47-
submodules: 'recursive'
48-
fetch-depth: '0'
45+
- uses: actions/checkout@v3
46+
with:
47+
submodules: "recursive"
48+
fetch-depth: "0"
4949

50-
- name: Setup
51-
uses: ./.github/actions/common-setup
52-
with:
53-
os: ${{matrix.os}}
54-
compiler: ${{matrix.compiler}}
55-
platform: ${{matrix.platform}}
56-
config: ${{matrix.config}}
57-
build-llvm: true
50+
- name: Setup
51+
uses: ./.github/actions/common-setup
52+
with:
53+
os: ${{matrix.os}}
54+
compiler: ${{matrix.compiler}}
55+
platform: ${{matrix.platform}}
56+
config: ${{matrix.config}}
57+
build-llvm: true
5858

59-
- name: Build Slang
60-
run: |
61-
cmake --preset default --fresh \
62-
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
63-
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
64-
-DSLANG_ENABLE_CUDA=1
65-
cmake --workflow --preset "${{matrix.config}}"
59+
- name: Build Slang
60+
run: |
61+
cmake --preset default --fresh \
62+
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
63+
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
64+
-DSLANG_ENABLE_CUDA=1
65+
cmake --workflow --preset "${{matrix.config}}"
6666
67-
- uses: robinraju/release-downloader@v1.9
68-
id: download
69-
with:
70-
# The source repository path.
71-
# Expected format {owner}/{repo}
72-
# Default: ${{ github.repository }}
73-
repository: "shader-slang/falcor-compile-perf-test"
67+
- uses: robinraju/release-downloader@v1.9
68+
id: download
69+
with:
70+
# The source repository path.
71+
# Expected format {owner}/{repo}
72+
# Default: ${{ github.repository }}
73+
repository: "shader-slang/falcor-compile-perf-test"
7474

75-
# A flag to set the download target as latest release
76-
# The default value is 'false'
77-
latest: true
75+
# A flag to set the download target as latest release
76+
# The default value is 'false'
77+
latest: true
7878

79-
# The name of the file to download.
80-
# Use this field only to specify filenames other than tarball or zipball, if any.
81-
# Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
82-
fileName: "falcor_perf_test-*-win-64.zip"
79+
# The name of the file to download.
80+
# Use this field only to specify filenames other than tarball or zipball, if any.
81+
# Supports wildcard pattern (eg: '*', '*.deb', '*.zip' etc..)
82+
fileName: "falcor_perf_test-*-win-64.zip"
8383

84-
# Download the attached zipball (*.zip)
85-
zipBall: true
84+
# Download the attached zipball (*.zip)
85+
zipBall: true
8686

87-
# Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
88-
# It will create the target directory automatically if not present
89-
# eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
90-
out-file-path: "./falcor-perf-test"
87+
# Relative path under $GITHUB_WORKSPACE to place the downloaded file(s)
88+
# It will create the target directory automatically if not present
89+
# eg: out-file-path: "my-downloads" => It will create directory $GITHUB_WORKSPACE/my-downloads
90+
out-file-path: "./falcor-perf-test"
9191

92-
# Somehow there is a bug in this flag, the executable extracted is not runnable. We have to
93-
# extract ourselves.
94-
extract: false
92+
# Somehow there is a bug in this flag, the executable extracted is not runnable. We have to
93+
# extract ourselves.
94+
extract: false
9595

96-
- name: run falcor-compiler-perf-test
97-
shell: pwsh
98-
run: |
99-
$filename = '${{ fromJson(steps.download.outputs.downloaded_files)[0] }}'
100-
Expand-Archive $filename -DestinationPath .\falcor-perf-test
101-
$env:PATH += ";.\build\${{matrix.config}}\bin";
102-
.\falcor-perf-test\bin\Release\falcor_perftest.exe
96+
- name: run falcor-compiler-perf-test
97+
shell: pwsh
98+
run: |
99+
$filename = '${{ fromJson(steps.download.outputs.downloaded_files)[0] }}'
100+
Expand-Archive $filename -DestinationPath .\falcor-perf-test
101+
$env:PATH += ";.\build\${{matrix.config}}\bin";
102+
.\falcor-perf-test\bin\Release\falcor_perftest.exe

0 commit comments

Comments
 (0)