xref: /libCEED/.github/workflows/c-fortran-test-style.yml (revision dcd9f19c403551effd883234b856bcd9f61ce4a8)
1dfb8ed23Sjeremyltname: Style
23446d1b5SJeremy L Thompson
33446d1b5SJeremy L Thompsonon:
43446d1b5SJeremy L Thompson  push:
5*dcd9f19cSJeremy L Thompson    branches:
6*dcd9f19cSJeremy L Thompson      - main
7*dcd9f19cSJeremy L Thompson  pull_request:
83446d1b5SJeremy L Thompson
93446d1b5SJeremy L Thompsonjobs:
103446d1b5SJeremy L Thompson  test:
113446d1b5SJeremy L Thompson    strategy:
123446d1b5SJeremy L Thompson      matrix:
136c0547c1SJeremy L Thompson        os: [ubuntu-22.04]
143446d1b5SJeremy L Thompson        compiler: [clang]
153446d1b5SJeremy L Thompson
163446d1b5SJeremy L Thompson    runs-on: ${{ matrix.os }}
173446d1b5SJeremy L Thompson
183446d1b5SJeremy L Thompson    steps:
193446d1b5SJeremy L Thompson    - name: Environment setup
200adbbf50SJeremy L Thompson      uses: actions/checkout@v3
212b730f8bSJeremy L Thompson    - name: Install clang-format
22b559d91bSJed Brown      run: sudo apt install clang-format-15
233446d1b5SJeremy L Thompson    - name: C style
243446d1b5SJeremy L Thompson      env:
253446d1b5SJeremy L Thompson        CC: ${{ matrix.compiler }}
266c0547c1SJeremy L Thompson        FC: gfortran-11
273446d1b5SJeremy L Thompson      run: |
283446d1b5SJeremy L Thompson        make info
29b559d91bSJed Brown        make format-c -j2 CLANG_FORMAT=clang-format-15 && git diff --exit-code
30