Skip to content

chore: update copyright year to 2026 #3

chore: update copyright year to 2026

chore: update copyright year to 2026 #3

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
release:
types: [created]
env:
ZIG_VERSION: 0.15.2
jobs:
# =============================================================================
# Code Quality Checks
# =============================================================================
format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Check formatting
run: zig fmt --check src/ tests/
schema-validation:
name: Schema Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install jsonschema
run: pip install jsonschema
- name: Validate schema is valid JSON
run: python -c "import json; json.load(open('schema/zeitgeist.schema.json')); print('Schema JSON is valid')"
- name: Validate example config against schema
run: |
python -c "
import json
from jsonschema import validate, Draft202012Validator
# Load schema and config
with open('schema/zeitgeist.schema.json') as f:
schema = json.load(f)
with open('examples/full-config.json') as f:
config = json.load(f)
# Validate
Draft202012Validator.check_schema(schema)
validate(instance=config, schema=schema)
print('examples/full-config.json validates against schema')
"
# =============================================================================
# Build & Test
# =============================================================================
test:
name: Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-linux
- os: macos-latest
target: aarch64-macos
- os: windows-latest
target: x86_64-windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Cache Zig
uses: actions/cache@v4
with:
path: |
~/.cache/zig
.zig-cache
key: zig-${{ matrix.target }}-${{ hashFiles('build.zig.zon') }}
restore-keys: |
zig-${{ matrix.target }}-
- name: Run unit tests
run: zig build test --summary all
- name: Run integration tests
run: zig build integration --summary all
- name: Build debug
run: zig build
- name: Run CLI help
run: zig build run -- --help
- name: Run CLI version
run: zig build run -- --version
build:
name: Build (${{ matrix.target }})
needs: [test, format-check, schema-validation]
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-linux
- os: ubuntu-latest
target: aarch64-linux
- os: macos-latest
target: x86_64-macos
- os: macos-latest
target: aarch64-macos
- os: windows-latest
target: x86_64-windows
- os: windows-latest
target: aarch64-windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Cache Zig
uses: actions/cache@v4
with:
path: |
~/.cache/zig
.zig-cache
key: zig-${{ matrix.target }}-${{ hashFiles('build.zig.zon') }}
restore-keys: |
zig-${{ matrix.target }}-
- name: Build release
run: zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: zeitgeist-${{ matrix.target }}
path: |
zig-out/bin/zeitgeist*
zig-out/bin/zg*
retention-days: 7
# =============================================================================
# Release
# =============================================================================
release:
name: Release
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release archives
run: |
cd artifacts
for dir in */; do
target="${dir%/}"
target="${target#zeitgeist-}"
echo "Creating archive for $target..."
if [[ "$target" == *windows* ]]; then
# For Windows, create zip
cd "$dir"
zip -r "../../zeitgeist-${target}.zip" *
cd ..
else
# For Unix, create tarball
tar -czvf "../zeitgeist-${target}.tar.gz" -C "$dir" .
fi
done
- name: List release files
run: ls -la zeitgeist-*
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
zeitgeist-*.tar.gz
zeitgeist-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# =============================================================================
# Documentation
# =============================================================================
docs-check:
name: Documentation Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check README links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: '.github/markdown-link-check-config.json'
continue-on-error: true
- name: Verify schema $id matches repo
run: |
# Check that schema $id contains the repo name
if grep -q "zeitgeist" schema/zeitgeist.schema.json; then
echo "Schema references zeitgeist correctly"
else
echo "Warning: Schema $id may need updating"
fi