Repository navigation
Keep bounded WAAPI state within native document footprint budget #558
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native Linux document contracts | |
| on: | |
| push: | |
| branches: [codex/linux-headless-platform] | |
| paths: | |
| - 'src/WebScene.NativeWeb/**' | |
| - 'src/WebScene.Sdk/**' | |
| - 'experiments/WebScene.NativeEngine.Probe/native/**' | |
| - 'tooling/webscene-uic/**' | |
| - 'tests/NativeWeb/**' | |
| - 'tests/SDKLinux/**' | |
| - 'scripts/prepare_runner_disk.py' | |
| - 'scripts/tests/test_prepare_runner_disk.py' | |
| - '.github/workflows/native-linux.yml' | |
| pull_request: | |
| paths: | |
| - 'src/WebScene.NativeWeb/**' | |
| - 'src/WebScene.Sdk/**' | |
| - 'experiments/WebScene.NativeEngine.Probe/native/**' | |
| - 'tooling/webscene-uic/**' | |
| - 'tests/NativeWeb/**' | |
| - 'tests/SDKLinux/**' | |
| - 'scripts/prepare_runner_disk.py' | |
| - 'scripts/tests/test_prepare_runner_disk.py' | |
| - '.github/workflows/native-linux.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| contracts: | |
| runs-on: [self-hosted, Linux, X64] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Reclaim stale runner temporary data | |
| shell: bash | |
| run: | | |
| python3 scripts/prepare_runner_disk.py "$RUNNER_TEMP" --system-temp /tmp --minimum-free-bytes 6442450944 | |
| job_tmp="$RUNNER_TEMP/webscene-job-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${GITHUB_JOB//[^A-Za-z0-9_.-]/_}" | |
| mkdir -p "$job_tmp" | |
| echo "TMPDIR=$job_tmp" >> "$GITHUB_ENV" | |
| echo "WEBSCENE_JOB_TMP=$job_tmp" >> "$GITHUB_ENV" | |
| - name: Diagnose constrained runner filesystem | |
| if: failure() | |
| timeout-minutes: 2 | |
| shell: bash | |
| run: | | |
| df -B1 / /tmp "$RUNNER_TEMP" | |
| sudo du -B1 --max-depth=1 /tmp 2>/dev/null | sort -nr | head -20 || true | |
| sudo fuser -vm /tmp 2>&1 | head -40 || true | |
| sudo du -x -B1 --max-depth=1 /var /home/danw 2>/dev/null | sort -nr | head -30 || true | |
| if command -v docker >/dev/null 2>&1; then | |
| sudo docker system df || true | |
| fi | |
| if command -v lsof >/dev/null 2>&1; then | |
| sudo lsof -nP +L1 2>/dev/null | | |
| awk '$NF == "(deleted)" && $(NF-1) ~ /^\/tmp\// { key=$1 ":" $2; bytes[key]+=$7 } END { for (key in bytes) print bytes[key], key }' | | |
| sort -nr | head -30 || true | |
| fi | |
| - name: Install pinned build tools | |
| run: | | |
| sudo flock /var/lock/webscene-apt.lock bash -c ' | |
| apt-get clean | |
| apt-get update | |
| apt-get install -y ninja-build patchelf | |
| ' | |
| python3 -m pip install --break-system-packages 'cmake==3.31.6' | |
| - name: Install checksum-pinned LLVM | |
| run: | | |
| llvm_root="$HOME/.cache/webscene/llvm-22.1.1-immutable-v3" | |
| python3 eng/sdk/install-linux-llvm.py "$llvm_root" | |
| echo "WEBSCENE_LLVM_ROOT=$llvm_root" >> "$GITHUB_ENV" | |
| echo "$llvm_root/bin" >> "$GITHUB_PATH" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: native-linux-cargo-${{ hashFiles('experiments/WebScene.NativeEngine.Probe/native/html_parser/Cargo.lock') }} | |
| - name: Build and run original native document/compiler contracts | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cmake -G Ninja -S src/WebScene.NativeWeb -B artifacts/native-linux -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER="$WEBSCENE_LLVM_ROOT/bin/clang++" -DWEBSCENE_NATIVE_WEB_GPU=OFF | |
| cmake --build artifacts/native-linux --parallel 2 2>&1 | tee artifacts/native-linux-build.log | |
| ctest --test-dir artifacts/native-linux --output-on-failure --output-junit native-linux-tests.xml 2>&1 | tee artifacts/native-linux-tests.log | |
| - name: Build independent native-only Linux SDK without optional graphics | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cmake -G Ninja -S src/WebScene.Sdk -B artifacts/native-sdk -DCMAKE_BUILD_TYPE=Release -DWEBSCENE_SDK_WEBGPU=OFF -DCMAKE_TOOLCHAIN_FILE="$PWD/src/WebScene.Sdk/cmake/WebSceneToolchain.cmake" -DCMAKE_INSTALL_PREFIX="$PWD/artifacts/sdk" | |
| cmake --build artifacts/native-sdk --parallel 2 2>&1 | tee artifacts/native-sdk-build.log | |
| cmake --install artifacts/native-sdk | |
| python3 eng/sdk/stage-linux-runtime.py --llvm "$WEBSCENE_LLVM_ROOT" --sdk artifacts/sdk | |
| cmake -G Ninja -S tests/SDKLinux -B artifacts/native-sdk-consumer -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$PWD/src/WebScene.Sdk/cmake/WebSceneToolchain.cmake" -DCMAKE_PREFIX_PATH="$PWD/artifacts/sdk" -DWEBSCENE_TEST_WEBGPU=OFF | |
| cmake --build artifacts/native-sdk-consumer --parallel 2 2>&1 | tee artifacts/native-sdk-consumer-build.log | |
| ctest --test-dir artifacts/native-sdk-consumer --output-on-failure --output-junit installed-sdk-tests.xml 2>&1 | tee artifacts/native-sdk-consumer-tests.log | |
| tar -czf artifacts/native-linux-sdk-no-gpu.tar.gz -C artifacts sdk | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: native-linux-contract-evidence | |
| path: | | |
| artifacts/*.log | |
| artifacts/native-linux/native-linux-tests.xml | |
| artifacts/native-linux/Testing/Temporary/ | |
| artifacts/native-linux-sdk-no-gpu.tar.gz | |
| artifacts/native-sdk-consumer/compiled_native | |
| artifacts/native-sdk-consumer/installed-sdk-tests.xml | |
| artifacts/native-sdk-consumer/Testing/Temporary/ | |
| retention-days: 14 | |
| - name: Release job temporary data | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ -n "${WEBSCENE_JOB_TMP:-}" ]]; then | |
| rm -rf -- "$WEBSCENE_JOB_TMP" | |
| fi |