refactor BLOCK_UNTIL_NOT_STEPPING and related macros #105
Workflow file for this run
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: Culverin Hybrid CI | |
| on: | |
| push: | |
| branches: [ remote-dev, master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| # ------------------------------------------------------------------ | |
| # JOB 1: THE RELEASE RUNNER (macOS ARM64) - This one is working! | |
| # ------------------------------------------------------------------ | |
| macos_release: | |
| name: M-Series C23 Release (Clang 22) | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: astral-sh/setup-uv@v5 | |
| - name: Build Performance Wheels | |
| uses: pypa/cibuildwheel@v3.4.0 | |
| env: | |
| CIBW_BUILD: "cp313t-macosx_arm64" | |
| CIBW_ENABLE: "cpython-freethreading" | |
| CIBW_BUILD_FRONTEND: "uv" | |
| MACOSX_DEPLOYMENT_TARGET: "13.0" | |
| CIBW_BEFORE_ALL: brew install llvm@22 | |
| CIBW_ENVIRONMENT: > | |
| CC="$(brew --prefix llvm@22)/bin/clang" | |
| CXX="$(brew --prefix llvm@22)/bin/clang++" | |
| LDFLAGS="-L$(brew --prefix llvm@22)/lib -Wl,-rpath,$(brew --prefix llvm@22)/lib" | |
| CPPFLAGS="-I$(brew --prefix llvm@22)/include" | |
| CMAKE_ARGS="-DCMAKE_C_STANDARD=23 -DCMAKE_C_STANDARD_REQUIRED=ON -DCMAKE_BUILD_TYPE=Release -DJPH_USE_MTL=OFF" | |
| CIBW_TEST_REQUIRES: numpy psutil pytest | |
| CIBW_TEST_COMMAND: "python {project}/tests/benchmark.py --stress" | |
| # ------------------------------------------------------------------ | |
| # JOB 2: THE SAFETY RUNNER (Linux x86_64) - Fixed with Ubuntu Container | |
| # ------------------------------------------------------------------ | |
| linux_tsan: | |
| name: TSan C23 Deep Scan (Clang 22) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install LLVM 22 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget lsb-release software-properties-common gnupg | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 22 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.13t" # Installs the free-threaded version natively | |
| - name: Build and Scan with TSan (Python 3.14t) | |
| env: | |
| CC: "/usr/bin/clang-22" | |
| CXX: "/usr/bin/clang++-22" | |
| CFLAGS: "-fsanitize=thread -g -O0 -fno-omit-frame-pointer" | |
| LDFLAGS: "-fsanitize=thread" | |
| CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=23 -DCMAKE_C_STANDARD_REQUIRED=ON -DENABLE_THREAD_SANITIZER=ON" | |
| run: | | |
| uv python install 3.14t | |
| uv venv --python 3.14t --clear | |
| uv pip install --python ./.venv/bin/python scikit-build-core numpy psutil pytest | |
| uv pip install --python ./.venv/bin/python -e . --no-build-isolation | |
| export TSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-22 | |
| TSAN_LIB=$(find /usr/lib/llvm-22 -name "libclang_rt.tsan-x86_64.so" | head -n 1) | |
| # Use a single env export or separate the lines properly | |
| export LD_PRELOAD=$TSAN_LIB | |
| export TSAN_OPTIONS="suppressions=${{ github.workspace }}/tsan.supp second_deadlock_stack=1 halt_on_error=1 symbolize=1" | |
| # Run benchmark first | |
| ./.venv/bin/python tests/benchmark.py --stress | |
| # Then run the actual test suite | |
| ./.venv/bin/python tests/test_core.py | |