Skip to content

need sudo for apt

need sudo for apt #2

name: clang-format compliance
on:
push:
pull_request:
workflow_dispatch:
jobs:
clang_format_check:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get -yqq update && sudo apt-get -yqq install --no-install-recommends gnupg2 software-properties-common wget
- run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
- run: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main'
- run: sudo apt-get -yqq update && sudo apt-get -yqq install clang-format-17
- name: Check out repository code
uses: actions/checkout@v4
- name: Run checker on code
run: clang-format -i ${{ github.workspace }} && git diff --name-only
ls ${{ github.workspace }}