Skip to content

Commit

Permalink
Add Clang Format step
Browse files Browse the repository at this point in the history
This changelist adds a Clang Format step to GitHub Actions builds, uploading the formatted source for developer reference.
  • Loading branch information
jstone-lucasfilm committed Dec 27, 2022
1 parent a0f831d commit 39e0c5b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
compiler_version: "14"
python: 3.9
cmake_config: -DMATERIALX_DYNAMIC_ANALYSIS=ON
clang_format: ON
dynamic_analysis: ON

- name: MacOS_Xcode_11_Python37
Expand Down Expand Up @@ -171,6 +172,10 @@ jobs:
with:
node-version: '16'

- name: Run Clang Format
if: matrix.clang_format == 'ON'
run: find source \( -name *.h -o -name *.cpp \) ! -path "*/Catch/*" ! -path "*/External/*" ! -path "*/NanoGUI/*" ! -path "*/PugiXML/*" ! -path "*/PyBind11/*" | xargs clang-format -i --verbose

- name: CMake Generate
run: |
mkdir build
Expand Down Expand Up @@ -243,6 +248,13 @@ jobs:
name: MaterialX_${{ matrix.name }}
path: build/installed/

- name: Upload Formatted Source
if: matrix.clang_format == 'ON'
uses: actions/upload-artifact@v3
with:
name: MaterialX_ClangFormat
path: source

- name: Upload Reference Shaders
uses: actions/upload-artifact@v3
if: matrix.upload_shaders == 'ON'
Expand Down

0 comments on commit 39e0c5b

Please sign in to comment.