summaryrefslogtreecommitdiff
path: root/archived/projt-launcher/docs/handbook/ci_support.md
blob: 8853645cd2b8e9f1d3b2afd271cfa3ab285c0a97 (plain)
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
# CI Support `ci/`

> **Location**: `ci/`  
> **Purpose**: CI configuration and support files
> **Latest Version**: 0.0.5-1

---

## Overview

The `ci/` directory contains configuration files, scripts, and Nix expressions that support the CI/CD pipeline. These files are used by GitHub Actions workflows for code quality, validation, and build processes.

---

## Directory Structure

```
ci/
├── code-quality.nix        # Nix expression for code quality tools
├── code-quality.sh         # Shell script for linting/formatting
├── default.nix             # Default Nix entry point
├── parse.nix               # Nix parsing utilities
├── pinned.json             # Pinned Nix package versions
├── supportedBranches.js    # Branch configuration
├── supportedSystems.json   # Target system matrix
├── supportedVersions.nix   # Version compatibility
├── update-pinned.sh        # Update pinned packages
├── OWNERS                  # Code ownership file
│
├── codeowners-validator/   # CODEOWNERS validation
├── eval/                   # Evaluation helpers
├── github-script/          # GitHub Script automation
└── nixpkgs-vet/            # Nixpkgs validation
```

---

## File Descriptions

### Core Files

| File | Description |
|------|-------------|
| `code-quality.nix` | Nix expression defining code quality tool environment |
| `code-quality.sh` | Main script for running clang-format, linters, etc. |
| `default.nix` | Default Nix derivation entry point |

### Configuration

| File | Description |
|------|-------------|
| `pinned.json` | Pinned nixpkgs revision for reproducibility |
| `supportedSystems.json` | Build matrix (Linux, macOS, Windows) |
| `supportedVersions.nix` | Supported version compatibility matrix |
| `supportedBranches.js` | CI branch filtering rules |

### Subdirectories

| Directory | Purpose |
|-----------|---------|
| `codeowners-validator/` | Validates CODEOWNERS file format |
| `eval/` | Nix evaluation helpers for project validation |
| `github-script/` | JavaScript helpers for GitHub Actions |
| `nixpkgs-vet/` | Nixpkgs best practices validation |

---

## Usage

### Running Code Quality Checks

```bash
# Using Nix
nix-shell ci/default.nix --run "./ci/code-quality.sh"

# Or directly
./ci/code-quality.sh
```

### Updating Pinned Packages

```bash
./ci/update-pinned.sh
```

---

## Integration

These files are used by:

- `ci-lint.yml` — Code quality workflow
- `ci-new.yml` — Main orchestrator
- `flake.nix` — Nix flake development shell

---

## Related Documentation

- [Workflows](./workflows.md) — GitHub Actions overview
- [CI Evaluation](./ptcieval.md) — Project validation
- [GitHub Scripts](./ptcigh.md) — Automation helpers
- [Nix Packaging](./nix.md) — Nix build system