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
17 changes: 15 additions & 2 deletions .github/workflows/beta-selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,23 @@ jobs:

- name: Python venv for the ASC client (idempotent)
if: steps.skip.outputs.skip != 'true'
# The venv is built only by this one pinned interpreter (Xcode's 3.9,
# what python3 resolves to on the runner PATH) and only from scratch
# (--clear). Re-running `venv` over an existing venv made by another
# Python leaves a mix (3.9 pyvenv.cfg, bin/python3 -> Homebrew 3.14)
# that dies when Homebrew moves its opt link. So: reuse the venv only
# if it runs and is on the pinned interpreter, else rebuild it.
run: |
set -euo pipefail
python3 -m venv "$HOME/.raymol-beta-venv"
"$HOME/.raymol-beta-venv/bin/pip" install -q --disable-pip-version-check PyJWT cryptography
PY=/usr/bin/python3
VENV="$HOME/.raymol-beta-venv"
want="$("$PY" -c 'import sys; print(sys.base_prefix)')"
have="$("$VENV/bin/python" -c 'import sys; print(sys.base_prefix)' 2>/dev/null || true)"
if [ "$have" != "$want" ]; then
echo "venv at $VENV is missing, broken or on another Python (${have:-none}); rebuilding with $PY ($want)"
"$PY" -m venv --clear "$VENV"
fi
"$VENV/bin/python" -m pip install -q --disable-pip-version-check PyJWT cryptography

- name: Next build number (max in App Store Connect + 1)
id: num
Expand Down
7 changes: 7 additions & 0 deletions docs/ci/selfhosted-beta-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ The `Keep logs` step uploads the full `archive.log`, `export.log` and
- **Side effects on puma:** `ci_post_clone.sh` runs `brew install` on a fixed
set of packages and turns off Xcode's plugin/macro fingerprint validation
through `defaults`. That setting also affects interactive Xcode use on puma.
- **The ASC client venv heals itself.** `~/.raymol-beta-venv` (PyJWT +
cryptography for the `asc_*.py` scripts) is always built by
`/usr/bin/python3`, Xcode's 3.9. Each run reuses it only if
`bin/python` starts and reports that same interpreter. Otherwise the run
rebuilds it with `venv --clear`. A Homebrew upgrade or an Xcode move
therefore costs one rebuild and no failed night. Never build this venv by
hand with another Python. If you do, the next run rebuilds it anyway.

## Troubleshooting

Expand Down
Loading