Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .agents/skills/watch-github-actions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,40 @@ gh run list --json databaseId,status,headBranch,url --jq '.[] | {id: .databaseId

`Release Dev` finishes its active run and replaces pending runs when new commits arrive. Other callers retain E2E cancellation. Inspect job annotations for cancellation reasons.

## GKE runner trial

Branch Checks Linux amd64 jobs from ai-openshell/openshell branches run on the
`openshell-ci-amd64` ARC scale set during the GKE trial. ARM Linux lint/tests
use `openshell-ci-arm64-pd-*` on native ARM Ubuntu nodes with ARM64 images.
Fork PRs, other ARM jobs, and macOS retain hosted runners. Confirm the runner name in the job details before
attributing a result to GKE. For a job-container or PostgreSQL startup failure,
check the runner pod's Docker sidecar first. A missing `gh` executable or
Cachix's `$USER must be set` error indicates incomplete runner bootstrap.
For a preloaded image, `setup-nix` verifies its global Cachix substituter and
skips adding it again. A cache-configuration permission failure indicates the
image/setup contract is out of sync. Rust jobs report shared memcached
sccache statistics; distinguish backend connectivity errors from compiler/test
failures. The x86 and ARM GKE lint/test jobs use single-worker
`openshell-ci-amd64-pd-*` and `openshell-ci-arm64-pd-*` scale sets with separate exclusive persistent disks. Setup reports the target
size before building and skips GitHub Cargo cache restore/save. Compare empty
and warm runs on different runner pods; a PVC surviving pod replacement is the
persistence check. `Pending` pods can be waiting for exclusive disk attachment;
inspect PVC/PV events before treating this as a runner registration failure.
On native ARM the crypto backend/OpenSSL verification steps run in the lint
job, in parallel with workspace tests; inspect that job for crypto failures.
Hosted/fork and x86 test jobs keep their existing crypto steps.
Gateway core features use parallel `base-kubernetes` and `docker-podman` matrix
jobs on `openshell-ci-amd64-pd-gateway-a/b`, with separate exclusive caches and
eight reserved runner CPUs. Inspect both jobs and all four named feature steps;
measure the later completion rather than summing durations. Fork jobs retain
hosted Ubuntu. A failed lane must fail the Branch Checks workflow gate.
The opt-in `compare_linux_combined` manual input adds Linux combined lint,
crypto, and test jobs beside the regular controls. Compare each architecture's
later control completion against its combined job, and runner minutes against
the control sum. Confirm cold versus warm target sizes; no Clippy architecture
coverage is dropped in this experiment. Ordinary PR runs skip the comparison.
See `CI.md` for trial scope and cache setup.

## View Job Logs

For Branch Checks `Reviewer Roster` failures, the log lists non-collaborators in
Expand Down
9 changes: 9 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@

self-hosted-runner:
labels:
- openshell-ci-amd64
- openshell-ci-amd64-pd-lint
- openshell-ci-amd64-pd-test
- openshell-ci-amd64-pd-combined
- openshell-ci-amd64-pd-gateway-a
- openshell-ci-amd64-pd-gateway-b
- openshell-ci-arm64-pd-lint
- openshell-ci-arm64-pd-test
- openshell-ci-arm64-pd-combined
- ubuntu-26.04
- windows-arm64

Expand Down
8 changes: 8 additions & 0 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ runs:
extra-conf: |
http2 = false

- name: Verify GKE image cache configuration
if: ${{ (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }}
shell: bash
run: |
nix config show --json | jq -e '.substituters.value | index("https://openshell.cachix.org") != null' > /dev/null

- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
name: openshell
# The image configures the substituter globally before dropping to runner.
skipAddingSubstituter: ${{ (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }}
authToken: ${{ inputs.cachix-auth-token }}
skipPush: ${{ inputs.cachix-auth-token == '' }}

Expand Down
43 changes: 43 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
description: Whether this job writes the Rust target cache
required: false
default: "false"
cache-workspace-crates:
description: Retain workspace build artifacts as well as dependencies
required: false
default: "false"

outputs:
cache-hit:
Expand All @@ -21,19 +25,58 @@
runs:
using: composite
steps:
- name: Configure shared sccache on GKE runners
if: ${{ runner.environment == 'self-hosted' && (startsWith(runner.name, 'openshell-ci-amd64-') || startsWith(runner.name, 'openshell-ci-arm64-')) }}
shell: nix develop -c bash -euo pipefail {0}
run: |
mise install --locked github:mozilla/sccache
sccache_bin=$(mise which sccache)
dirname "$sccache_bin" >> "$GITHUB_PATH"
{
echo "RUSTC_WRAPPER=$sccache_bin"
echo "SCCACHE_MEMCACHED_ENDPOINT=tcp://memcached.sccache:11211"
echo "SCCACHE_BASEDIRS=$GITHUB_WORKSPACE"
} >> "$GITHUB_ENV"

- name: Hash Nix development shell
id: dev-shell
shell: bash
run: |
shell_drv=$(nix eval --raw --impure .#devShells --apply 'shells: shells.${builtins.currentSystem}.default.drvPath')
echo "hash=$(nix hash file --type sha256 --base16 "$shell_drv")" >> "$GITHUB_OUTPUT"

- name: Configure persistent Cargo target directory
id: persistent-cache
shell: bash
env:
NIX_SHELL_HASH: ${{ steps.dev-shell.outputs.hash }}
run: |
set -euo pipefail
# Pod environment is visible to the shell, not the workflow env context.
if [[ -z "${OPENSHELL_PERSISTENT_CACHE:-}" ]]; then
exit 0
fi
echo "enabled=true" >> "$GITHUB_OUTPUT"
test "$GITHUB_REPOSITORY" = ai-openshell/openshell
test "$OPENSHELL_PERSISTENT_CACHE" = /mnt/ci-cache
mountpoint -q "$OPENSHELL_PERSISTENT_CACHE"
cache_root="$OPENSHELL_PERSISTENT_CACHE/ai-openshell-openshell/$NIX_SHELL_HASH"
mkdir -p "$cache_root/target"
echo "CARGO_TARGET_DIR=$cache_root/target" >> "$GITHUB_ENV"
echo "Persistent cache lane: $OPENSHELL_CACHE_LANE"
echo "Runner pod: $RUNNER_NAME"
echo "Target directory: $cache_root/target"
du -sh "$cache_root/target"
df -h "$cache_root/target"
Comment on lines +53 to +70

- name: Cache Rust target and registry
if: ${{ steps.persistent-cache.outputs.enabled != 'true' }}
id: cache
uses: Swatinem/rust-cache@6a7bc3ebce750e0a16a430dd57485acfdb38b05f
with:
shared-key: ${{ inputs.cache-key }}-${{ steps.dev-shell.outputs.hash }}
save-if: ${{ inputs.save-cache }}
cache-on-failure: ${{ inputs.save-cache }}
cache-bin: "false"
cache-workspace-crates: ${{ inputs.cache-workspace-crates }}
cmd-format: nix develop -c {0}
Loading
Loading