forked from headroomlabs-ai/headroom
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (101 loc) · 4.63 KB
/
Copy pathdevcontainers.yml
File metadata and controls
119 lines (101 loc) · 4.63 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Dev Containers
on:
push:
branches: [main]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainers.yml"
- "pyproject.toml"
- "uv.lock"
pull_request:
branches: [main]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainers.yml"
- "pyproject.toml"
- "uv.lock"
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: default
config: .devcontainer/devcontainer.json
- name: memory-stack
config: .devcontainer/memory-stack/devcontainer.json
steps:
- uses: actions/checkout@v7
# Both variants exhaust the GitHub runner's disk, so free space up front
# on every variant. memory-stack brings up Neo4j + Postgres + Redis +
# Qdrant (PR #495: the diagnostic log writer hit "No space left on device"
# mid-smoke-test). The default variant's post-create `uv sync` fills the
# disk installing the ML wheel set — it failed copying numpy into the venv
# with "No space left on device" (os error 28). Previously this ran only
# on memory-stack, which left the default variant with no cushion.
#
# Reclaim ~14 GB by stripping preinstalled tools none of the devcontainer
# paths use (Android SDK, .NET, Haskell).
- name: Free runner disk
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: false
swap-storage: false
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "20"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install Dev Container CLI
run: npm install -g @devcontainers/cli@0.85.0
- name: Start ${{ matrix.name }}
run: devcontainer up --workspace-folder . --config ${{ matrix.config }} --remove-existing-container
- name: Smoke test ${{ matrix.name }}
shell: bash
run: |
if [[ "${{ matrix.name }}" == "memory-stack" ]]; then
devcontainer exec --workspace-folder . --config ${{ matrix.config }} bash -lc 'git rev-parse --show-toplevel >/dev/null && uv --version && node --version && gh --version >/dev/null && uv run python -c "import socket; socket.create_connection((\"qdrant\", 6333), 5).close(); socket.create_connection((\"neo4j\", 7687), 5).close(); from mem0 import Memory; from qdrant_client import QdrantClient; import neo4j; import headroom; print(\"memory-stack smoke test passed\")"'
else
devcontainer exec --workspace-folder . --config ${{ matrix.config }} bash -lc 'git rev-parse --show-toplevel >/dev/null && uv --version && node --version && gh --version >/dev/null && uv run python -c "import headroom; print(\"default smoke test passed\")"'
fi
validate-worktree:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# The worktree devcontainer runs the same `uv sync --extra dev` build as
# the default validate job, which now pulls transformers 5.x. Copying that
# into the venv volume exhausts the GitHub runner's disk ("No space left on
# device", see PR #495). Reclaim ~14 GB by stripping preinstalled tools the
# build never touches — mirrors the memory-stack job's existing remedy.
- name: Free runner disk
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: false
swap-storage: false
- name: Create linked worktree
run: git worktree add "$RUNNER_TEMP/headroom-worktree" HEAD
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "20"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install Dev Container CLI
run: npm install -g @devcontainers/cli@0.85.0
- name: Start linked worktree devcontainer
run: devcontainer up --workspace-folder "$RUNNER_TEMP/headroom-worktree" --config "$RUNNER_TEMP/headroom-worktree/.devcontainer/devcontainer.json" --remove-existing-container
- name: Smoke test linked worktree
run: devcontainer exec --workspace-folder "$RUNNER_TEMP/headroom-worktree" --config "$RUNNER_TEMP/headroom-worktree/.devcontainer/devcontainer.json" bash -lc 'git rev-parse --show-toplevel && uv run python -c "import headroom; print(\"worktree smoke test passed\")"'