Repository navigation
76 lines (76 loc) · 2.75 KB
/
Copy pathbrowser-capture.yml
File metadata and controls
76 lines (76 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: amended original native browser capture
on:
workflow_dispatch:
inputs:
source_sha:
description: Frozen amended source commit
required: true
permissions:
contents: read
actions: read
concurrency:
group: amended-browser-capture-${{ github.ref }}
cancel-in-progress: false
jobs:
capture:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Prospectively bounded amendment and source admission
env:
EXPECTED_SOURCE: ${{ inputs.source_sha }}
run: |
python3 - <<'PY'
import hashlib,json,os,time
from pathlib import Path
rule=json.loads(Path('config/browser-capture-amendment-v1.json').read_text())
assert os.environ['GITHUB_SHA']==os.environ['EXPECTED_SOURCE']
assert int(os.environ['GITHUB_RUN_NUMBER'])<=rule['maximum_ci_executions']
assert int(os.environ['GITHUB_RUN_ATTEMPT'])==1
assert time.time()<rule['deadline_unix']<rule['parent_deadline_unix']
for name,digest in rule['source_files'].items():
assert hashlib.sha256(Path(name).read_bytes()).hexdigest()==digest,name
PY
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Pinned independent and actual browser dependencies
timeout-minutes: 4
run: |
python -m pip install numpy==2.2.6 chess==1.11.2
npm ci --ignore-scripts
npm run build
npx playwright install --with-deps chromium
- name: Linux portability native image
if: runner.os == 'Linux'
timeout-minutes: 3
run: |
cmake -S . -B build-browser-capture -DCMAKE_BUILD_TYPE=Release
cmake --build build-browser-capture --target caissa -j 2
- name: Original failed capture inspection and corrected real browser verification
timeout-minutes: 8
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
if test "$RUNNER_OS" = 'macOS'; then
python -m tests.browser_capture --engine results/saved-v4-runtime-inputs/caissa --output runs/g12-capture-amendment
else
python -m tests.browser_capture --engine build-browser-capture/caissa --output runs/g12-capture-amendment
fi
- uses: actions/upload-artifact@v4
if: always()
with:
name: amended-browser-capture-${{ matrix.os }}
path: |
runs/g12-capture-amendment/
!runs/g12-capture-amendment/original-failed-macos.zip
retention-days: 14