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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![Go Reference](https://pkg.go.dev/badge/github.com/netresearch/raybeam.svg)](https://pkg.go.dev/github.com/netresearch/raybeam)
[![CI Status](https://github.com/netresearch/raybeam/actions/workflows/ci.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/ci.yml)
[![Docker Build](https://github.com/netresearch/raybeam/actions/workflows/docker.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/docker.yml)
[![Release](https://github.com/netresearch/raybeam/actions/workflows/release.yml/badge.svg)](https://github.com/netresearch/raybeam/actions/workflows/release.yml)
[![Go Version](https://img.shields.io/github/go-mod/go-version/netresearch/raybeam)](https://go.dev/dl/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Latest Release](https://img.shields.io/github/v/release/netresearch/raybeam)](https://github.com/netresearch/raybeam/releases)
Expand Down
37 changes: 22 additions & 15 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ raybeam/
├── README.md # Project overview
├── LICENSE # MIT license
└── .github/workflows/ # GitHub Actions CI/CD
├── docker.yml # Docker image builds
└── release.yml # Binary releases
├── ci.yml # Lint, test, coverage
└── release.yml # Binaries + container image
```

### Package Organization
Expand Down Expand Up @@ -607,32 +607,39 @@ go mod tidy

### GitHub Actions Workflows

**Docker Build** (`.github/workflows/docker.yml`):
- Triggers: release publish, weekly cron, master push
- Builds multi-platform images (linux/amd64, arm64, etc.)
- Pushes to ghcr.io
**CI** (`.github/workflows/ci.yml`):
- Triggers: push to `main`, tags, pull requests, merge queue, weekly cron
- Lint, unit/integration/e2e tests, fuzzing, license check, coverage

**Release** (`.github/workflows/release.yml`):
- Triggers: release publish
- Builds binaries for linux and darwin (amd64)
- Attaches to GitHub release
- Triggers: `v*` tag push, manual dispatch
- Builds binaries for linux (386, amd64, arm64, armv6, armv7), darwin (amd64, arm64) and windows (amd64)
- Builds the multi-platform container image from those binaries and pushes it to ghcr.io
- Attaches binaries, SBOMs and attestations to the GitHub release

### Local Testing

Simulate CI locally:
The Dockerfile does not compile Go. Its `binary-selector` stage copies a
pre-built binary from `bin/` and picks the one matching the target platform.
In CI the release pipeline puts the binaries there; locally you cross-compile
them yourself first:

```bash
# Build Docker image
# Build the binary for the platform the image should target
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o bin/raybeam-linux-amd64 .

# Build the image
docker build -t raybeam:test .

# Run container
docker run --rm raybeam:test raybeam --version

# Test multi-stage build
docker build --target builder -t raybeam:builder .
docker build --target runner -t raybeam:runner .
```

A multi-platform build needs one binary per target platform in `bin/`: the
selector maps `linux/386`, `linux/amd64`, `linux/arm64`, `linux/arm/v6` and
`linux/arm/v7` to `raybeam-linux-386`, `-amd64`, `-arm64`, `-armv6` and
`-armv7` respectively.

## Debugging

### Logging
Expand Down
Loading