Skip to content
Merged
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
20 changes: 20 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ The current local runner is `chris-mac-codex-release-1`. It must have Rust,
Python 3, Xcode command line tools, and macOS `ditto` available. The generated
Codex Lab app artifact is currently unsigned.

### Developer Artifacts Volume

High-churn runner data should live under `/Volumes/Developer-Artifacts` when
that volume is mounted. Keep the layout stable and purpose-based so future
builds, local automation, and cleanup scripts can share the volume without
guessing what owns each path:

- `/Volumes/Developer-Artifacts/github-actions/runners/` for self-hosted runner
installations.
- `/Volumes/Developer-Artifacts/github-actions/cache/` for reusable caches that
should survive checkout cleanup.
- `/Volumes/Developer-Artifacts/github-actions/tmp/` for disposable workflow
scratch data that can be removed without losing build acceleration.

Workflow-specific caches should add owner/repo and workflow leaves under
`github-actions/cache/`. For example, `codex-lab-app.yml` uses
`/Volumes/Developer-Artifacts/github-actions/cache/<owner>/<repo>/codex-lab-app/`
as its Cargo target cache root on self-hosted runners, falling back to Cargo's
default target directory when the artifact volume is unavailable.

## Codex Lab Distribution Contract

`codex-lab-app.yml` uploads these files in one artifact:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/codex-lab-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ jobs:

- uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0

- name: Use persistent artifact-volume build cache
shell: bash
run: |
set -euo pipefail
if [ "${RUNNER_ENVIRONMENT:-}" = "self-hosted" ] && [ -d /Volumes/Developer-Artifacts ]; then
cache_root="/Volumes/Developer-Artifacts/github-actions/cache/${GITHUB_REPOSITORY}/codex-lab-app"
target_dir="${cache_root}/cargo-target-aarch64-apple-darwin-release"
mkdir -p "$target_dir"
echo "CARGO_TARGET_DIR=$target_dir" >> "$GITHUB_ENV"
echo "CODEX_LAB_BIN=$target_dir/release/codex-lab" >> "$GITHUB_ENV"
echo "Using persistent artifact-volume target cache: $target_dir"
else
echo "CODEX_LAB_BIN=codex-rs/target/release/codex-lab" >> "$GITHUB_ENV"
echo "Using default Cargo target directory"
fi

- name: Build Codex Lab CLI
working-directory: codex-rs
shell: bash
Expand All @@ -52,7 +68,7 @@ jobs:
lab_version="$(PYTHONPATH=scripts python3 -c 'from codex_package.version import read_workspace_version; print(read_workspace_version())')"
mkdir -p "$output_root"
python3 scripts/build_codex_lab_app.py \
--codex-bin codex-rs/target/release/codex-lab \
--codex-bin "$CODEX_LAB_BIN" \
--app-dir "$app_dir" \
--shim-dir "$shim_dir" \
--short-version "$lab_version" \
Expand Down
Loading