Skip to content

Preserve navigated iframe WindowProxy messaging #1239

Preserve navigated iframe WindowProxy messaging

Preserve navigated iframe WindowProxy messaging #1239

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- name: Linux X64
runner: [self-hosted, Linux, X64]
- name: macOS ARM64
runner: [self-hosted, macOS, ARM64]
name: Build and test ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Reclaim stale Linux runner temporary data
if: runner.os == 'Linux'
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: Repair incomplete .NET install
shell: bash
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
run: python3 scripts/prepare_dotnet_install.py "$DOTNET_INSTALL_DIR"
- name: Setup .NET
uses: actions/setup-dotnet@v5
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
with:
dotnet-version: 8.0.x
global-json-file: global.json
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Expose the self-hosted Rust toolchain
if: runner.os == 'macOS'
shell: bash
run: |
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
"$HOME/.cargo/bin/cargo" --version
- name: Install Linux text-rendering fonts
if: runner.os == 'Linux'
shell: bash
run: |
sudo flock /var/lock/webscene-apt.lock bash -c '
apt-get clean
apt-get update
apt-get install -y fontconfig fonts-noto-color-emoji
'
fc-cache -f
- name: Select Xcode toolchain
if: runner.os == 'macOS'
shell: bash
run: |
set -euo pipefail
developer_dir=/Applications/Xcode.app/Contents/Developer
if [[ ! -d "$developer_dir" ]]; then
echo "Xcode is required for macOS native builds; Command Line Tools alone are not supported." >&2
exit 1
fi
echo "DEVELOPER_DIR=$developer_dir" >> "$GITHUB_ENV"
DEVELOPER_DIR="$developer_dir" xcrun clang --version
DEVELOPER_DIR="$developer_dir" xcrun --sdk macosx --show-sdk-path
- name: Restore
run: dotnet restore WebScene.sln
- name: Verify immutable GPU compatibility fixture
run: python tests/GraphicsCompatibility/prepare-kestrel.py
- name: Graphics evidence boundary checks
run: python -m unittest discover -s eng/graphics/tests -v
- name: Graphics reference workload and trace checks
run: node --test tests/GraphicsCompatibility/reference-tests.mjs
- name: CSS capability matrix contracts
run: |
python -m unittest scripts/test_css_capability_matrix.py -v
python scripts/css_capability_matrix.py --check
- name: CSS effective-property metadata contracts
run: |
python -m unittest scripts/test_css_property_metadata.py -v
python tools/generate_css_property_metadata.py --check
- name: Code OSS Web API ledger contracts
run: |
python -m unittest scripts/test_code_oss_web_api_ledger.py -v
python scripts/code_oss_web_api_ledger.py
- name: Runtime browser compatibility checks
run: node --test tests/RuntimeCompatibility/*.test.mjs
- name: Build Release
run: dotnet build WebScene.sln -c Release --no-restore
- name: Portable Core contracts
run: dotnet test tests/WebScene.Core.Tests/WebScene.Core.Tests.csproj -c Release --no-build
- name: Portable DOM contracts
run: dotnet test tests/WebScene.Dom.Tests/WebScene.Dom.Tests.csproj -c Release --no-build
- name: Portable CSS and layout contracts
run: dotnet test tests/WebScene.Css.Tests/WebScene.Css.Tests.csproj -c Release --no-build
- name: Portable graphics contracts
run: dotnet test tests/WebScene.Graphics.Tests/WebScene.Graphics.Tests.csproj -c Release --no-build
- name: Backend authoring contracts
run: dotnet test tests/WebScene.Backend.Abstractions.Tests/WebScene.Backend.Abstractions.Tests.csproj -c Release --no-build
- name: React and TypeScript SDK contracts
run: dotnet test tests/WebScene.Sdk.Tests/WebScene.Sdk.Tests.csproj -c Release --no-build
- name: Avalonia component host contracts
run: dotnet test tests/WebScene.Sdk.Avalonia.Tests/WebScene.Sdk.Avalonia.Tests.csproj -c Release --no-build
- name: Uno component host contracts
run: dotnet test tests/WebScene.Sdk.Uno.Tests/WebScene.Sdk.Uno.Tests.csproj -c Release --no-build
- name: TypeScript profile and bundler tooling
run: |
npm ci --prefix tooling/webscene
npm test --prefix tooling/webscene
- name: Build and test component assets
run: |
npm ci --prefix samples/components
npm run build --prefix samples/components
npm run check --prefix samples/components
npm test --prefix samples/components
- name: Architecture dependency gates
run: dotnet test tests/WebScene.Architecture.Tests/WebScene.Architecture.Tests.csproj -c Release --no-build
- name: Backend package smoke
run: dotnet run --project tests/WebScene.Backend.PackageSmoke/WebScene.Backend.PackageSmoke.csproj -c Release --no-build
- name: Avalonia headless tests
run: dotnet test tests/WebScene.Backend.Avalonia.Tests/WebScene.Backend.Avalonia.Tests.csproj -c Release --no-build
- name: WPT manifest integrity
run: dotnet run --project tests/WebPlatformSubset/runner/WebScene.WebPlatformSubset.Runner.csproj -c Release --no-build -- --selection all --list
- name: Native C++ portability build (without V8)
run: >-
cmake
-S experiments/WebScene.NativeEngine.Probe
-B artifacts/native-engine-portability
-DCMAKE_BUILD_TYPE=Release
-DWEBSCENE_NATIVE_ENGINE_ENABLE_V8=OFF
-DWEBSCENE_NATIVE_ENGINE_ENABLE_MEDIA=ON
-DWEBSCENE_NATIVE_ENGINE_CERTIFICATION=OFF
- name: Compile native C++ portability target
run: cmake --build artifacts/native-engine-portability --config Release --parallel
- name: Native media decode contracts
run: ctest --test-dir artifacts/native-engine-portability -C Release -R "webscene_(media_decode|audio_graph)_tests" --output-on-failure
- name: Release Linux job temporary data
if: always() && runner.os == 'Linux'
shell: bash
run: |
if [[ -n "${WEBSCENE_JOB_TMP:-}" ]]; then
rm -rf -- "$WEBSCENE_JOB_TMP"
fi
native-aot:
name: NativeAOT contracts ${{ matrix.rid }} Avalonia ${{ matrix.avalonia }}
strategy:
fail-fast: false
matrix:
include:
- os: [self-hosted, macOS, ARM64]
rid: osx-arm64
executable: WebScene.GpuHost.Probe
avalonia: 11
avalonia12Sample: false
- os: [self-hosted, macOS, ARM64]
rid: osx-arm64
executable: WebScene.GpuHost.Probe
avalonia: 12
avalonia12Sample: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Repair incomplete .NET install
shell: bash
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
run: python3 scripts/prepare_dotnet_install.py "$DOTNET_INSTALL_DIR"
- uses: actions/setup-dotnet@v5
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
with:
dotnet-version: 8.0.x
global-json-file: global.json
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Select Xcode toolchain
shell: bash
run: |
set -euo pipefail
developer_dir=/Applications/Xcode.app/Contents/Developer
if [[ ! -d "$developer_dir" ]]; then
echo "Xcode is required for macOS NativeAOT; Command Line Tools alone are not supported." >&2
exit 1
fi
echo "DEVELOPER_DIR=$developer_dir" >> "$GITHUB_ENV"
DEVELOPER_DIR="$developer_dir" xcrun clang --version
DEVELOPER_DIR="$developer_dir" xcrun --sdk macosx --show-sdk-path
- name: Publish NativeAOT with reflection JSON disabled
shell: bash
run: |
set -o pipefail
dotnet publish experiments/WebScene.GpuHost.Probe -c Release -r '${{ matrix.rid }}' \
-p:PublishAot=true -p:JsonSerializerIsReflectionEnabledByDefault=false \
-p:WebSceneAvalonia12Sample=${{ matrix.avalonia12Sample }} \
-o artifacts/aot-contracts 2>&1 | tee artifacts-aot-publish.log
python scripts/verify-aot-warnings.py artifacts-aot-publish.log
- name: Publish Aureon NativeAOT sample
if: matrix.avalonia == 12
shell: bash
run: |
set -o pipefail
dotnet publish experiments/WebScene.AureonStudio -c Release -r '${{ matrix.rid }}' \
-p:PublishAot=true -p:WebSceneAvalonia12Sample=true \
-o artifacts/aureon-aot 2>&1 | tee artifacts-aureon-publish.log
python scripts/verify-aot-warnings.py artifacts-aureon-publish.log
- name: Exercise checkpoint and archive contracts in native executable
shell: bash
run: ./artifacts/aot-contracts/${{ matrix.executable }} --aot-serialization-probe
- uses: actions/upload-artifact@v4
if: always()
with:
name: aot-contracts-${{ matrix.rid }}-avalonia-${{ matrix.avalonia }}
path: artifacts*-publish.log