You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change to .github/workflows/ClangFormat.yml should achieve it:
jobs:
CheckFormat:
runs-on: ubuntu-22.04
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- name: "Install clang format"
uses: ./.github/actions/InstallPackages
with:
install-llvm: true # Needed to configure jlm
install-clang-format: true
- name: "Configure jlm with HLS and MLIR enabled"
run: ./configure.sh --enable-mlir --enable-hls
- name: "Check format"
run: make format
- name: "Commit all changed files back to the repository"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automated clang-format
The text was updated successfully, but these errors were encountered:
@sjalander I agree that it is a bit annoying to fix the formatting sometimes and that this could be automated. Thus, I am kind of in favor of this and do not really see a problem. What bothers me a bit though is that we bind ourselves to a third party action with this.
Should we change the clang-format CI action such that it runs the actual formatting and upon detecting changed files commit these to the local branch?
This avoids failing the CI simply because one have forgotten to run clang-format.
This action seems to have the necessary functionality:
https://github.com/stefanzweifel/git-auto-commit-action
This change to .github/workflows/ClangFormat.yml should achieve it:
The text was updated successfully, but these errors were encountered: