fix(ci): use OpenMP library from torch to avoid conflicts

read: https://discuss.python.org/t/conflicting-binary-extensions-in-different-packages/25332/8
This commit is contained in:
youben11
2023-03-31 17:56:28 +01:00
committed by Quentin Bourgerie
parent 4a2f552a08
commit e77c87993d

View File

@@ -110,7 +110,14 @@ jobs:
pip install $GITHUB_WORKSPACE/frontends/concrete-python/dist/*macos*.whl
pip install -r $GITHUB_WORKSPACE/frontends/concrete-python/requirements.dev.txt
# MacOS x86 have conflict between our OpenMP library, and one from torch
# we fix it by using a single one (from torch)
# see discussion: https://discuss.python.org/t/conflicting-binary-extensions-in-different-packages/25332/8
ls $(pwd)/.testenv/lib/python3.10/site-packages/torch/.dylibs/libiomp5.dylib \
&& rm .testenv/lib/python3.10/site-packages/concrete/.dylibs/libomp.dylib \
&& ln -s $(pwd)/.testenv/lib/python3.10/site-packages/torch/.dylibs/libiomp5.dylib .testenv/lib/python3.10/site-packages/concrete/.dylibs/libomp.dylib
cp -R $GITHUB_WORKSPACE/frontends/concrete-python/tests ./tests
pytest tests -svv -n auto --key-cache "/tmp/KeySetCache" -m "not dataflow"