Skip to content

Commit

Permalink
build: fix workflow details making it compatible on s390x (#602)
Browse files Browse the repository at this point in the history
* Update Makefile

Signed-off-by: root <[email protected]>

* Update install_protoc.sh

Signed-off-by: root <[email protected]>

---------

Signed-off-by: root <[email protected]>
  • Loading branch information
modassarrana89 authored Dec 2, 2024
1 parent 648c8fe commit d816da7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ gen: deps gen/grpc gen/openapi gen/openapi-server gen/converter

.PHONY: lint
lint:
${GOLANGCI_LINT} run main.go
${GOLANGCI_LINT} run cmd/... internal/... ./pkg/...
${GOLANGCI_LINT} run main.go --timeout 3m
${GOLANGCI_LINT} run cmd/... internal/... ./pkg/... --timeout 3m

.PHONY: test
test: gen bin/envtest
Expand Down Expand Up @@ -256,12 +256,12 @@ ifeq ($(DOCKER),docker)
# docker uses builder containers
- $(DOCKER) buildx rm model-registry-builder
$(DOCKER) buildx create --use --name model-registry-builder --platform=$(PLATFORMS)
$(DOCKER) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f ${DOCKERFILE} .
$(DOCKER) buildx build --push --platform=$(PLATFORMS) --tag ${IMG}:$(IMG_VERSION) -f ${DOCKERFILE} .
$(DOCKER) buildx rm model-registry-builder
else ifeq ($(DOCKER),podman)
# podman uses image manifests
$(DOCKER) manifest create -a ${IMG}
$(DOCKER) buildx build --platform=$(PLATFORMS) --manifest ${IMG} -f ${DOCKERFILE} .
$(DOCKER) buildx build --platform=$(PLATFORMS) --manifest ${IMG}:$(IMG_VERSION) -f ${DOCKERFILE} .
$(DOCKER) manifest push ${IMG}
$(DOCKER) manifest rm ${IMG}
else
Expand Down
10 changes: 7 additions & 3 deletions scripts/install_protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ if [[ ${OSTYPE,,} =~ darwin ]]; then
OS="osx"
fi

ARCH="x86_64"
if [[ $(uname -m) =~ arm ]]; then
ARCH="aarch_64"
ARCH=$(uname -m)
if [[ "$ARCH" == "arm"* ]]; then
ARCH="aarch_64"
elif [[ "$ARCH" == "s390x" ]]; then
ARCH="s390_64"
elif [[ "$ARCH" == "ppc64le" ]] ; then
ARCH="ppcle_64"
fi

PROJECT_ROOT=$(realpath "$(dirname "$0")"/..)
Expand Down

0 comments on commit d816da7

Please sign in to comment.