Skip to content

Commit 4b4212f

Browse files
committed
Move clippy into the image
To avoid differences in versions, move clippy and formatting checks into the image.
1 parent 82c7d22 commit 4b4212f

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
lint-and-test:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v3
18-
19-
- name: Check code formatting
20-
run: cargo fmt --check
21-
22-
- name: Run clippy
23-
run: cargo clippy -- -D warnings
24-
25-
- name: Run tests
26-
run: cargo test
27-
2814
build-and-push:
2915
runs-on: ubuntu-latest
3016
steps:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM builder:latest as builder
22

3-
FROM registry.fedoraproject.org/fedora:41
3+
FROM registry.fedoraproject.org/fedora:42
44

55
RUN mkdir /etc/berserker
66

Dockerfile.build

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
FROM registry.fedoraproject.org/fedora:41
1+
FROM registry.fedoraproject.org/fedora:42
22

3-
RUN dnf install -y rust cargo nasm
3+
RUN dnf install -y \
4+
rust \
5+
cargo \
6+
clippy \
7+
rustfmt \
8+
# for stub \
9+
nasm \
10+
# for script jit \
11+
llvm-devel \
12+
zlib-devel \
13+
libxml2-devel \
14+
libstdc++-static \
15+
# for bpf \
16+
clang \
17+
kernel-devel \
18+
libbpf-devel
419

520
ADD ./ /berserker/
621

722
WORKDIR /berserker/
823

24+
RUN nasm -f elf64 -o stub.o stub.asm && ld -o stub stub.o
25+
26+
RUN cargo fmt --check
27+
28+
RUN cargo clippy -- -D warnings
29+
930
RUN cargo build -r
1031

11-
RUN nasm -f elf64 -o stub.o stub.asm && ld -o stub stub.o
32+
RUN cargo test

0 commit comments

Comments
 (0)