-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 3.24 KB
/
Copy pathdev.yml
File metadata and controls
91 lines (79 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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