Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
991d2f4e91 | ||
|
|
e05d336d2c |
@@ -2,39 +2,27 @@ name: isolated-cache-transport-probe
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ci/cache-transport-ce586c48237f0282cf71]
|
||||
branches: [ci/prepared-env-c21408b93fc1c68e75a7]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
save:
|
||||
if: github.server_url != 'https://github.com' && github.event_name == 'push'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Prepare unique synthetic content
|
||||
run: |
|
||||
set -eu
|
||||
dir="$RUNNER_TEMP/aego-cache-probe-ce586c48237f0282cf71"
|
||||
test -n "$RUNNER_TEMP" && test ! -e "$dir" && test ! -L "$dir"
|
||||
mkdir -m 700 "$dir"
|
||||
printf '%s\n' 'aego-cache-synthetic-f2df9f37f3bce8282aef3d771631a4edb531565e735babd0' > "$dir/value.txt"
|
||||
- name: Save synthetic cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/aego-cache-probe-ce586c48237f0282cf71
|
||||
key: aego-probe-ce586c48237f0282cf71
|
||||
|
||||
restore:
|
||||
needs: save
|
||||
if: ${{ always() && github.server_url != 'https://github.com' && (github.event_name == 'workflow_dispatch' || needs.save.result == 'success') }}
|
||||
if: github.server_url != 'https://github.com'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 20
|
||||
container:
|
||||
image: sha256:3fbc899075feac5abe75f2f473d5dcb5ab2e1768f55b90a2bc83dcd4c62338f3
|
||||
image: git.akarpov.ru/sanspie/aego-ci-env@sha256:333d35cd33c2813e4a4ed9c1499344e036d3c67b5e0818da87ad5717d1e14d50
|
||||
options: --memory=3g --memory-swap=3g --cpus=2 --shm-size=1g
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
env:
|
||||
AEGO_CI_PREPARED: '1'
|
||||
GOTELEMETRY: 'off'
|
||||
PYTHONDONTWRITEBYTECODE: '1'
|
||||
steps:
|
||||
- name: Require a fresh restore directory
|
||||
run: |
|
||||
@@ -65,6 +53,7 @@ jobs:
|
||||
export GOTELEMETRY=off PYTHONDONTWRITEBYTECODE=1
|
||||
python3 -B tools/ci/prepare_ci_workspace.py --root "$PWD"
|
||||
python3 -B tools/ci/env/preflight.py --root "$PWD"
|
||||
python3 -B tools/ci/prepare_ci_workspace.py --root "$PWD"
|
||||
python3 -B tools/ci/prepared_web_deps.py --root "$PWD"
|
||||
python3 -B tools/ci/staticcheck_runner.py v0.8.2 -- -version
|
||||
make bootstrap
|
||||
|
||||
@@ -17,6 +17,8 @@ tools/genicons/genicons
|
||||
|
||||
/tests/golden/testdata/actual-*
|
||||
tools/websmoke/node_modules/
|
||||
# Prepared CI uses a link to the same generated dependency directory.
|
||||
tools/websmoke/node_modules
|
||||
/tools/websmoke/__pycache__/
|
||||
tools/websmoke/golden/actual-*.png
|
||||
|
||||
|
||||
Vendored
+3
@@ -45,6 +45,9 @@ RUN cd /opt/aego/seed && GOOS=linux GOARCH=amd64 bash tools/bootstrap-native.sh
|
||||
COPY tools/websmoke/package.json tools/websmoke/package-lock.json /opt/aego/websmoke/
|
||||
RUN cd /opt/aego/websmoke && npm ci --no-audit --no-fund
|
||||
|
||||
# Match the standard runner's cache compression so cache versions agree.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends zstd && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY tools/ci/env/Dockerfile tools/ci/env/lock.json tools/ci/env/preflight.py tools/ci/env/browser_smoke.py /opt/aego/ci-env/
|
||||
RUN python3 -B /opt/aego/ci-env/preflight.py --image-only && \
|
||||
timeout --kill-after=10s 180s xvfb-run -a -s '-screen 0 1440x1050x24' \
|
||||
|
||||
Vendored
+2
-2
@@ -23,9 +23,9 @@
|
||||
"tools/bootstrap-native.sh": "15e1d2ce94b202c2749c435d59f643ca2b65fe98e78721df56c34c6bbccc0feb",
|
||||
"tools/websmoke/package.json": "9b18d33742f7910d102461aa5fa71a00c7620735eff8f61ca1cb93311cf06f57",
|
||||
"tools/websmoke/package-lock.json": "7bd9077253747fbf7c37b03ee55417424aee9d70f69178bddbb7cf8087cc6e49",
|
||||
"tools/ci/env/Dockerfile": "85a49c2077409ce50b1cc9cb45e9f1c9e98e2fe83c3a3f695826caf5e5a68eb4",
|
||||
"tools/ci/env/Dockerfile": "de3f42cd7fa0df3cacc461643aaacbd00545675f8ed881aedef4a2f672bbb2f3",
|
||||
"tools/ci/env/requirements.txt": "1e5241a3542bf595bc535d99138407f142b09f3240639c9354bf209653179639",
|
||||
"tools/ci/env/preflight.py": "83f13da0952b0afc28b20dcc5433aa963c132df4cec7a58f497f4748573e0a2c",
|
||||
"tools/ci/env/preflight.py": "fe6b26d707f813b18357052d4b8aca88c9c4d737caad39ec8d7e540bd8f84fe1",
|
||||
"tools/ci/env/browser_smoke.py": "b84e7af01a64384276365195f4a45d0a1f954f2a5abbab84f57b7ba9c1046527"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
-1
@@ -34,7 +34,7 @@ APT_PACKAGES = (
|
||||
'libwayland-dev', 'wayland-protocols', 'libdecor-0-dev',
|
||||
'libasound2-dev', 'libpulse-dev', 'libdrm-dev', 'libgbm-dev', 'libudev-dev',
|
||||
'libdbus-1-dev', 'libibus-1.0-dev', 'glslang-tools',
|
||||
'fonts-dejavu-core', 'fonts-liberation', 'nsis', 'squashfs-tools',
|
||||
'fonts-dejavu-core', 'fonts-liberation', 'nsis', 'squashfs-tools', 'zstd',
|
||||
)
|
||||
|
||||
|
||||
@@ -140,7 +140,14 @@ def check_apt(lock):
|
||||
return installed
|
||||
|
||||
|
||||
def check_cache_tools():
|
||||
for name in ('zstd', 'zstdmt'):
|
||||
if not shutil.which(name):
|
||||
fail('missing required cache compression tool: ' + name)
|
||||
|
||||
|
||||
def check_tools(lock):
|
||||
check_cache_tools()
|
||||
expected = lock['tools']
|
||||
require(os.environ.get('GOTOOLCHAIN'), 'local', 'GOTOOLCHAIN')
|
||||
require(os.environ.get('PLAYWRIGHT_BROWSERS_PATH'), '/ms-playwright', 'PLAYWRIGHT_BROWSERS_PATH')
|
||||
|
||||
@@ -38,11 +38,15 @@ def file_hash(path):
|
||||
return digest.hexdigest()
|
||||
|
||||
|
||||
def fail_walk(error):
|
||||
raise error
|
||||
|
||||
|
||||
def native_tree(root):
|
||||
if root.is_symlink() or not root.is_dir():
|
||||
raise ValueError('native SDL prefix is missing or linked')
|
||||
records = []
|
||||
for directory, dirs, files in os.walk(root, followlinks=False):
|
||||
for directory, dirs, files in os.walk(root, followlinks=False, onerror=fail_walk):
|
||||
for name in sorted(dirs + files):
|
||||
path = Path(directory) / name
|
||||
info = path.lstat()
|
||||
|
||||
@@ -12,6 +12,10 @@ MAX_BYTES = 3 * 1024**3
|
||||
MIN_FREE_BYTES = 50 * 1024**3
|
||||
|
||||
|
||||
def fail_walk(error):
|
||||
raise error
|
||||
|
||||
|
||||
def assess(paths, max_bytes=MAX_BYTES, min_free=MIN_FREE_BYTES):
|
||||
roots = []
|
||||
for value in paths:
|
||||
@@ -31,7 +35,7 @@ def assess(paths, max_bytes=MAX_BYTES, min_free=MIN_FREE_BYTES):
|
||||
continue
|
||||
if shutil.disk_usage(root).free < min_free:
|
||||
return False, size, 'insufficient free storage'
|
||||
for directory, dirs, files in os.walk(root, followlinks=False):
|
||||
for directory, dirs, files in os.walk(root, followlinks=False, onerror=fail_walk):
|
||||
for name in dirs + files:
|
||||
path = Path(directory) / name
|
||||
info = path.lstat()
|
||||
|
||||
@@ -19,11 +19,15 @@ SPEC.loader.exec_module(PREFLIGHT)
|
||||
IMAGE = Path('/opt/aego')
|
||||
|
||||
|
||||
def fail_walk(error):
|
||||
raise error
|
||||
|
||||
|
||||
def tree(root):
|
||||
if root.is_symlink() or not root.is_dir():
|
||||
raise ValueError('expected a real SDL directory: ' + str(root))
|
||||
records = []
|
||||
for directory, dirs, files in os.walk(root, followlinks=False):
|
||||
for directory, dirs, files in os.walk(root, followlinks=False, onerror=fail_walk):
|
||||
for name in sorted(dirs + files):
|
||||
path = Path(directory) / name
|
||||
info = path.lstat()
|
||||
|
||||
Reference in New Issue
Block a user