Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ concurrency:
cancel-in-progress: true

jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check code formatting
run: cargo fmt --check

- name: Run clippy
run: cargo clippy -- -D warnings

- name: Run tests
run: cargo test

build-and-push:
runs-on: ubuntu-latest
steps:
Expand Down
88 changes: 78 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ libc = "0.2.169"
smoltcp = "0.12.0"
aya = "0.13.1"
aya-obj = "0.2.1"
pest = "2.8.1"
pest_derive = "2.8.1"
llvm-sys = "201.0.1"
docopt = "1.1.1"
21 changes: 19 additions & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
FROM registry.fedoraproject.org/fedora:41
FROM registry.fedoraproject.org/fedora:42

RUN dnf install -y rust cargo nasm
RUN dnf install -y \
rust \
cargo \
clippy \
rustfmt \
# for stub \
nasm \
# for script jit \
llvm-devel \
zlib-devel \
libxml2-devel \
libstdc++-static

ADD ./ /berserker/

WORKDIR /berserker/

RUN cargo fmt --check

RUN cargo clippy -- -D warnings

RUN cargo build -r

RUN cargo test

RUN nasm -f elf64 -o stub.o stub.asm && ld -o stub stub.o
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use serde::Deserialize;
use std::{fmt::Display, net::Ipv4Addr};
use syscalls::Sysno;

pub mod script;
pub mod worker;

/// Main workload configuration, contains general bits for all types of
Expand Down Expand Up @@ -358,8 +359,8 @@ mod tests {
assert_eq!(restart_interval, 10);
if let Workload::Syscalls {
arrival_rate,
tight_loop,
syscall_nr,
tight_loop: _,
syscall_nr: _,
} = workload
{
assert_eq!(arrival_rate, 10.0);
Expand Down
Loading