-
Notifications
You must be signed in to change notification settings - Fork 6
/
lefthook.yml
51 lines (46 loc) · 1.59 KB
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
build-plugin:
piped: true
commands:
1_cmake:
cd plugins/ipc-plugin && cmake -S . -B build
2_make:
cd plugins/ipc-plugin/build && make && make install
develop:
piped: true
commands:
1_pull_base:
run: docker pull ubuntu:xenial
2_build:
run: docker build --force-rm --build-arg RUST_VERSION=${RUST_VERSION:-stable} -t suricata-ipc-dev:latest --target development -f docker/Dockerfile .
3_develop:
run: docker run --rm -it --cap-add=ALL --security-opt seccomp=unconfined --name suricata_ipc_dev -v `pwd`:/development suricata-ipc-dev
test:
piped: true
commands:
1_pull_base:
run: docker pull ubuntu:xenial
2_build:
run: docker build --force-rm --build-arg RUST_VERSION=${RUST_VERSION:-stable} -t suricata-ipc-test:latest --target test -f docker/Dockerfile .
3_develop:
run: docker run --rm --cap-add=ALL --security-opt seccomp=unconfined --name suricata_ipc_dev -v `pwd`:/development suricata-ipc-test
local-test:
piped: true
commands:
1_build:
run: cargo test --no-run
2_test:
run: RUST_LOG=suricata_ipc:debug SURICATA_EXE=/usr/local/bin/suricata SURICATA_CONFIG_DIR=/usr/local/etc/suricata SURICATA_IPC_PLUGIN=/usr/local/lib/libipc-plugin.dylib SURICATA_LOG_DIR=/tmp SC_LOG_LEVEL=info cargo test
format:
piped: true
commands:
install:
run: rustup component add rustfmt
cargo_fmt:
run: cargo +${RUST_VERSION:-stable} fmt --all
pre-push:
piped: true
commands:
install:
run: rustup component add rustfmt
fmt:
run: cargo +${RUST_VERSION:-stable} fmt --all -- --check