Repository navigation
60 lines (54 loc) · 2.61 KB
/
Copy pathclock.yml
File metadata and controls
60 lines (54 loc) · 2.61 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
name: Clock gates
# agent-env's libfaketime (src/agent_env/computers/clock), the library every computer's session programs load to read
# universe time, built with stock 0.9.12 beside it in an Ubuntu 24.04 image and run through tst/clock's gates on x86_64
# and arm64: every wait API in C, Python, Java and Node at several rates, jumps, cancelled waits, timerfd duplicates,
# condvar and semaphore stress, the waits again with futex_waitv refused, a stalled writer and a dead one, torn page
# reads, the marker, the environment race, the TLS shim and Chromium launches. It runs on pull requests that touch the
# library, its tier or Chrome's pin, weekly, and on demand; it isn't a required check.
on:
pull_request:
paths:
- "src/agent_env/computers/clock/**"
- "src/agent_env/browsers/envs/chromium/chromium.py"
- "tst/clock/**"
- ".github/workflows/clock.yml"
schedule:
- cron: "41 6 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: clock-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
AGENTENV_TEST_CLOCK_CACHE: ${{ github.workspace }}/.clock-downloads
jobs:
gates:
name: gates (${{ matrix.arch }})
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Install from uv.lock
run: |
python -m pip install --quiet -r .github/ci-requirements.txt
uv sync --locked --extra dev --python "$(command -v python)"
# Chrome's archive and the tarballs, checked by sha256 when the tier uses them; a new pin is a new key.
- name: Downloads
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.AGENTENV_TEST_CLOCK_CACHE }}
key: clock-downloads-${{ matrix.arch }}-${{ hashFiles('src/agent_env/browsers/envs/chromium/chromium.py', 'src/agent_env/computers/clock/build.sh', 'tst/clock/conftest.py') }}
- name: Clock gates
run: .venv/bin/python -m pytest tst/clock -rA --timeout=2400 --junitxml=junit-clock-${{ matrix.arch }}.xml
- name: No skips
if: always()
run: .venv/bin/python .github/scripts/check_skip_policy.py junit-clock-${{ matrix.arch }}.xml