AkurAI Build
Menu

AkurAI-Build

public

Latest change e16ed955e37bc7f7b00de000a208ef91006cf60e - Adopt the AkurAI ID SSO contract and inject pipeline build context by AkurAI Build

version: 1
# AkurAI-Build runs as one hardened systemd service on Titan that also owns
# pipeline execution (AKURAI_WORKERS=1). A push to hosted Git queues a run
# automatically when the repository carries this file. The protected
# deploy-production job cannot mutate the service it runs inside of
# (ProtectHome=read-only, NoNewPrivileges), so deploy/service-deploy.sh stages
# the packaged binary for the root-owned akurai-deploy.path host agent
# (deploy/host/), which checksum-verifies, installs, restarts, health-gates,
# and rolls back automatically on failure.
#
# Never hardcode a worker username or data root: the runner injects
# AKURAI_BUILD_ROOT, AKURAI_BUILD_HOSTED, AKURAI_BUILD_WORKSPACE, and
# AKURAI_BUILD_HOME into every job. See README "Pipeline build context".
jobs:
  - name: verify
    executor: native
    branches: [main]
    run:
      - RUSTUP_HOME=$AKURAI_BUILD_HOME/.rustup CARGO_HOME=$AKURAI_BUILD_HOME/.cargo PATH=$AKURAI_BUILD_HOME/.cargo/bin:/usr/bin:/bin cargo fmt --all -- --check
      - RUSTUP_HOME=$AKURAI_BUILD_HOME/.rustup CARGO_HOME=$AKURAI_BUILD_HOME/.cargo PATH=$AKURAI_BUILD_HOME/.cargo/bin:/usr/bin:/bin cargo clippy --all-targets --all-features -- -D warnings
      - RUSTUP_HOME=$AKURAI_BUILD_HOME/.rustup CARGO_HOME=$AKURAI_BUILD_HOME/.cargo PATH=$AKURAI_BUILD_HOME/.cargo/bin:/usr/bin:/bin cargo test

  - name: package
    needs: [verify]
    executor: native
    branches: [main]
    run: RUSTUP_HOME=$AKURAI_BUILD_HOME/.rustup CARGO_HOME=$AKURAI_BUILD_HOME/.cargo PATH=$AKURAI_BUILD_HOME/.cargo/bin:/usr/bin:/bin cargo build --release
    artifacts:
      - target/release/akurai

  - name: deploy-production
    needs: [package]
    executor: native
    branches: [main]
    environment: production
    approval: true
    run: AKURAI_HOST_BIN=$AKURAI_BUILD_HOME/.local/bin sh deploy/service-deploy.sh