Skip to content

Commit d0bd5af

Browse files
add selector for macbook local compilation
1 parent 5f748ca commit d0bd5af

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

utils/build/build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,19 @@ build() {
128128
# Issues with Mac M1 arm64 arch. This patch is intended to affect Mac M1 only.
129129
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
130130

131+
echo ARCH $ARCH
132+
131133
case $ARCH in
132134
arm64|aarch64) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/arm64/v8"}";;
133135
*) DOCKER_PLATFORM_ARGS="${DOCKER_PLATFORM:-"--platform linux/amd64"}";;
134136
esac
135137

138+
case $ARCH in
139+
arm64|aarch64) PLATFORM_TAG="--platform linux/arm64/v8";;
140+
*) PLATFORM_TAG="--platform linux/amd64";;
141+
esac
142+
143+
136144
# Build images
137145
for IMAGE_NAME in $(echo $BUILD_IMAGES | sed "s/,/ /g")
138146
do
@@ -239,7 +247,7 @@ build() {
239247
esac
240248

241249
echo "Using Python version: $PYTHON_VERSION"
242-
docker run --platform linux/amd64 -v ./binaries/:/app -w /app ghcr.io/datadog/dd-trace-py/testrunner bash -c "pyenv global $PYTHON_VERSION; pip wheel --no-deps -w . /app/dd-trace-py"
250+
docker run $PLATFORM_TAG -v ./binaries/:/app -w /app ghcr.io/datadog/dd-trace-py/testrunner bash -c "pyenv global $PYTHON_VERSION; pip wheel --no-deps -w . /app/dd-trace-py"
243251
fi
244252

245253
DOCKERFILE=utils/build/docker/${TEST_LIBRARY}/${WEBLOG_VARIANT}.Dockerfile

0 commit comments

Comments
 (0)