From 695a2d5dc82ac42d85fdc5fe3ea3b25f062dd851 Mon Sep 17 00:00:00 2001 From: Amulyam24 Date: Wed, 6 Dec 2023 14:30:49 +0530 Subject: [PATCH] Add static checks for ppc64le --- .github/workflows/static-checks.yaml | 1 + src/dragonball/Makefile | 4 ++-- src/tools/agent-ctl/Makefile | 2 +- src/tools/kata-ctl/Cargo.toml | 5 ++++- src/tools/kata-ctl/Makefile | 12 ++++++++++-- src/tools/runk/Makefile | 2 +- src/tools/trace-forwarder/Makefile | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index e40ecbe5b931..39e76df6865f 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -78,6 +78,7 @@ jobs: - "ubuntu-20.04" - "arm-no-k8s" - "s390x" + - "ppc64le" runs-on: ${{ matrix.instance }} steps: - name: Adjust a permission for repo diff --git a/src/dragonball/Makefile b/src/dragonball/Makefile index f0321011d218..ab74116db156 100644 --- a/src/dragonball/Makefile +++ b/src/dragonball/Makefile @@ -4,9 +4,9 @@ include ../../utils.mk -ifeq ($(ARCH), s390x) +ifeq ($(ARCH), $(filter $(ARCH), s390x ppc64le)) default build check test clippy vendor: - @echo "s390x not support currently" + @echo "$(ARCH) is not support currently" exit 0 else diff --git a/src/tools/agent-ctl/Makefile b/src/tools/agent-ctl/Makefile index fe56fa098241..a49f88e6b01b 100644 --- a/src/tools/agent-ctl/Makefile +++ b/src/tools/agent-ctl/Makefile @@ -7,7 +7,7 @@ include ../../../utils.mk ifeq ($(ARCH), ppc64le) override ARCH = powerpc64le - endif +endif .DEFAULT_GOAL := default default: build diff --git a/src/tools/kata-ctl/Cargo.toml b/src/tools/kata-ctl/Cargo.toml index d308f0271f7a..617b8856fa72 100644 --- a/src/tools/kata-ctl/Cargo.toml +++ b/src/tools/kata-ctl/Cargo.toml @@ -54,7 +54,10 @@ lazy_static = "1.2" [target.'cfg(target_arch = "s390x")'.dependencies] reqwest = { version = "0.11", default-features = false, features = ["json", "blocking", "native-tls"] } -[target.'cfg(not(target_arch = "s390x"))'.dependencies] +[target.'cfg(target_arch = "powerpc64le")'.dependencies] +reqwest = { version = "0.11", default-features = false, features = ["json", "blocking", "native-tls"] } + +[target.'cfg(not(any(target_arch = "s390x",target_arch="powerpc64le")))'.dependencies] reqwest = { version = "0.11", default-features = false, features = ["json", "blocking", "rustls-tls"] } [dev-dependencies] diff --git a/src/tools/kata-ctl/Makefile b/src/tools/kata-ctl/Makefile index 546f0783adfd..2355a29d55cc 100644 --- a/src/tools/kata-ctl/Makefile +++ b/src/tools/kata-ctl/Makefile @@ -5,6 +5,10 @@ include ../../../utils.mk +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le +endif + PROJECT_NAME = Kata Containers PROJECT_URL = https://github.com/kata-containers PROJECT_COMPONENT = kata-ctl @@ -36,7 +40,7 @@ default: $(TARGET) build $(TARGET): $(GENERATED_CODE) -build: +build: update @RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) $(if $(findstring release,$(BUILD_TYPE)),--release) $(EXTRA_RUSTFEATURES) static-checks-build: $(GENERATED_CODE) @@ -49,6 +53,9 @@ clean: @cargo clean @rm -f $(GENERATED_FILES) +update: + cargo update + vendor: cargo vendor @@ -58,7 +65,8 @@ test: $(GENERATED_CODE) install: @RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo install --locked --target $(TRIPLE) --path . --root $(INSTALL_PATH) -check: $(GENERATED_CODE) standard_rust_check +check: update + $(GENERATED_CODE) standard_rust_check .PHONY: \ build \ diff --git a/src/tools/runk/Makefile b/src/tools/runk/Makefile index cd9a24a8b178..18695567971a 100644 --- a/src/tools/runk/Makefile +++ b/src/tools/runk/Makefile @@ -10,7 +10,7 @@ include ../../../utils.mk ifeq ($(ARCH), ppc64le) override ARCH = powerpc64le - endif +endif TARGET = runk TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET) diff --git a/src/tools/trace-forwarder/Makefile b/src/tools/trace-forwarder/Makefile index 3bdd5d53a52c..5d9f718561c4 100644 --- a/src/tools/trace-forwarder/Makefile +++ b/src/tools/trace-forwarder/Makefile @@ -7,7 +7,7 @@ include ../../../utils.mk ifeq ($(ARCH), ppc64le) override ARCH = powerpc64le - endif +endif .DEFAULT_GOAL := default default: build