Files
lean-bench/.gitea/workflows/runner-probe.yml
T
codex-bot c3025567c8
runner-probe / probe (push) Failing after 1m7s
ci: inspect persistent storage for uploaded book
2026-09-23 22:30:27 +08:00

81 lines
2.6 KiB
YAML

name: runner-probe
on:
push:
branches: [main]
paths:
- ".gitea/workflows/runner-probe.yml"
workflow_dispatch:
jobs:
probe:
runs-on: gitea-cicd-server-for-CODEX
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Identify the runner
run: |
set -eu
echo "runner=${RUNNER_NAME:-unknown}"
echo "labels=${RUNNER_LABELS:-unknown}"
uname -a
id
df -h /
- name: Check Docker and the persistent service
run: |
set -eu
if ! command -v docker >/dev/null 2>&1; then
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker.io
fi
docker version --format 'client {{.Client.Version}} / server {{.Server.Version}}'
docker ps -a --format 'container={{.Names}} status={{.Status}} image={{.Image}}'
docker volume ls --format 'volume={{.Name}}'
- name: Find the uploaded Iowa algebra PDF
run: |
set -eu
target=uiowa-algebra.pdf
found=0
for root in "$GITHUB_WORKSPACE" /books /data /srv /opt /workspace; do
if [ -d "$root" ]; then
while IFS= read -r path; do
[ -n "$path" ] || continue
found=1
echo "FOUND host:$path"
stat -c 'size=%s bytes modified=%y' "$path" 2>/dev/null || ls -lh "$path"
sha256sum "$path" 2>/dev/null || true
done <<EOF
$(find "$root" -maxdepth 5 -type f -name "$target" 2>/dev/null || true)
EOF
fi
done
if command -v docker >/dev/null 2>&1; then
if docker ps -a --format '{{.Names}}' | grep -qx lean-bench; then
if docker exec lean-bench test -f "/books/$target"; then
found=1
echo "FOUND container:lean-bench:/books/$target"
docker exec lean-bench sh -c "ls -lh '/books/$target'; sha256sum '/books/$target'"
fi
fi
if docker volume inspect lean-bench-books >/dev/null 2>&1; then
if docker run --rm -v lean-bench-books:/books:ro node:16-bullseye \
test -f "/books/$target"; then
found=1
echo "FOUND volume:lean-bench-books:$target"
docker run --rm -v lean-bench-books:/books:ro node:16-bullseye \
sh -c "ls -lh '/books/$target'; sha256sum '/books/$target'"
fi
fi
fi
if [ "$found" -eq 0 ]; then
echo "NOT_FOUND: $target"
exit 2
fi