File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ lint python:
6767 image: registry.ddbuild.io /images/mirror/python:{{ $runtime .image }}
6868 cache: &{{ $runtime .name }}-{{ $runtime .arch }}-cache
6969 before_script:
70- - PYTHON_VERSION= {{ $runtime .python_version }} . /scripts/setup_python_env.sh
70+ - PYTHON_VERSION= {{ $runtime .python_version }} ARCH = {{ $runtime .arch }} . /scripts/setup_python_env.sh
7171 script:
7272 - source venv/bin/activate
7373 - . /scripts/check_format.sh
@@ -85,7 +85,7 @@ unit-test ({{ $runtime.name }}-{{ $runtime.arch }}):
8585 PYTHONFAULTHANDLER: " 1"
8686 cache: &{{ $runtime .name }}-{{ $runtime .arch }}-cache
8787 before_script:
88- - PYTHON_VERSION= {{ $runtime .python_version }} . /scripts/setup_python_env.sh
88+ - PYTHON_VERSION= {{ $runtime .python_version }} ARCH = {{ $runtime .arch }} . /scripts/setup_python_env.sh
8989 script:
9090 - source venv/bin/activate
9191 - pytest -vv
Original file line number Diff line number Diff line change @@ -70,7 +70,15 @@ spec_ddtrace_dep() {
7070 fi
7171 S3_BASE=" https://dd-trace-py-builds.s3.amazonaws.com/${UPSTREAM_PIPELINE_ID} "
7272 PY_TAG=" cp$( echo " $PYTHON_VERSION " | tr -d ' .' ) "
73- if [ " ${ARCH:- amd64} " = " amd64" ]; then
73+ # Wheel platform tag must match the machine that runs pip (or CI matrix arch).
74+ # Default used to be amd64 when unset; prefer host arch so ARM runners/local dev work.
75+ if [ -z " ${ARCH:- } " ]; then
76+ case " $( uname -m) " in
77+ aarch64 | arm64) ARCH=arm64 ;;
78+ * ) ARCH=amd64 ;;
79+ esac
80+ fi
81+ if [ " $ARCH " = " amd64" ]; then
7482 PLATFORM=" manylinux2014_x86_64"
7583 else
7684 PLATFORM=" manylinux2014_aarch64"
Original file line number Diff line number Diff line change 3939# Environment variables:
4040# PYTHON_VERSION Python minor version (e.g. 3.12 or just 12). Required
4141# when the UPSTREAM_PIPELINE_ID branch is taken.
42+ # ARCH "amd64" or "arm64". Required for correct ddtrace wheel
43+ # selection when UPSTREAM_PIPELINE_ID is set (GitLab matrix
44+ # should pass the runtime arch; if unset, host arch is used).
4245
4346set -e
4447
You can’t perform that action at this time.
0 commit comments