develop:
piped: true
commands:
1_pull_base:
run: docker pull ubuntu-xenial:latest
2_build:
run: docker build --force-rm --build-arg RUST_VERSION=${RUST_VERSION:-stable} -t suricata-rs-dev:latest --target development -f docker/Dockerfile .
3_develop:
run: docker run --rm -it --cap-add=ALL --security-opt seccomp=unconfined --name suricata_rs_dev -v `pwd`:/development suricata-rs-dev
test:
piped: true
commands:
1_pull_base:
run: docker pull ubuntu-xenial:latest
2_build:
run: docker build --force-rm --build-arg RUST_VERSION=${RUST_VERSION:-stable} -t suricata-rs-test:latest --target test -f docker/Dockerfile .
3_develop:
run: docker run --rm --cap-add=ALL --security-opt seccomp=unconfined --name suricata_rs_dev -v `pwd`:/development suricata-rs-test
local-test:
piped: true
commands:
1_build:
run: cargo test --no-run
2_test:
run: RUST_LOG=suricata_ipc:debug SURICATA_CONFIG_DIR=/usr/local/etc/suricata SURICATA_EXE=/usr/local/bin/suricata 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