Skip to content

Commit 0a92651

Browse files
committed
Add ABI symbol compatibility check
1 parent 32f783f commit 0a92651

3 files changed

Lines changed: 579 additions & 0 deletions

File tree

ci/static_check.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,21 @@ function exec_samplecode_checking() {
149149
fi
150150
}
151151

152+
function exec_abi_compatibility_check() {
153+
if [ "$(uname -s)" != "Linux" ]; then
154+
echo "Skip ABI compatibility check on non-Linux platform."
155+
return
156+
fi
157+
158+
python ${PADDLE_ROOT}/tools/check_abi_compatibility.py \
159+
--base-wheel "${PADDLE_ROOT}/build/dev_whl/*.whl" \
160+
--pr-wheel "${PADDLE_ROOT}/build/pr_whl/*.whl"
161+
abi_check_error=$?
162+
if [ "$abi_check_error" != "0" ]; then
163+
exit $abi_check_error
164+
fi
165+
}
166+
152167
export PATH=/usr/local/python3.10.0/bin:/usr/local/python3.10.0/include:/usr/local/bin:${PATH}
153168
echo "export PATH=${PATH}" >> ~/.bashrc
154169
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/compat:$LD_LIBRARY_PATH
@@ -158,6 +173,8 @@ ln -sf $(which python${PY_VERSION}) /usr/bin/python
158173
ln -sf $(which pip${PY_VERSION}) /usr/local/bin/pip
159174
mkdir -p /home/data/cfs/.ccache/static-check
160175

176+
exec_abi_compatibility_check
177+
161178
pip config set global.cache-dir "/home/data/cfs/.cache/pip"
162179
pip install --upgrade pip 1>nul
163180
pip install -r "${work_dir}/python/requirements.txt" 1>nul

0 commit comments

Comments
 (0)