Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clang Format step #1174

Merged
merged 1 commit into from
Dec 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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