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
30 changes: 30 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM debian:bookworm-slim

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
wget \
pkg-config \
libssl-dev \
ca-certificates \
git \
sudo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Create non-root user — use --force to avoid failure if GID already exists
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --force --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash || true \
&& echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# Ensure feature-installed tools are on PATH for non-root user
ENV PATH="/usr/local/cargo/bin:/usr/local/share/nvm/current/bin:${PATH}"
ENV CARGO_HOME="/usr/local/cargo"
ENV RUSTUP_HOME="/usr/local/rustup"
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "devpod-mcp",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/rust:1": {
"profile": "default"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"dockerDashComposeVersion": "v2"
}
},
"postCreateCommand": ". /usr/local/cargo/env && cargo fetch",
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"ms-azuretools.vscode-containers"
]
}
}
}
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check -p devpod-mcp-core -p devpod-mcp
- run: cargo test -p devpod-mcp-core -p devpod-mcp
- run: cargo clippy -p devpod-mcp-core -p devpod-mcp -- -D warnings
- run: cargo fmt --all -- --check
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
release:
types: [created]

env:
CARGO_TERM_COLOR: always

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.artifact }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact: devpod-mcp-linux-x64
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact: devpod-mcp-linux-arm64
cross: true
- target: x86_64-apple-darwin
os: macos-latest
artifact: devpod-mcp-darwin-x64
- target: aarch64-apple-darwin
os: macos-latest
artifact: devpod-mcp-darwin-arm64

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}

- name: Install cross-compilation deps
if: matrix.cross
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo '[target.aarch64-unknown-linux-gnu]' >> ~/.cargo/config.toml
echo 'linker = "aarch64-linux-gnu-gcc"' >> ~/.cargo/config.toml

- name: Build
run: cargo build --release --target ${{ matrix.target }} -p devpod-mcp

- name: Package binary
run: |
cp target/${{ matrix.target }}/release/devpod-mcp ${{ matrix.artifact }}
chmod +x ${{ matrix.artifact }}

- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.artifact }}
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Rust
/target
**/*.rs.bk
*.pdb

# DevPod / DevContainer internals
.devcontainer/.devpod-internal/
.devcontainer/devcontainer-lock.json

# IDE
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db
31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "cargo",
"command": "build",
"args": [
"--release",
"-p",
"devpod-mcp"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$rustc"]
},
{
"label": "Build All Platforms",
"type": "shell",
"command": "bash",
"args": [
"-c",
"set -e && targets=(x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin) && for t in \"${targets[@]}\"; do echo \"\\n==> Building $t\" && rustup target add \"$t\" 2>/dev/null && cargo build --release --target \"$t\" -p devpod-mcp && echo \" ✓ target/$t/release/devpod-mcp\"; done"
],
"group": "build",
"problemMatcher": ["$rustc"]
}
]
}
Loading
Loading