79 lines
1.9 KiB
Markdown
79 lines
1.9 KiB
Markdown
# Woodpecker CI Configuration
|
|
|
|
Pipelines for Gitea/Forgejo + Woodpecker CI.
|
|
|
|
## Files
|
|
|
|
- **`ci.yml`** - Main CI pipeline (push, pull requests)
|
|
- **`Dockerfile`** - Custom CI image with pre-installed tools
|
|
- **`Dockerfile.cross`** - Cross-compilation image for multi-platform builds
|
|
|
|
## Setup
|
|
|
|
### 1. Activate Woodpecker CI
|
|
|
|
Enable Woodpecker CI in your Gitea/Forgejo repository settings.
|
|
|
|
### 2. (Optional) Build Custom Image
|
|
|
|
Speeds up CI by pre-installing tools (~5 min faster per run).
|
|
|
|
```bash
|
|
# Build CI image
|
|
docker build -t your-registry/ci:latest -f .woodpecker/Dockerfile .
|
|
|
|
# Push to your registry
|
|
docker push your-registry/ci:latest
|
|
|
|
# Update .woodpecker/ci.yml
|
|
# Change: image: rust:latest
|
|
# To: image: your-registry/ci:latest
|
|
```
|
|
|
|
### 3. Cross-Compilation Setup
|
|
|
|
For multi-platform builds:
|
|
|
|
```bash
|
|
# Build cross-compilation image
|
|
docker build -t your-registry/ci-cross:latest -f .woodpecker/Dockerfile.cross .
|
|
|
|
# Push to registry
|
|
docker push your-registry/ci-cross:latest
|
|
```
|
|
|
|
## CI Pipeline (`ci.yml`)
|
|
|
|
**Triggers**: Push to `main`/`develop`, Pull Requests
|
|
|
|
**Jobs**:
|
|
1. Lint (Rust, Bash, Nickel, Nushell, Markdown) - Parallel
|
|
2. Test (all features)
|
|
3. Build (release)
|
|
4. Security audit
|
|
5. License compliance check
|
|
|
|
**Duration**: ~15-20 minutes (without custom image), ~10-15 minutes (with custom image)
|
|
|
|
## Triggering Pipelines
|
|
|
|
```bash
|
|
# CI pipeline (automatic on push/PR)
|
|
git push origin main
|
|
```
|
|
|
|
## Viewing Results
|
|
|
|
- **Gitea/Forgejo**: Repository → Actions → Pipeline runs
|
|
- **Woodpecker UI**: https://your-woodpecker.instance/repos/{user}/{repo}
|
|
|
|
## Differences from GitHub Actions
|
|
|
|
| Feature | GitHub Actions | Woodpecker CI |
|
|
|---------|---------------|---------------|
|
|
| Matrix builds | ✅ 3 OS | ❌ Linux only* |
|
|
| Caching | ✅ Built-in | ⚠️ Server-side** |
|
|
|
|
\* Multi-OS builds require multiple Woodpecker agents
|
|
\*\* Configure in Woodpecker server settings
|