Skip to content

Commit adb3476

Browse files
committed
Makefile: Don't always build kolet for all architectures
The reason we build kolet for other architectures is so that we can mix architectures with test initiators and test runners. i.e. i.e. x86_64 kola running in the pipeline testing against an aarch64 EC2 instance. This use case isn't too common so let's just not build kolet for all the different architectures on every architecture. We'll special case for x86_64 here and let it build for them all, but for the rest we just build for the architecture that the container build is for.
1 parent ef3d56e commit adb3476

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ PYIGNORE ?= E128,E241,E402,E501,E722,W503,W504
1212
.PHONY: all check shellcheck flake8 pycheck unittest clean mantle mantle-check install
1313

1414
MANTLE_BINARIES := ore kola plume
15-
KOLET_ARCHES := aarch64 ppc64le s390x x86_64
15+
# Typically just build kolet for the architecture we are on.
16+
export KOLET_ARCHES:=$(shell uname -m)
1617

1718
all: bin/coreos-assembler mantle
1819

@@ -26,9 +27,14 @@ cwd_checked:=$(patsubst ./%,.%.shellchecked,${cwd})
2627
GOARCH:=$(shell uname -m)
2728
export COSA_META_SCHEMA:=$(shell pwd)/src/v1.json
2829
ifeq ($(GOARCH),x86_64)
29-
GOARCH="amd64"
30+
GOARCH="amd64"
31+
# On x86_64 only we'll build kolet for all the other architectures.
32+
# This is mainly so we can initiate tests against a remote that is
33+
# a different architecture. i.e. x86_64 kola testing against an
34+
# aarch64 EC2 instance.
35+
export KOLET_ARCHES := aarch64 ppc64le s390x x86_64
3036
else ifeq ($(GOARCH),aarch64)
31-
GOARCH="arm64"
37+
GOARCH="arm64"
3238
endif
3339

3440
bin/coreos-assembler:

mantle/build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ if [[ $# -eq 0 ]]; then
1111
fi
1212

1313
declare -A BASEARCH_TO_GOARCH=([s390x]=s390x [x86_64]=amd64 [aarch64]=arm64 [ppc64le]=ppc64le)
14-
KOLET_ARCHES="${KOLET_ARCHES:-s390x x86_64 aarch64 ppc64le}"
14+
ARCH=$(arch)
15+
KOLET_ARCHES="${KOLET_ARCHES:-${ARCH}}"
1516

1617
race=
1718
if [ -n "${ENABLE_GO_RACE_DETECTOR:-}" ] && [[ ! "$(uname -m)" =~ "s390" ]]; then

0 commit comments

Comments
 (0)