Skip to content

Commit f4419a0

Browse files
committed
feat(ci): add macOS CI workflow for mypy + tests (DIM-696)
Separate macos.yml workflow (not in docker.yml) so macOS-only pushes don't trigger the full Docker/navigation pipeline. - macos-tests: pytest on Apple Silicon (macos-latest, M1 arm64) - macos-mypy: mypy type checking on macOS - Explicit extras: dev, agents, web, visualization, sim, manipulation, drone, psql (no torch/cuda/unitree/dds) - uv cache enabled for faster repeat installs - paths-ignore: markdown, docker files - Change filter: only runs when dimos/*, pyproject.toml, uv.lock, or the workflow file itself changes
1 parent 647074c commit f4419a0

2 files changed

Lines changed: 104 additions & 78 deletions

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
dev-image: ros-dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true' || needs.check-changes.outputs.ros == 'true') && needs.ros-dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
237237

238238
ci-complete:
239-
needs: [check-changes, ros, python, ros-python, dev, ros-dev, run-tests, run-mypy, macos-tests, macos-mypy]
239+
needs: [check-changes, ros, python, ros-python, dev, ros-dev, run-tests, run-mypy]
240240
runs-on: [self-hosted, Linux]
241241
if: always()
242242
steps:
@@ -247,80 +247,3 @@ jobs:
247247
exit 1
248248
- name: CI passed
249249
run: echo "✅ All CI checks passed or were intentionally skipped"
250-
251-
# ---------------------------------------------------------------------------
252-
# macOS CI (no Docker — bare metal Apple Silicon)
253-
# ---------------------------------------------------------------------------
254-
255-
macos-tests:
256-
needs: [check-changes]
257-
if: ${{
258-
always() &&
259-
needs.check-changes.result == 'success' &&
260-
(needs.check-changes.outputs.tests == 'true' ||
261-
needs.check-changes.outputs.python == 'true')
262-
}}
263-
runs-on: macos-latest
264-
steps:
265-
- uses: actions/checkout@v4
266-
with:
267-
lfs: false
268-
269-
- name: Install uv
270-
uses: astral-sh/setup-uv@v6
271-
272-
- name: Set up Python
273-
run: uv python install 3.12
274-
275-
- name: Install dependencies
276-
run: |
277-
uv sync --all-extras --no-extra cuda --no-extra cpu --no-extra dds --no-extra unitree --frozen
278-
279-
- name: Check disk usage
280-
run: |
281-
df -h .
282-
du -sh .venv/ || true
283-
284-
- name: Run tests
285-
env:
286-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
287-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
288-
ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
289-
CI: "1"
290-
run: |
291-
source .venv/bin/activate
292-
coverage run -m pytest --durations=10 -m 'not (tool or mujoco)'
293-
coverage report
294-
295-
- name: Check disk usage (post-test)
296-
if: always()
297-
run: df -h .
298-
299-
macos-mypy:
300-
needs: [check-changes]
301-
if: ${{
302-
always() &&
303-
needs.check-changes.result == 'success' &&
304-
(needs.check-changes.outputs.tests == 'true' ||
305-
needs.check-changes.outputs.python == 'true')
306-
}}
307-
runs-on: macos-latest
308-
steps:
309-
- uses: actions/checkout@v4
310-
with:
311-
lfs: false
312-
313-
- name: Install uv
314-
uses: astral-sh/setup-uv@v6
315-
316-
- name: Set up Python
317-
run: uv python install 3.12
318-
319-
- name: Install dependencies
320-
run: |
321-
uv sync --all-extras --no-extra cuda --no-extra cpu --no-extra dds --no-extra unitree --frozen
322-
323-
- name: Run mypy
324-
run: |
325-
source .venv/bin/activate
326-
mypy dimos

.github/workflows/macos.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: macos
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
paths-ignore:
9+
- '**.md'
10+
pull_request:
11+
types: [opened, synchronize, reopened, ready_for_review]
12+
paths-ignore:
13+
- '**.md'
14+
- 'docker/**'
15+
- '.github/workflows/docker.yml'
16+
- '.github/workflows/_docker-build-template.yml'
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
check-changes:
23+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
24+
runs-on: ubuntu-latest
25+
outputs:
26+
should-run: ${{ steps.filter.outputs.python }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- id: filter
30+
uses: dorny/paths-filter@v3
31+
with:
32+
filters: |
33+
python:
34+
- 'dimos/**'
35+
- 'pyproject.toml'
36+
- 'uv.lock'
37+
- '.github/workflows/macos.yml'
38+
39+
macos-tests:
40+
needs: [check-changes]
41+
if: needs.check-changes.outputs.should-run == 'true'
42+
runs-on: macos-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
with:
46+
lfs: false
47+
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@v6
50+
with:
51+
enable-cache: true
52+
53+
- name: Set up Python
54+
run: uv python install 3.12
55+
56+
- name: Install dependencies
57+
run: |
58+
uv sync --extra dev --extra agents --extra web --extra visualization --extra sim --extra manipulation --extra drone --extra psql --frozen
59+
60+
- name: Check disk usage
61+
run: |
62+
df -h .
63+
du -sh .venv/ || true
64+
65+
- name: Run tests
66+
env:
67+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
68+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
69+
ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
70+
CI: "1"
71+
run: |
72+
source .venv/bin/activate
73+
python -m pytest --durations=10 -m 'not (tool or mujoco)'
74+
75+
- name: Check disk usage (post-test)
76+
if: always()
77+
run: df -h .
78+
79+
macos-mypy:
80+
needs: [check-changes]
81+
if: needs.check-changes.outputs.should-run == 'true'
82+
runs-on: macos-latest
83+
steps:
84+
- uses: actions/checkout@v4
85+
with:
86+
lfs: false
87+
88+
- name: Install uv
89+
uses: astral-sh/setup-uv@v6
90+
with:
91+
enable-cache: true
92+
93+
- name: Set up Python
94+
run: uv python install 3.12
95+
96+
- name: Install dependencies
97+
run: |
98+
uv sync --extra dev --extra agents --extra web --extra visualization --extra sim --extra manipulation --extra drone --extra psql --frozen
99+
100+
- name: Run mypy
101+
run: |
102+
source .venv/bin/activate
103+
mypy dimos

0 commit comments

Comments
 (0)