Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
GIT_AUTHOR_NAME="Your Name"
GIT_AUTHOR_EMAIL="your@email.com"
GIT_COMMITTER_NAME="Your Name"
GIT_COMMITTER_EMAIL="your@email.com"
OPENAI_API_KEY=xxxxx
GEMINI_API_KEY=xxxxx

DEVCELL_GUI_ENABLED=false
DEVCELL_KICAD_ENABLED=false
DEVCELL_NIX_ENABLED=false
89 changes: 89 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: PR Checks

on:
pull_request:
branches: [main]

env:
DEVCELL_DIR: ${{ github.workspace }}

jobs:
secrets:
name: Detect Secrets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build and Test (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
arch: amd64
- runner: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune -af
df -h

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x

- name: Copy example files
run: |
cp .tool-versions-example .tool-versions
cp Dockerfile-local.example Dockerfile-local
cp compose.local-example.yml compose.local.yml

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker

- name: Build images
run: task build
env:
USER_NAME: runner
USER_UID: 1001
USER_GID: 127

- name: Test Claude version
run: |
# Get expected version from package.json
EXPECTED=$(jq -r '.dependencies["@anthropic-ai/claude-code"]' package.json)
echo "Expected Claude version: $EXPECTED"

# Get actual version from container (use docker directly, task claude requires TTY)
ACTUAL=$(docker run --rm --entrypoint "" devcell:latest-local claude --version 2>&1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)
echo "Actual Claude version: $ACTUAL"

if [[ -z "$ACTUAL" ]]; then
echo "Could not get Claude version"
exit 1
fi

if [[ "$ACTUAL" != "$EXPECTED" ]]; then
echo "Version mismatch: expected $EXPECTED, got $ACTUAL"
exit 1
fi

echo "Claude version verified: $ACTUAL"
124 changes: 124 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: Release

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
name: Build (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
arch: amd64
platform: linux/amd64
- runner: ubuntu-24.04-arm
arch: arm64
platform: linux/arm64
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune -af
df -h

- name: Copy example files
run: |
cp .tool-versions-example .tool-versions
cp compose.local-example.yml compose.local.yml

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},suffix=-${{ matrix.arch }}
type=sha,prefix=,format=short,suffix=-${{ matrix.arch }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
provenance: false
build-args: |
USER_NAME=devuser
USER_UID=1000
USER_GID=1000

manifest:
name: Create Multi-Arch Manifest
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=sha,prefix=,format=short

- name: Create and push multi-arch manifest
run: |
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"

for TAG in ${{ steps.meta.outputs.tags }}; do
TAG_NAME="${TAG##*:}"

echo "Creating manifest for ${TAG}"
docker buildx imagetools create -t "${TAG}" \
"${IMAGE}:${TAG_NAME}-amd64" \
"${IMAGE}:${TAG_NAME}-arm64"
done

- name: Inspect manifests
run: |
for TAG in ${{ steps.meta.outputs.tags }}; do
echo "=== Inspecting ${TAG} ==="
docker buildx imagetools inspect "${TAG}"
done
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.venv
.env
*.egg-info
python-tools
.vagrant
.tool-versions
compose.local.yml
Dockerfile-local
node_modules
package-lock.json
package.local.json
pyproject.local.toml
uv.lock
Vagrantfile.local
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
6 changes: 6 additions & 0 deletions .tool-versions-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nodejs 24.12.0
ruby 3.4.7
python 3.14.2
opentofu 1.11.0
golang 1.25.5
uv 0.9.18
Loading
Loading