Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
647074c
feat(ci): add macOS CI runners for mypy + tests (DIM-696)
spomichter Mar 7, 2026
f4419a0
feat(ci): add macOS CI workflow for mypy + tests (DIM-696)
spomichter Mar 7, 2026
f52fb05
Fix macOS CI: Add missing dependency groups and handle psutil compati…
spomichter Mar 7, 2026
4f9b7e9
fix(ci): add perception/misc/unitree/base extras for macOS
spomichter Mar 7, 2026
4fbadd1
fix(ci): install portaudio for pyaudio on macOS
spomichter Mar 7, 2026
76c5298
fix(ci): use macOS install docs for brew deps + all-extras
spomichter Mar 7, 2026
858994b
fix(ci): exclude cuda extra from macOS builds
spomichter Mar 7, 2026
9b13e72
fix(ci): add 30min timeout + skip slow tests on macOS
spomichter Mar 7, 2026
98ab595
revert: remove stats.py change, keep only macos.yml
spomichter Mar 7, 2026
cbd1b95
fix(resource_monitor): Add cross-platform compatibility for io_counte…
spomichter Mar 7, 2026
993d2fb
fix(ci): scope macOS tests to core/ + utils/, add LCM networking
spomichter Mar 7, 2026
99aae7f
fix: macOS compatibility for CI - handle missing io_counters() and re…
spomichter Mar 7, 2026
f0440a8
fix(ci): improve macOS LCM networking configuration
spomichter Mar 7, 2026
35a00df
fix: remove invalid ifconfig multicast command on macOS
spomichter Mar 7, 2026
01ed4f3
fix(ci): clean up macOS workflow, revert cron bot source changes
spomichter Mar 7, 2026
ad0d2db
fix(ci): maxsockbuf=6291456 (macOS cap) + type: ignore io_counters
spomichter Mar 7, 2026
753efe3
fix(ci): skip LCM-dependent tests on macOS runners
spomichter Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: macos

on:
push:
branches:
- main
- dev
paths-ignore:
- '**.md'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- 'docker/**'
- '.github/workflows/docker.yml'
- '.github/workflows/_docker-build-template.yml'

permissions:
contents: read

jobs:
check-changes:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.python }}
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
python:
- 'dimos/**'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/macos.yml'

macos-tests:
needs: [check-changes]
if: needs.check-changes.outputs.should-run == 'true'
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
lfs: false

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install system dependencies
run: brew install gnu-sed gcc portaudio git-lfs libjpeg-turbo

- name: Install dependencies
run: |
uv sync --all-extras --no-extra dds --no-extra cuda --frozen

- name: Check disk usage
run: |
df -h .
du -sh .venv/ || true

- name: Configure LCM networking
run: |
# Same as dimos autoconf for macOS (skipped when CI=1)
sudo route add -net 224.0.0.0/4 -interface lo0 || true
sudo sysctl -w kern.ipc.maxsockbuf=6291456
sudo sysctl -w net.inet.udp.recvspace=2097152
sudo sysctl -w net.inet.udp.maxdgram=65535

- name: Run tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
LCM_DEFAULT_URL: "udpm://127.0.0.1:7667?ttl=0"
CI: "1"
run: |
source .venv/bin/activate
python -m pytest --durations=10 -m 'not (tool or slow or mujoco)' --timeout=120 -k 'not (test_transports or test_classmethods or test_process_crash or test_foxglove_bridge or test_moment_seek or test_lcmspy or test_graph_lcmspy)' dimos/core/ dimos/utils/

- name: Check disk usage (post-test)
if: always()
run: df -h .

macos-mypy:
needs: [check-changes]
if: needs.check-changes.outputs.should-run == 'true'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
lfs: false

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install system dependencies
run: brew install gnu-sed gcc portaudio git-lfs libjpeg-turbo

- name: Install dependencies
run: |
uv sync --all-extras --no-extra dds --no-extra cuda --frozen

- name: Run mypy
run: |
source .venv/bin/activate
mypy dimos
2 changes: 1 addition & 1 deletion dimos/core/resource_monitor/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class IoStats(TypedDict):
def _collect_io(proc: psutil.Process) -> IoStats:
"""Collect IO counters in bytes. Call inside oneshot()."""
try:
io = proc.io_counters()
io = proc.io_counters() # type: ignore[attr-defined] # not available on macOS
return IoStats(io_read_bytes=io.read_bytes, io_write_bytes=io.write_bytes)
except (psutil.AccessDenied, AttributeError):
return IoStats(io_read_bytes=0, io_write_bytes=0)
Expand Down
Loading