Skip to content

Commit

Permalink
ci: try to make git work in github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Jarry <[email protected]>
  • Loading branch information
rjarry committed Mar 21, 2024
1 parent 508132f commit 8a1c8a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- run: |
dnf install -y \
make gcc ninja-build meson clang-tools-extra git gcovr scdoc \
make gcc ninja-build meson gcovr scdoc \
libasan \
libcmocka-devel \
libedit-devel \
Expand All @@ -26,4 +26,17 @@ jobs:
python3-pyelftools
- run: make
- run: make coverage
lint:
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: noninteractive
steps:
- run: sudo apt-get install -y make clang-format git
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: make lint
- run: |
git config --global --add safe.directory $PWD
git log --oneline --decorate "${{ github.head_ref }}..${{ github.ref }}"
if: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ c_src = `find * .* $(foreach d,$(exclude),$(call prune,$d)) -type f -name '*.[ch
all_files = `find * .* $(foreach d,$(exclude),$(call prune,$d)) -type f -print`

.PHONY: lint
lint: $(BUILDDIR)/build.ninja
lint:
@echo '[clang-format]'
$Q clang-format --dry-run --Werror $(c_src)
@echo '[license-check]'
Expand Down

0 comments on commit 8a1c8a4

Please sign in to comment.