debug: py3.13 GHA build-with-clang segfault #202
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build project with IntelLLVM clang compiler | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| permissions: read-all | |
| jobs: | |
| build-with-clang: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| numpy_version: ["numpy'>=2'"] | |
| env: | |
| ONEAPI_ROOT: /opt/intel/oneapi | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Add Intel repository | |
| run: | | |
| wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
| sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
| rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | |
| sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | |
| sudo apt-get update | |
| - name: Install Intel OneAPI | |
| run: | | |
| sudo apt-get install intel-oneapi-compiler-dpcpp-cpp | |
| sudo apt-get install intel-oneapi-tbb | |
| sudo apt-get install intel-oneapi-mkl-devel | |
| - name: Setup Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: x64 | |
| - name: Checkout repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install mkl_umath dependencies | |
| run: | | |
| pip install scikit-build cmake ninja cython setuptools">=77" | |
| pip install ${{ matrix.numpy_version }} | |
| - name: List oneAPI folder content | |
| run: ls ${{ env.ONEAPI_ROOT }}/compiler | |
| # - name: Install gdb | |
| # run: | | |
| # sudo apt-get update --fix-missing | |
| # sudo apt-get install -y gdb | |
| - name: Build mkl_umath | |
| run: | | |
| source ${{ env.ONEAPI_ROOT }}/setvars.sh | |
| echo $CMPLR_ROOT | |
| export CC=$CMPLR_ROOT/bin/icx | |
| export CFLAGS="-O1 -g -fno-fast-math -fno-omit-frame-pointer -fsanitize=address" | |
| export CXXFLAGS="$CFLAGS" | |
| export LDFLAGS="-fsanitize=address -shared-libsan" | |
| pip install . --no-build-isolation --no-deps --verbose | |
| # - name: Run tests under gdb | |
| # run: | | |
| # source ${{ env.ONEAPI_ROOT }}/setvars.sh | |
| # pip install pytest | |
| # setarch $(uname -m) -R gdb --batch -ex r -ex 'info sharedlibrary' -ex 'set print elements 1000' -ex bt --args python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true | |
| # - name: run tests under valgrind | |
| # run: | | |
| # sudo apt-get install -y valgrind | |
| # source ${{ env.ONEAPI_ROOT }}/setvars.sh | |
| # pip install pytest | |
| # valgrind --error-exitcode=99 python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true | |
| # - name: Enable local core dumps (Python 3.13 only) | |
| # run: | | |
| # sudo sysctl -w kernel.core_uses_pid=1 | |
| # sudo bash -c 'echo core > /proc/sys/kernel/core_pattern' | |
| # ulimit -c unlimited | |
| # cat /proc/sys/kernel/core_pattern | |
| - name: Run mkl_umath tests | |
| run: | | |
| source ${{ env.ONEAPI_ROOT }}/setvars.sh | |
| pip install pytest | |
| cd .. | |
| python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests |