2424 persist-credentials : false
2525 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2626 with :
27- python-version : ' 3.8 '
28- - run : pip install cibuildwheel==2.22.0
27+ python-version : " 3.13 "
28+ - run : pip install cibuildwheel==2.23.3
2929 - id : set-matrix
3030 env :
3131 CIBW_BUILD : ${{ inputs.cibw_build }}
@@ -50,102 +50,68 @@ jobs:
5050 fail-fast : false
5151 matrix :
5252 include : ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
53+ env :
54+ CIBW_SKIP : ${{ inputs.cibw_skip }}
55+ CIBW_PRERELEASE_PYTHONS : ${{ inputs.cibw_prerelease_pythons }}
56+ CIBW_MUSLLINUX_I686_IMAGE : ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
57+ CIBW_BEFORE_ALL_WINDOWS : rustup target add i686-pc-windows-msvc
58+ CIBW_BEFORE_ALL_MACOS : rustup target add aarch64-apple-darwin
59+ CIBW_BEFORE_ALL_LINUX : |
60+ if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]]; then
61+ if command -v yum &> /dev/null; then
62+ yum install -y libatomic.i686
63+ fi
64+ curl -sSf https://sh.rustup.rs | sh -s -- -y;
65+ fi
66+ CIBW_ENVIRONMENT_LINUX : PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
67+ # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
68+ # `platform.mac_ver()` reports incorrect MacOS version at 11.0
69+ # See: https://stackoverflow.com/a/65402241
70+ CIBW_ENVIRONMENT_MACOS : CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
71+ CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
72+ python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
73+ mkdir ./tempwheelhouse &&
74+ unzip -l {wheel} | grep '\.so' &&
75+ auditwheel repair -w ./tempwheelhouse {wheel} &&
76+ mv ./tempwheelhouse/*.whl {dest_dir} &&
77+ rm -rf ./tempwheelhouse
78+ CIBW_REPAIR_WHEEL_COMMAND_MACOS : |
79+ python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
80+ MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
81+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
82+ CIBW_TEST_COMMAND : " python {project}/tests/smoke_test.py"
5383
5484 steps :
5585 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56- # Include all history and tags
5786 with :
5887 persist-credentials : false
5988 fetch-depth : 0
6089
6190 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
62- if : matrix.os != 'ubuntu-24.04-arm'
6391 name : Install Python
6492 with :
65- python-version : ' 3.8 '
93+ python-version : " 3.13 "
6694
6795 - name : Set up QEMU
6896 if : runner.os == 'Linux' && matrix.os != 'ubuntu-24.04-arm'
6997 uses : docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
7098 with :
7199 platforms : all
72100
73- - name : Build wheels arm64
74- if : always() && matrix.os == 'ubuntu-24.04-arm'
75- run : pipx run cibuildwheel==2.22.0 --only ${{ matrix.only }}
76- env :
77- CIBW_SKIP : ${{ inputs.cibw_skip }}
78- CIBW_PRERELEASE_PYTHONS : ${{ inputs.cibw_prerelease_pythons }}
79- CIBW_MUSLLINUX_I686_IMAGE : ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
80- CIBW_BEFORE_ALL : >
81- if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]];
82- then
83- curl -sSf https://sh.rustup.rs | sh -s -- -y;
84- fi
85- CIBW_BEFORE_ALL_WINDOWS : rustup target add i686-pc-windows-msvc
86- CIBW_BEFORE_ALL_MACOS : rustup target add aarch64-apple-darwin
87- CIBW_ENVIRONMENT_LINUX : PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
88- CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
89- mkdir ./tempwheelhouse &&
90- unzip -l {wheel} | grep '\.so' &&
91- auditwheel repair -w ./tempwheelhouse {wheel} &&
92- for w in ./tempwheelhouse/*.whl; do
93- python scripts/zip_filter.py $w \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md
94- mv $w {dest_dir}
95- done &&
96- rm -rf ./tempwheelhouse
97- CIBW_REPAIR_WHEEL_COMMAND_MACOS : |
98- zip -d {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
99- MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
100- CIBW_REPAIR_WHEEL_COMMAND_WINDOWS :
101- choco install -y 7zip &&
102- 7z d -r "{wheel}" *.c *.cpp *.cc *.h *.hpp *.pyx *.md &&
103- move "{wheel}" "{dest_dir}"
104- CIBW_TEST_COMMAND : " python {project}/tests/smoke_test.py"
105- # DEV: Uncomment to debug MacOS
106- # CIBW_BUILD_VERBOSITY_MACOS: 3
107-
108101 - name : Build wheels
109- if : always() && matrix.os != 'ubuntu-24.04-arm'
110102 uses : pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3
111103 with :
112104 only : ${{ matrix.only }}
113- env :
114- CIBW_SKIP : ${{ inputs.cibw_skip }}
115- CIBW_PRERELEASE_PYTHONS : ${{ inputs.cibw_prerelease_pythons }}
116- CIBW_MUSLLINUX_I686_IMAGE : ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
117- CIBW_BEFORE_ALL : >
118- if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]];
119- then
120- yum install -y libatomic.i686
121- curl -sSf https://sh.rustup.rs | sh -s -- -y;
105+
106+ - name : Validate wheel RECORD files
107+ shell : bash
108+ run : |
109+ for wheel in ./wheelhouse/*.whl; do
110+ if [ -f "$wheel" ]; then
111+ echo "Validating $(basename $wheel)..."
112+ python scripts/validate_wheel.py "$wheel"
122113 fi
123- CIBW_BEFORE_ALL_WINDOWS : rustup target add i686-pc-windows-msvc
124- CIBW_BEFORE_ALL_MACOS : rustup target add aarch64-apple-darwin
125- CIBW_ENVIRONMENT_LINUX : PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
126- # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
127- # `platform.mac_ver()` reports incorrect MacOS version at 11.0
128- # See: https://stackoverflow.com/a/65402241
129- CIBW_ENVIRONMENT_MACOS : CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
130- CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
131- mkdir ./tempwheelhouse &&
132- unzip -l {wheel} | grep '\.so' &&
133- auditwheel repair -w ./tempwheelhouse {wheel} &&
134- for w in ./tempwheelhouse/*.whl; do
135- python scripts/zip_filter.py $w \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md
136- mv $w {dest_dir}
137- done &&
138- rm -rf ./tempwheelhouse
139- CIBW_REPAIR_WHEEL_COMMAND_MACOS : |
140- zip -d {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
141- MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
142- CIBW_REPAIR_WHEEL_COMMAND_WINDOWS :
143- choco install -y 7zip &&
144- 7z d -r "{wheel}" *.c *.cpp *.cc *.h *.hpp *.pyx *.md &&
145- move "{wheel}" "{dest_dir}"
146- CIBW_TEST_COMMAND : " python {project}/tests/smoke_test.py"
147- # DEV: Uncomment to debug MacOS
148- # CIBW_BUILD_VERBOSITY_MACOS: 3
114+ done
149115
150116 - if : runner.os != 'Windows'
151117 run : |
0 commit comments