Run all formatting jobs on Ubuntu 22.04

This commit is contained in:
Chris Thrasher 2022-11-25 12:39:06 -06:00
parent 510068d501
commit c5bd4a4063

View File

@ -115,28 +115,23 @@ jobs:
cmake --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} cmake --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
format: format:
name: Formatting on ${{ matrix.platform.name }} name: Formatting with clang-format-${{ matrix.version }}
runs-on: ${{ matrix.platform.os }} runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: version: [12, 13, 14]
- { name: Windows, os: windows-2022, executable: clang-format }
- { name: Linux, os: ubuntu-latest, executable: clang-format-12 }
- { name: macOS, os: macos-12, executable: clang-format }
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install macOS Dependencies - name: Install Dependencies
if: runner.os == 'macOS' run: sudo apt-get install clang-format-${{ matrix.version }}
run: brew install clang-format
- name: Format Code - name: Format Code
shell: bash run: cmake -DCLANG_FORMAT_EXECUTABLE=clang-format-${{ matrix.version }} -P $GITHUB_WORKSPACE/cmake/Format.cmake
run: cmake -DCLANG_FORMAT_EXECUTABLE=${{ matrix.platform.executable }} -P $GITHUB_WORKSPACE/cmake/Format.cmake
- name: Check Formatting - name: Check Formatting
run: git diff --exit-code run: git diff --exit-code