@@ -83,52 +83,15 @@ jobs:
8383 fail-fast : false
8484 matrix :
8585 include : ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
86- env :
87- SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE : ${{ needs.compute_version.outputs.library_version }}
88- CIBW_SKIP : ${{ inputs.cibw_skip }}
89- CIBW_PRERELEASE_PYTHONS : ${{ inputs.cibw_prerelease_pythons }}
90- CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
91- CIBW_MANYLINUX_AARCH64_IMAGE : manylinux2014
92- CIBW_MUSLLINUX_I686_IMAGE : ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
93- CIBW_BEFORE_ALL_WINDOWS : ${{ matrix.os == 'windows-latest' && 'rustup target add i686-pc-windows-msvc' || (matrix.os == 'windows-11-arm' && 'rustup target add aarch64-pc-windows-msvc') }}
94- CIBW_BEFORE_ALL_MACOS : rustup target add aarch64-apple-darwin
95- CIBW_BEFORE_ALL_LINUX : |
96- 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
97- curl -sSf https://sh.rustup.rs | sh -s -- -y;
98- fi
99- CIBW_ENVIRONMENT_LINUX : PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF" SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
100- # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
101- # `platform.mac_ver()` reports incorrect MacOS version at 11.0
102- # See: https://stackoverflow.com/a/65402241
103- CIBW_ENVIRONMENT_MACOS : CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF" SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
104- CIBW_ENVIRONMENT_WINDOWS : SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
105- # cibuildwheel repair will copy anything's under /output directory from the
106- # build container to the host machine. This is a bit hacky way, but seems
107- # to be the only way getting debug symbols out from the container while
108- # we don't mess up with RECORD file.
109- CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
110- mkdir -p /output/debugwheelhouse &&
111- python scripts/extract_debug_symbols.py {wheel} --output-dir /output/debugwheelhouse &&
112- python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
113- mkdir ./tempwheelhouse &&
114- unzip -l {wheel} | grep '\.so' &&
115- auditwheel repair -w ./tempwheelhouse {wheel} &&
116- mv ./tempwheelhouse/*.whl {dest_dir} &&
117- rm -rf ./tempwheelhouse
118- CIBW_REPAIR_WHEEL_COMMAND_MACOS : |
119- mkdir -p ./debugwheelhouse &&
120- python scripts/extract_debug_symbols.py {wheel} --output-dir ./debugwheelhouse &&
121- python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
122- MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
123- CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
124- CIBW_TEST_COMMAND : " python {project}/tests/smoke_test.py"
125-
12686 steps :
12787 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12888 with :
12989 persist-credentials : false
13090 fetch-depth : 0
13191
92+ - name : Enable sccache
93+ uses : mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
94+
13295 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
13396 name : Install Python
13497 with :
@@ -144,7 +107,61 @@ jobs:
144107 uses : pypa/cibuildwheel@c923d83ad9c1bc00211c5041d0c3f73294ff88f6 # v3.1.4
145108 with :
146109 only : ${{ matrix.only }}
147-
110+ env :
111+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE : ${{ needs.compute_version.outputs.library_version }}
112+ CIBW_SKIP : ${{ inputs.cibw_skip }}
113+ CIBW_PRERELEASE_PYTHONS : ${{ inputs.cibw_prerelease_pythons }}
114+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
115+ CIBW_MANYLINUX_AARCH64_IMAGE : manylinux2014
116+ CIBW_MUSLLINUX_I686_IMAGE : ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
117+ CIBW_BEFORE_ALL_WINDOWS : ${{ matrix.os == 'windows-latest' && 'rustup target add i686-pc-windows-msvc' || (matrix.os == 'windows-11-arm' && 'rustup target add aarch64-pc-windows-msvc') }}
118+ CIBW_BEFORE_ALL_MACOS : rustup target add aarch64-apple-darwin
119+ CIBW_BEFORE_ALL_LINUX : |
120+ 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
121+ curl -sSf https://sh.rustup.rs | sh -s -- -y;
122+ fi
123+ CIBW_ENVIRONMENT_LINUX : >
124+ PATH=$HOME/.cargo/bin:$PATH
125+ CARGO_BUILD_JOBS=24
126+ CMAKE_BUILD_PARALLEL_LEVEL=24
127+ CMAKE_ARGS="-DNATIVE_TESTING=OFF"
128+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
129+ SCCACHE_GHA_ENABLED=true
130+ SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
131+ SCCACHE_PATH=/host/${{ env.SCCACHE_PATH }}
132+ SCCACHE_CACHE_SIZE=1G
133+ DD_USE_SCCACHE=1
134+ # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
135+ # `platform.mac_ver()` reports incorrect MacOS version at 11.0
136+ # See: https://stackoverflow.com/a/65402241
137+ CIBW_ENVIRONMENT_MACOS : >
138+ CMAKE_BUILD_PARALLEL_LEVEL=24
139+ SYSTEM_VERSION_COMPAT=0
140+ CMAKE_ARGS="-DNATIVE_TESTING=OFF"
141+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
142+ CIBW_ENVIRONMENT_WINDOWS : >
143+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
144+ # cibuildwheel repair will copy anything's under /output directory from the
145+ # build container to the host machine. This is a bit hacky way, but seems
146+ # to be the only way getting debug symbols out from the container while
147+ # we don't mess up with RECORD file.
148+ CIBW_REPAIR_WHEEL_COMMAND_LINUX : |
149+ mkdir -p /output/debugwheelhouse &&
150+ python scripts/extract_debug_symbols.py {wheel} --output-dir /output/debugwheelhouse &&
151+ python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
152+ mkdir ./tempwheelhouse &&
153+ unzip -l {wheel} | grep '\.so' &&
154+ auditwheel repair -w ./tempwheelhouse {wheel} &&
155+ mv ./tempwheelhouse/*.whl {dest_dir} &&
156+ rm -rf ./tempwheelhouse
157+ CIBW_REPAIR_WHEEL_COMMAND_MACOS : |
158+ mkdir -p ./debugwheelhouse &&
159+ python scripts/extract_debug_symbols.py {wheel} --output-dir ./debugwheelhouse &&
160+ python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
161+ MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
162+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
163+ CIBW_BEFORE_TEST_LINUX : /host/${{ env.SCCACHE_PATH }} --show-stats
164+ CIBW_TEST_COMMAND : " python {project}/tests/smoke_test.py"
148165 - name : Validate wheel RECORD files
149166 shell : bash
150167 run : |
0 commit comments