fix(nixpkgs): rename apfel-ai -> apfel-llm everywhere (#137) #299
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: macos-26 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Select latest Xcode | |
| run: | | |
| latest=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -1) | |
| if [[ -n "$latest" ]]; then | |
| echo "Selecting $latest" | |
| sudo xcode-select -s "$latest/Contents/Developer" | |
| fi | |
| echo "Active SDK: $(xcrun --show-sdk-version)" | |
| echo "Swift: $(swift --version 2>&1 | head -1)" | |
| - name: Build | |
| # Use make so generate-man-page (and generate-build-info) run too. | |
| run: make build | |
| - name: Unit tests | |
| run: swift run apfel-tests | |
| - name: Install Python test dependencies | |
| run: pip3 install --break-system-packages pytest httpx | |
| - name: Integration tests (model-free subset) | |
| run: | | |
| # GitHub-hosted macos-26 runners are Intel with no Apple Intelligence. | |
| # We run every test that does NOT need the model. Full integration | |
| # qualification runs locally via `make preflight` / `make release`. | |
| # CLI flag/help/version/file tests (no model needed) | |
| python3 -m pytest Tests/integration/cli_e2e_test.py \ | |
| -k "help or version or invalid_flag or no_color or ansi or exit_code or update or release_exits or release_in_help or release_shows_version or mcp_timeout_flag_in_help or mcp_timeout_env_var_in_help or file_flag_missing or file_flag_nonexistent or file_flag_image or file_flag_binary or file_flag_unknown" \ | |
| -v --tb=short | |
| # Man page drift tests (model-free): block any PR that adds/renames | |
| # a flag, env var, or exit code without updating man/apfel.1.in. | |
| python3 -m pytest Tests/integration/test_man_page.py -v --tb=short | |
| # Note: performance_test.py requires Apple Intelligence (benchmark runs inference). | |
| # It runs locally via make preflight / make release. | |
| apfelcore-public-api: | |
| runs-on: macos-26 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Select latest Xcode | |
| run: | | |
| latest=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -1) | |
| if [[ -n "$latest" ]]; then | |
| echo "Selecting $latest" | |
| sudo xcode-select -s "$latest/Contents/Developer" | |
| fi | |
| echo "Active SDK: $(xcrun --show-sdk-version)" | |
| echo "Swift: $(swift --version 2>&1 | head -1)" | |
| - name: Build ApfelCore target | |
| run: swift build --target ApfelCore | |
| - name: Strict concurrency build for ApfelCore | |
| run: swift build --target ApfelCore -Xswiftc -strict-concurrency=complete | |
| - name: Build ApfelCore docs | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/apfelcore-docs" | |
| swift package \ | |
| --allow-writing-to-directory "$RUNNER_TEMP/apfelcore-docs" \ | |
| generate-documentation \ | |
| --target ApfelCore \ | |
| --disable-indexing \ | |
| --warnings-as-errors \ | |
| --output-path "$RUNNER_TEMP/apfelcore-docs" | |
| - name: Diagnose API breakage for ApfelCore | |
| run: | | |
| baseline=$(git describe --tags --abbrev=0) | |
| if git show "${baseline}:Package.swift" | grep -Fq '.library(name: "ApfelCore"'; then | |
| swift package diagnose-api-breaking-changes "$baseline" --products ApfelCore | |
| else | |
| echo "Skipping API breakage check: ${baseline} predates the ApfelCore product." | |
| fi | |
| - name: Install Python test dependencies | |
| run: pip3 install --break-system-packages pytest httpx | |
| - name: Downstream consumer smoke test | |
| run: python3 -m pytest Tests/integration/test_apfelcore_package.py -v --tb=short | |
| - name: ApfelCore examples smoke test | |
| run: python3 -m pytest Tests/integration/test_apfelcore_examples.py -v --tb=short |