chore: keep Shanhe as a source archive without CI
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
.git
|
||||
node_modules
|
||||
.codex
|
||||
.claude
|
||||
.cache
|
||||
dist
|
||||
artifacts
|
||||
data
|
||||
__pycache__
|
||||
**/__pycache__
|
||||
*.log
|
||||
.env
|
||||
.env.*
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Shanhe source and offline package checks
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
concurrency:
|
||||
group: shanhe-${{ gitea.event.pull_request.number || gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ces-control
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check patch formatting
|
||||
run: git diff --check HEAD^ HEAD
|
||||
- name: Build isolated verification image
|
||||
run: docker build -f Dockerfile.ci -t "shanhe-check:${{ gitea.sha }}" .
|
||||
- name: Verify unit tests and offline package
|
||||
run: docker run --rm "shanhe-check:${{ gitea.sha }}"
|
||||
- name: Remove this verification image while retaining parent cache
|
||||
if: always()
|
||||
run: |
|
||||
image="shanhe-check:${{ gitea.sha }}"
|
||||
if docker image inspect "$image" >/dev/null 2>&1; then docker image rm --no-prune "$image"; fi
|
||||
@@ -1,8 +0,0 @@
|
||||
FROM node:24-bookworm
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3 ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN python3 scripts/prepare-ci-audit.py
|
||||
CMD ["sh", "-c", "npm test && npm run build"]
|
||||
@@ -273,6 +273,3 @@ npm run build
|
||||
|
||||
测试覆盖直接全量正向、保持位置/平移速度、不调用碰撞试算、新块与之后自由转动、无后台重试、贴地不挪动、暂停/结束/尺寸变化以及真实湖北/成都多轮晃动的物理推进。历史章节中的自动模式仅为先前版本记录,以本节和当前源码为准。
|
||||
|
||||
## 远程源码同步检查
|
||||
|
||||
Gitea 的 `verify.yml` 在已确认的 `ces-control` 上通过 Docker 执行单元测试、离线构建、地图完整性及打包审计。官方 1.8.0 审计器由 CI 从官方地址读取并核对固定 SHA-256;本机 `.codex`、缓存和旧构建产物不进入镜像。依赖未变时复用安装层,检查镜像清理保留父层缓存。浏览器、创服模拟器与真机验证不由这项 CI 代替。
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
"""Install only the pinned official package auditor inside the remote CI image."""
|
||||
import hashlib
|
||||
import io
|
||||
from pathlib import Path
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
url = 'https://fe-static.xhscdn.com/minitool/20261015161653/minitool-zip-builder-1.8.0.skill'
|
||||
with urllib.request.urlopen(url, timeout=120) as response:
|
||||
archive = zipfile.ZipFile(io.BytesIO(response.read()))
|
||||
matches = [name for name in archive.namelist() if name.endswith('scripts/audit_artifact.py')]
|
||||
if len(matches) != 1:
|
||||
raise SystemExit('Official auditor missing or ambiguous')
|
||||
content = archive.read(matches[0])
|
||||
if hashlib.sha256(content).hexdigest() != '62ff11eae1d5bb566a6f74b0fa102fe2eb3ffe982b87596aca2f93485cc9de21':
|
||||
raise SystemExit('Official auditor changed; review before updating the pinned checksum')
|
||||
target = Path('.codex/skills/minitool-zip-builder/scripts/audit_artifact.py')
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_bytes(content)
|
||||
Reference in New Issue
Block a user