Skip to content

Commit 456a921

Browse files
committed
ci: try to make git work in github actions
Signed-off-by: Robin Jarry <[email protected]>
1 parent 508132f commit 456a921

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/ci.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,32 @@ jobs:
1414
runs-on: ubuntu-latest
1515
container: fedora:latest
1616
steps:
17-
- uses: actions/checkout@v4
1817
- run: |
1918
dnf install -y \
20-
make gcc ninja-build meson clang-tools-extra git gcovr scdoc \
19+
make gcc ninja-build meson git gcovr scdoc \
2120
libasan \
2221
libcmocka-devel \
2322
libedit-devel \
2423
libevent-devel \
2524
numactl-devel \
2625
python3-pyelftools
26+
- uses: actions/checkout@v4
2727
- run: make
2828
- run: make coverage
29+
lint:
30+
runs-on: ubuntu-latest
31+
container: debian:testing
32+
env:
33+
DEBIAN_FRONTEND: noninteractive
34+
steps:
35+
- run: |
36+
apt-get update
37+
apt-get install -y make clang-format git
38+
- uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
2941
- run: make lint
42+
- run: |
43+
git config --global --add safe.directory $PWD
44+
git log --oneline --decorate "${{ github.head_ref }}..${{ github.ref }}"
45+
if: ${{ github.head_ref }}

GNUmakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ c_src = `find * .* $(foreach d,$(exclude),$(call prune,$d)) -type f -name '*.[ch
4646
all_files = `find * .* $(foreach d,$(exclude),$(call prune,$d)) -type f -print`
4747

4848
.PHONY: lint
49-
lint: $(BUILDDIR)/build.ninja
49+
lint:
5050
@echo '[clang-format]'
5151
$Q clang-format --dry-run --Werror $(c_src)
5252
@echo '[license-check]'

0 commit comments

Comments
 (0)