mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 21:24:36 +00:00
dragonball: enhance dragonball ci
Unified use of Makefile instead of calling `cargo test` directly. Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
This commit is contained in:
parent
6a64fb0eb3
commit
a343c570e4
3
.github/workflows/static-checks.yaml
vendored
3
.github/workflows/static-checks.yaml
vendored
@ -116,5 +116,4 @@ jobs:
|
|||||||
cd src/dragonball
|
cd src/dragonball
|
||||||
/root/.cargo/bin/cargo version
|
/root/.cargo/bin/cargo version
|
||||||
rustc --version
|
rustc --version
|
||||||
# TODO: Using the cargo command directly will get `sudo: cargo: command not found` error.
|
sudo -E env PATH=$PATH LIBC=gnu SUPPORT_VIRTUALIZATION=true make test
|
||||||
sudo -E /root/.cargo/bin/cargo test --all-features -- --nocapture
|
|
||||||
|
@ -13,7 +13,8 @@ else
|
|||||||
default: build
|
default: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cargo build --all-features
|
@echo "INFO: cargo build..."
|
||||||
|
cargo build --all-features --target $(TRIPLE)
|
||||||
|
|
||||||
check: clippy format
|
check: clippy format
|
||||||
|
|
||||||
@ -34,6 +35,13 @@ clean:
|
|||||||
cargo clean
|
cargo clean
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "INFO: skip testing dragonball"
|
ifdef SUPPORT_VIRTUALIZATION
|
||||||
|
cargo test --all-features --target $(TRIPLE) -- --nocapture
|
||||||
|
else
|
||||||
|
@echo "INFO: skip testing dragonball, it need virtualization support."
|
||||||
|
exit 0
|
||||||
|
endif
|
||||||
|
|
||||||
endif # ifeq ($(ARCH), s390x)
|
endif # ifeq ($(ARCH), s390x)
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := default
|
||||||
|
1
utils.mk
1
utils.mk
@ -173,6 +173,7 @@ TRIPLE = $(ARCH)-unknown-linux-$(LIBC)
|
|||||||
CWD := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
CWD := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
standard_rust_check:
|
standard_rust_check:
|
||||||
|
@echo "standard rust check..."
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
cargo clippy --all-targets --all-features --release \
|
cargo clippy --all-targets --all-features --release \
|
||||||
-- \
|
-- \
|
||||||
|
Loading…
Reference in New Issue
Block a user