This release represents a comprehensive transformation of the codebase from Codex to LLMX, enhanced with LiteLLM integration to support 100+ LLM providers through a unified API. ## Major Changes ### Phase 1: Repository & Infrastructure Setup - Established new repository structure and branching strategy - Created comprehensive project documentation (CLAUDE.md, LITELLM-SETUP.md) - Set up development environment and tooling configuration ### Phase 2: Rust Workspace Transformation - Renamed all Rust crates from `codex-*` to `llmx-*` (30+ crates) - Updated package names, binary names, and workspace members - Renamed core modules: codex.rs → llmx.rs, codex_delegate.rs → llmx_delegate.rs - Updated all internal references, imports, and type names - Renamed directories: codex-rs/ → llmx-rs/, codex-backend-openapi-models/ → llmx-backend-openapi-models/ - Fixed all Rust compilation errors after mass rename ### Phase 3: LiteLLM Integration - Integrated LiteLLM for multi-provider LLM support (Anthropic, OpenAI, Azure, Google AI, AWS Bedrock, etc.) - Implemented OpenAI-compatible Chat Completions API support - Added model family detection and provider-specific handling - Updated authentication to support LiteLLM API keys - Renamed environment variables: OPENAI_BASE_URL → LLMX_BASE_URL - Added LLMX_API_KEY for unified authentication - Enhanced error handling for Chat Completions API responses - Implemented fallback mechanisms between Responses API and Chat Completions API ### Phase 4: TypeScript/Node.js Components - Renamed npm package: @codex/codex-cli → @valknar/llmx - Updated TypeScript SDK to use new LLMX APIs and endpoints - Fixed all TypeScript compilation and linting errors - Updated SDK tests to support both API backends - Enhanced mock server to handle multiple API formats - Updated build scripts for cross-platform packaging ### Phase 5: Configuration & Documentation - Updated all configuration files to use LLMX naming - Rewrote README and documentation for LLMX branding - Updated config paths: ~/.codex/ → ~/.llmx/ - Added comprehensive LiteLLM setup guide - Updated all user-facing strings and help text - Created release plan and migration documentation ### Phase 6: Testing & Validation - Fixed all Rust tests for new naming scheme - Updated snapshot tests in TUI (36 frame files) - Fixed authentication storage tests - Updated Chat Completions payload and SSE tests - Fixed SDK tests for new API endpoints - Ensured compatibility with Claude Sonnet 4.5 model - Fixed test environment variables (LLMX_API_KEY, LLMX_BASE_URL) ### Phase 7: Build & Release Pipeline - Updated GitHub Actions workflows for LLMX binary names - Fixed rust-release.yml to reference llmx-rs/ instead of codex-rs/ - Updated CI/CD pipelines for new package names - Made Apple code signing optional in release workflow - Enhanced npm packaging resilience for partial platform builds - Added Windows sandbox support to workspace - Updated dotslash configuration for new binary names ### Phase 8: Final Polish - Renamed all assets (.github images, labels, templates) - Updated VSCode and DevContainer configurations - Fixed all clippy warnings and formatting issues - Applied cargo fmt and prettier formatting across codebase - Updated issue templates and pull request templates - Fixed all remaining UI text references ## Technical Details **Breaking Changes:** - Binary name changed from `codex` to `llmx` - Config directory changed from `~/.codex/` to `~/.llmx/` - Environment variables renamed (CODEX_* → LLMX_*) - npm package renamed to `@valknar/llmx` **New Features:** - Support for 100+ LLM providers via LiteLLM - Unified authentication with LLMX_API_KEY - Enhanced model provider detection and handling - Improved error handling and fallback mechanisms **Files Changed:** - 578 files modified across Rust, TypeScript, and documentation - 30+ Rust crates renamed and updated - Complete rebrand of UI, CLI, and documentation - All tests updated and passing **Dependencies:** - Updated Cargo.lock with new package names - Updated npm dependencies in llmx-cli - Enhanced OpenAPI models for LLMX backend This release establishes LLMX as a standalone project with comprehensive LiteLLM integration, maintaining full backward compatibility with existing functionality while opening support for a wide ecosystem of LLM providers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Sebastian Krüger <support@pivoine.art>
490 lines
18 KiB
YAML
490 lines
18 KiB
YAML
name: rust-ci
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
# CI builds in debug (dev) for faster signal.
|
|
|
|
jobs:
|
|
# --- Detect what changed to detect which tests to run (always runs) -------------------------------------
|
|
changed:
|
|
name: Detect changed areas
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
llmx: ${{ steps.detect.outputs.llmx }}
|
|
workflows: ${{ steps.detect.outputs.workflows }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Detect changed paths (no external action)
|
|
id: detect
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
|
BASE_SHA='${{ github.event.pull_request.base.sha }}'
|
|
echo "Base SHA: $BASE_SHA"
|
|
# List files changed between base and current HEAD (merge-base aware)
|
|
mapfile -t files < <(git diff --name-only --no-renames "$BASE_SHA"...HEAD)
|
|
else
|
|
# On push / manual runs, default to running everything
|
|
files=("llmx-rs/force" ".github/force")
|
|
fi
|
|
|
|
llmx=false
|
|
workflows=false
|
|
for f in "${files[@]}"; do
|
|
[[ $f == llmx-rs/* ]] && llmx=true
|
|
[[ $f == .github/* ]] && workflows=true
|
|
done
|
|
|
|
echo "llmx=$llmx" >> "$GITHUB_OUTPUT"
|
|
echo "workflows=$workflows" >> "$GITHUB_OUTPUT"
|
|
|
|
# --- CI that doesn't need specific targets ---------------------------------
|
|
general:
|
|
name: Format / etc
|
|
runs-on: ubuntu-24.04
|
|
needs: changed
|
|
if: ${{ needs.changed.outputs.llmx == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
|
|
defaults:
|
|
run:
|
|
working-directory: llmx-rs
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.90
|
|
with:
|
|
components: rustfmt
|
|
- name: cargo fmt
|
|
run: cargo fmt -- --config imports_granularity=Item --check
|
|
- name: Verify codegen for mcp-types
|
|
run: ./mcp-types/check_lib_rs.py
|
|
|
|
cargo_shear:
|
|
name: cargo shear
|
|
runs-on: ubuntu-24.04
|
|
needs: changed
|
|
if: ${{ needs.changed.outputs.llmx == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
|
|
defaults:
|
|
run:
|
|
working-directory: llmx-rs
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.90
|
|
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
|
with:
|
|
tool: cargo-shear
|
|
version: 1.5.1
|
|
- name: cargo shear
|
|
run: cargo shear
|
|
|
|
# --- CI to validate on different os/targets --------------------------------
|
|
lint_build:
|
|
name: Lint/Build — ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.profile == 'release' && ' (release)' || '' }}
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 30
|
|
needs: changed
|
|
# Keep job-level if to avoid spinning up runners when not needed
|
|
if: ${{ needs.changed.outputs.llmx == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
|
|
defaults:
|
|
run:
|
|
working-directory: llmx-rs
|
|
env:
|
|
# Speed up repeated builds across CI runs by caching compiled objects.
|
|
RUSTC_WRAPPER: sccache
|
|
CARGO_INCREMENTAL: "0"
|
|
SCCACHE_CACHE_SIZE: 10G
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: macos-14
|
|
target: aarch64-apple-darwin
|
|
profile: dev
|
|
- runner: macos-14
|
|
target: x86_64-apple-darwin
|
|
profile: dev
|
|
- runner: ubuntu-24.04
|
|
target: x86_64-unknown-linux-musl
|
|
profile: dev
|
|
- runner: ubuntu-24.04
|
|
target: x86_64-unknown-linux-gnu
|
|
profile: dev
|
|
- runner: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-musl
|
|
profile: dev
|
|
- runner: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-gnu
|
|
profile: dev
|
|
- runner: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
profile: dev
|
|
- runner: windows-11-arm
|
|
target: aarch64-pc-windows-msvc
|
|
profile: dev
|
|
|
|
# Also run representative release builds on Mac and Linux because
|
|
# there could be release-only build errors we want to catch.
|
|
# Hopefully this also pre-populates the build cache to speed up
|
|
# releases.
|
|
- runner: macos-14
|
|
target: aarch64-apple-darwin
|
|
profile: release
|
|
- runner: ubuntu-24.04
|
|
target: x86_64-unknown-linux-musl
|
|
profile: release
|
|
- runner: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
profile: release
|
|
- runner: windows-11-arm
|
|
target: aarch64-pc-windows-msvc
|
|
profile: release
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.90
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
components: clippy
|
|
|
|
# Explicit cache restore: split cargo home vs target, so we can
|
|
# avoid caching the large target dir on the gnu-dev job.
|
|
- name: Restore cargo home cache
|
|
id: cache_cargo_home_restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('llmx-rs/rust-toolchain.toml') }}
|
|
restore-keys: |
|
|
cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
|
|
|
|
# Install and restore sccache cache
|
|
- name: Install sccache
|
|
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
|
with:
|
|
tool: sccache
|
|
version: 0.7.5
|
|
|
|
- name: Configure sccache backend
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if [[ -n "${ACTIONS_CACHE_URL:-}" && -n "${ACTIONS_RUNTIME_TOKEN:-}" ]]; then
|
|
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
|
|
echo "Using sccache GitHub backend"
|
|
else
|
|
echo "SCCACHE_GHA_ENABLED=false" >> "$GITHUB_ENV"
|
|
echo "SCCACHE_DIR=${{ github.workspace }}/.sccache" >> "$GITHUB_ENV"
|
|
echo "Using sccache local disk + actions/cache fallback"
|
|
fi
|
|
|
|
- name: Restore sccache cache (fallback)
|
|
if: ${{ env.SCCACHE_GHA_ENABLED != 'true' }}
|
|
id: cache_sccache_restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.sccache/
|
|
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-
|
|
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
|
|
|
|
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
|
|
name: Prepare APT cache directories (musl)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
sudo mkdir -p /var/cache/apt/archives /var/lib/apt/lists
|
|
sudo chown -R "$USER:$USER" /var/cache/apt /var/lib/apt/lists
|
|
|
|
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
|
|
name: Restore APT cache (musl)
|
|
id: cache_apt_restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
/var/cache/apt
|
|
key: apt-${{ matrix.runner }}-${{ matrix.target }}-v1
|
|
|
|
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
|
|
name: Install musl build tools
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
sudo apt-get -y update -o Acquire::Retries=3
|
|
sudo apt-get -y install --no-install-recommends musl-tools pkg-config
|
|
|
|
- name: Install cargo-chef
|
|
if: ${{ matrix.profile == 'release' }}
|
|
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
|
with:
|
|
tool: cargo-chef
|
|
version: 0.1.71
|
|
|
|
- name: Pre-warm dependency cache (cargo-chef)
|
|
if: ${{ matrix.profile == 'release' }}
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
RECIPE="${RUNNER_TEMP}/chef-recipe.json"
|
|
cargo chef prepare --recipe-path "$RECIPE"
|
|
cargo chef cook --recipe-path "$RECIPE" --target ${{ matrix.target }} --release --all-features
|
|
|
|
- name: cargo clippy
|
|
id: clippy
|
|
run: cargo clippy --target ${{ matrix.target }} --all-features --tests --profile ${{ matrix.profile }} -- -D warnings
|
|
|
|
# Running `cargo build` from the workspace root builds the workspace using
|
|
# the union of all features from third-party crates. This can mask errors
|
|
# where individual crates have underspecified features. To avoid this, we
|
|
# run `cargo check` for each crate individually, though because this is
|
|
# slower, we only do this for the x86_64-unknown-linux-gnu target.
|
|
- name: cargo check individual crates
|
|
id: cargo_check_all_crates
|
|
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' && matrix.profile != 'release' }}
|
|
continue-on-error: true
|
|
run: |
|
|
find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 \
|
|
| xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo check --profile ${{ matrix.profile }}'
|
|
|
|
# Save caches explicitly; make non-fatal so cache packaging
|
|
# never fails the overall job. Only save when key wasn't hit.
|
|
- name: Save cargo home cache
|
|
if: always() && !cancelled() && steps.cache_cargo_home_restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('llmx-rs/rust-toolchain.toml') }}
|
|
|
|
- name: Save sccache cache (fallback)
|
|
if: always() && !cancelled() && env.SCCACHE_GHA_ENABLED != 'true'
|
|
continue-on-error: true
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.sccache/
|
|
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
|
|
|
|
- name: sccache stats
|
|
if: always()
|
|
continue-on-error: true
|
|
run: sccache --show-stats || true
|
|
|
|
- name: sccache summary
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
{
|
|
echo "### sccache stats — ${{ matrix.target }} (${{ matrix.profile }})";
|
|
echo;
|
|
echo '```';
|
|
sccache --show-stats || true;
|
|
echo '```';
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
|
|
- name: Save APT cache (musl)
|
|
if: always() && !cancelled() && (matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl') && steps.cache_apt_restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
/var/cache/apt
|
|
key: apt-${{ matrix.runner }}-${{ matrix.target }}-v1
|
|
|
|
# Fail the job if any of the previous steps failed.
|
|
- name: verify all steps passed
|
|
if: |
|
|
steps.clippy.outcome == 'failure' ||
|
|
steps.cargo_check_all_crates.outcome == 'failure'
|
|
run: |
|
|
echo "One or more checks failed (clippy or cargo_check_all_crates). See logs for details."
|
|
exit 1
|
|
|
|
tests:
|
|
name: Tests — ${{ matrix.runner }} - ${{ matrix.target }}
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 30
|
|
needs: changed
|
|
if: ${{ needs.changed.outputs.llmx == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
|
|
defaults:
|
|
run:
|
|
working-directory: llmx-rs
|
|
env:
|
|
RUSTC_WRAPPER: sccache
|
|
CARGO_INCREMENTAL: "0"
|
|
SCCACHE_CACHE_SIZE: 10G
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: macos-14
|
|
target: aarch64-apple-darwin
|
|
profile: dev
|
|
- runner: ubuntu-24.04
|
|
target: x86_64-unknown-linux-gnu
|
|
profile: dev
|
|
- runner: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-gnu
|
|
profile: dev
|
|
- runner: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
profile: dev
|
|
- runner: windows-11-arm
|
|
target: aarch64-pc-windows-msvc
|
|
profile: dev
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.90
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Restore cargo home cache
|
|
id: cache_cargo_home_restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('llmx-rs/rust-toolchain.toml') }}
|
|
restore-keys: |
|
|
cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
|
|
|
|
- name: Install sccache
|
|
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
|
with:
|
|
tool: sccache
|
|
version: 0.7.5
|
|
|
|
- name: Configure sccache backend
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if [[ -n "${ACTIONS_CACHE_URL:-}" && -n "${ACTIONS_RUNTIME_TOKEN:-}" ]]; then
|
|
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
|
|
echo "Using sccache GitHub backend"
|
|
else
|
|
echo "SCCACHE_GHA_ENABLED=false" >> "$GITHUB_ENV"
|
|
echo "SCCACHE_DIR=${{ github.workspace }}/.sccache" >> "$GITHUB_ENV"
|
|
echo "Using sccache local disk + actions/cache fallback"
|
|
fi
|
|
|
|
- name: Restore sccache cache (fallback)
|
|
if: ${{ env.SCCACHE_GHA_ENABLED != 'true' }}
|
|
id: cache_sccache_restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.sccache/
|
|
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-
|
|
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
|
|
|
|
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
|
|
with:
|
|
tool: nextest
|
|
version: 0.9.103
|
|
|
|
- name: tests
|
|
id: test
|
|
continue-on-error: true
|
|
run: cargo nextest run --all-features --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
LLMX_API_KEY: test
|
|
|
|
- name: Save cargo home cache
|
|
if: always() && !cancelled() && steps.cache_cargo_home_restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('llmx-rs/rust-toolchain.toml') }}
|
|
|
|
- name: Save sccache cache (fallback)
|
|
if: always() && !cancelled() && env.SCCACHE_GHA_ENABLED != 'true'
|
|
continue-on-error: true
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ${{ github.workspace }}/.sccache/
|
|
key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
|
|
|
|
- name: sccache stats
|
|
if: always()
|
|
continue-on-error: true
|
|
run: sccache --show-stats || true
|
|
|
|
- name: sccache summary
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
{
|
|
echo "### sccache stats — ${{ matrix.target }} (tests)";
|
|
echo;
|
|
echo '```';
|
|
sccache --show-stats || true;
|
|
echo '```';
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
|
|
- name: verify tests passed
|
|
if: steps.test.outcome == 'failure'
|
|
run: |
|
|
echo "Tests failed. See logs for details."
|
|
exit 1
|
|
|
|
# --- Gatherer job that you mark as the ONLY required status -----------------
|
|
results:
|
|
name: CI results (required)
|
|
needs: [changed, general, cargo_shear, lint_build, tests]
|
|
if: always()
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Summarize
|
|
shell: bash
|
|
run: |
|
|
echo "general: ${{ needs.general.result }}"
|
|
echo "shear : ${{ needs.cargo_shear.result }}"
|
|
echo "lint : ${{ needs.lint_build.result }}"
|
|
echo "tests : ${{ needs.tests.result }}"
|
|
|
|
# If nothing relevant changed (PR touching only root README, etc.),
|
|
# declare success regardless of other jobs.
|
|
if [[ '${{ needs.changed.outputs.llmx }}' != 'true' && '${{ needs.changed.outputs.workflows }}' != 'true' && '${{ github.event_name }}' != 'push' ]]; then
|
|
echo 'No relevant changes -> CI not required.'
|
|
exit 0
|
|
fi
|
|
|
|
# Otherwise require the jobs to have succeeded
|
|
[[ '${{ needs.general.result }}' == 'success' ]] || { echo 'general failed'; exit 1; }
|
|
[[ '${{ needs.cargo_shear.result }}' == 'success' ]] || { echo 'cargo_shear failed'; exit 1; }
|
|
[[ '${{ needs.lint_build.result }}' == 'success' ]] || { echo 'lint_build failed'; exit 1; }
|
|
[[ '${{ needs.tests.result }}' == 'success' ]] || { echo 'tests failed'; exit 1; }
|
|
|
|
- name: sccache summary note
|
|
if: always()
|
|
run: |
|
|
echo "Per-job sccache stats are attached to each matrix job's Step Summary."
|