yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeDisable more CI workflows on master push. (#7983)42dc521f7

master
1.7 KiB54 linesraw
1name: Check Command Line Reference (comment /regenerate-cmdline-ref to auto-fix)
2
3on:
4  pull_request:
5    branches: [master]
6
7jobs:
8  check-cmdline-ref:
9    runs-on: ubuntu-latest
10    steps:
11      - uses: actions/checkout@v4
12        with:
13          submodules: "recursive"
14
15      - name: Install dependencies
16        run: |
17          sudo apt-get update
18          sudo apt-get install -y libx11-dev
19
20      - name: Setup
21        uses: ./.github/actions/common-setup
22        with:
23          os: linux
24          compiler: gcc
25          platform: x86_64
26          config: release
27          build-llvm: false
28
29      - name: Build Slang
30        run: |
31          cmake --preset default --fresh \
32            -DSLANG_SLANG_LLVM_FLAVOR=DISABLE \
33            -DSLANG_ENABLE_TESTS=OFF \
34            -DSLANG_ENABLE_EXAMPLES=OFF \
35            -DSLANG_ENABLE_GFX=OFF \
36            -DSLANG_ENABLE_SLANGD=OFF \
37            -DSLANG_EXCLUDE_DAWN=ON \
38            -DSLANG_EXCLUDE_TINT=ON
39          cmake --workflow --preset release
40
41      - name: Generate command line reference
42        run: |
43          mkdir -p temp
44          "$bin_dir/slangc" -help-style markdown -h > temp/command-line-slangc-reference.md
45
46      - name: Compare with existing reference
47        id: compare
48        run: |
49          if ! diff -q temp/command-line-slangc-reference.md docs/command-line-slangc-reference.md > /dev/null; then
50            echo "Command line reference is out of date. Diff:"
51            diff -u docs/command-line-slangc-reference.md temp/command-line-slangc-reference.md
52            echo "Please run 'slangc -help-style markdown -h > docs/command-line-slangc-reference.md' or comment '/regenerate-cmdline-ref' on your PR."
53            exit 1
54          fi