aoc-toolkit 0.1.0-alpha.4

A toolkit for solving Advent of Code problems
Documentation
name: CI

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

permissions:
  contents: read
concurrency:
  group: ${{ (github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref_type == 'branch')) && format('ci-ref-{0}', github.ref) || format('ci-run-{0}', github.run_id) }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref_type == 'branch') }}
jobs:
  quality:
    name: Quality / ${{ matrix.check }}
    runs-on: ubuntu-26.04
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        check: [fmt-check, lint, lint-core]
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
      - run: cargo +stable ${{ matrix.check }}

  features:
    name: Features / ${{ matrix.features }}
    runs-on: ubuntu-26.04
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        include:
          - features: core
            args: --no-default-features
          - features: client
            args: --no-default-features --features client
          - features: runner
            args: --no-default-features --features runner
          - features: cli
            args: --no-default-features --features cli
          - features: default
            args: ''
          - features: all
            args: --all-features
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - run: rustup toolchain install stable --profile minimal
      - name: Check
        run: cargo +stable check --locked --all-targets ${{ matrix.args }}
      - name: Test
        run: cargo +stable test --locked ${{ matrix.args }}

  platforms:
    name: Platform / ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    timeout-minutes: 25
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-2025]
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - run: rustup toolchain install stable --profile minimal
      - run: cargo +stable test-all
      - run: cargo +stable build-release
      - run: cargo +stable run --locked --release --bin aoc -- --version
      - run: cargo +stable run --locked --release --bin aoc -- --help

  package:
    name: Package verification
    runs-on: ubuntu-26.04
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false
      - run: rustup toolchain install stable --profile minimal
      - run: cargo +stable package --locked
      - name: Verify templates are packaged
        shell: bash
        run: |
          set -euo pipefail
          cargo +stable package --list --locked > /tmp/aoc-package-files
          for template in templates/shared/AGENTS.md.j2 templates/shared/CLAUDE.md.j2 templates/shared/aoc.toml.j2 templates/rust/project/Cargo.toml.j2 templates/rust/puzzle/day.rs.j2 templates/rust/puzzle/year.rs.j2; do
            grep -Fx "$template" /tmp/aoc-package-files
          done