Skip to content

fix runner again... #20

fix runner again...

fix runner again... #20

Workflow file for this run

name: Culverin M-Series CI (Fast-Track & TSan)
on:
push:
branches: [ remote-dev ]
pull_request:
branches: [ main ]
jobs:
# JOB 1: Velocity & Unit Tests
fast_dev_check:
name: M-Series Fast-Track
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Toolchain
run: |
brew install llvm ninja
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
- name: Build & Test (Release)
uses: pypa/cibuildwheel@v3.4.0
env:
CIBW_BUILD: "cp313t-macosx_arm64"
CIBW_ENABLE: "cpython-freethreading"
CIBW_BUILD_FRONTEND: "uv"
CIBW_ENVIRONMENT_MACOS: >
CC="/opt/homebrew/opt/llvm/bin/clang"
CXX="/opt/homebrew/opt/llvm/bin/clang++"
LDFLAGS="-L/opt/homebrew/opt/llvm/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib"
CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
CMAKE_GENERATOR=Ninja
MACOSX_DEPLOYMENT_TARGET=14.0
CMAKE_ARGS="-DCMAKE_C_STANDARD=23 -DCMAKE_C_STANDARD_REQUIRED=ON -DCMAKE_BUILD_TYPE=Release -DDOUBLE_PRECISION=ON"
CIBW_TEST_REQUIRES: numpy psutil pytest pytest-xdist
CIBW_TEST_COMMAND: >
pytest -n auto -v {project}/tests/test_core.py {project}/tests/test_perf.py &&
python {project}/tests/benchmark.py --leak &&
python {project}/tests/benchmark.py --stress
# JOB 2: Safety & Race Detection
tsan_deep_scan:
name: TSan Race Detection
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Toolchain
run: |
brew install llvm ninja
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
- name: Build & Test (Sanitized)
uses: pypa/cibuildwheel@v3.4.0
env:
CIBW_BUILD: "cp313t-macosx_arm64"
CIBW_ENABLE: "cpython-freethreading"
CIBW_BUILD_FRONTEND: "uv"
CIBW_ENVIRONMENT_MACOS: >
CC="/opt/homebrew/opt/llvm/bin/clang"
CXX="/opt/homebrew/opt/llvm/bin/clang++"
LDFLAGS="-L/opt/homebrew/opt/llvm/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib -fsanitize=thread"
CPPFLAGS="-I/opt/homebrew/opt/llvm/include -fsanitize=thread"
MACOSX_DEPLOYMENT_TARGET=14.0
CMAKE_GENERATOR=Ninja
CMAKE_ARGS="-DCMAKE_C_STANDARD=23 -DENABLE_SANITIZER=OFF -DENABLE_THREAD_SANITIZER=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
CIBW_TEST_REQUIRES: numpy psutil
# We use a robust python-based discovery to find the library path inside site-packages
CIBW_TEST_COMMAND: >
TSAN_LIB_PATH=$(python -c "import os, culverin; print(os.path.join(os.path.dirname(culverin.__file__), '.dylibs', 'libclang_rt.tsan_osx_dynamic.dylib'))") &&
export DYLD_INSERT_LIBRARIES="$TSAN_LIB_PATH" &&
export TSAN_OPTIONS="second_deadlock_stack=1 halt_on_error=1" &&
python {project}/tests/benchmark.py --stress