Files
Genarrative/scripts/check-gitea-ci-job-runtime.sh
kdletters 084543621b
Project CI / Repository checks (push) Successful in 1m48s
Project CI / Frontend tests (push) Successful in 2m16s
Project CI / Backend tests (push) Failing after 47s
Project CI / Native shell tests (push) Failing after 10m15s
优化AI游戏创作分支CI依赖准备
四个CI任务复用预构建工具链与下载缓存
直接从Gitea checkout并增加npm和Git网络重试
保留AI壳独立依赖安装测试与双Cargo锁门禁
2026-07-22 15:57:22 +08:00

40 lines
768 B
Bash

#!/usr/bin/env bash
set -euo pipefail
bwrap_args=(
--die-with-parent
--unshare-all
--unshare-user
--disable-userns
--assert-userns-disabled
--cap-drop ALL
--clearenv
--ro-bind /usr /usr
)
for merged_path in /bin /sbin /lib /lib64; do
if [[ -L "${merged_path}" ]]; then
bwrap_args+=(--symlink "$(readlink "${merged_path}")" "${merged_path}")
fi
done
bwrap_args+=(
--proc /proc
--dev /dev
--tmpfs /tmp
--
/usr/bin/true
)
bwrap "${bwrap_args[@]}"
chrome_output="$(
timeout 30 google-chrome \
--headless=new \
--no-sandbox \
--disable-dev-shm-usage \
--disable-gpu \
--dump-dom \
'data:text/html,<title>genarrative-ci</title>' \
2>/dev/null
)"
rg -q '<title>genarrative-ci</title>' <<< "${chrome_output}"