Skip to content

Add offline whole-node epoch upgrade and safe file reads #51

Add offline whole-node epoch upgrade and safe file reads

Add offline whole-node epoch upgrade and safe file reads #51

Workflow file for this run

name: Benchmarks
on:
push:
branches: [main]
workflow_dispatch:
permissions: {contents: read, actions: read}
concurrency:
group: keyload-benchmarks-${{ github.ref }}
cancel-in-progress: false
jobs:
comparison-build:
name: Build and check KeyLoad
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
- name: Restore .NET packages
run: dotnet restore KeyLoad.slnx
- name: Build KeyLoad
run: dotnet build KeyLoad.slnx --no-restore --configuration Release
- name: Check code formatting
run: dotnet format KeyLoad.slnx --verify-no-changes --no-restore
- name: Check repository rules
run: node scripts/Features/RepositoryGovernance/verify.mjs
- name: Save build diagnostics
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: code-quality-comparisons
path: artifacts/code-quality/**
if-no-files-found: error
comparison-plan:
name: Plan benchmark runs
if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
crud: ${{ steps.plan.outputs.crud_matrix }}
specialized: ${{ steps.plan.outputs.specialized_matrix }}
preflight: ${{ steps.plan.outputs.preflight_matrix }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Plan all benchmark scenarios
id: plan
run: node scripts/Features/BenchmarkComparisons/isolated-plan.mjs --output="$RUNNER_TEMP/isolated-plan.json" --github-output="$GITHUB_OUTPUT"
- name: Save benchmark plan
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-plan
path: ${{ runner.temp }}/isolated-plan.json
if-no-files-found: error
retention-days: 90
comparison-images:
name: Build Docker images
if: github.repository == 'managedcode/KeyLoad' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 120
permissions: {contents: read, actions: read}
outputs:
bundle-artifact-id: ${{ steps.bundle.outputs.artifact-id }}
env:
GH_TOKEN: ${{ github.token }}
KEYLOAD_COMPARISON_JOB_NAME: Build Docker images
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68
with:
global-json-file: global.json
- name: Check Docker
run: docker version
- name: Restore .NET packages
run: dotnet restore KeyLoad.slnx
- name: Build benchmark tests
id: benchmark-build
run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release
- name: Build benchmark preparation unit tests
run: dotnet build tests/KeyLoad.UnitTests --no-restore --configuration Release
- name: Check bounded Docker registry readiness
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=unit '--KeyLoadTests:Filter=/*/*/ImageRegistryReadinessTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/registry-readiness
- name: Check website evidence startup
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=unit '--KeyLoadTests:Filter=/*/*/SiteQualificationStartupTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/site-startup
- name: Build KeyLoad server and benchmark Docker images
id: images
run: node scripts/Features/BenchmarkComparisons/prepare-images.mjs
- name: Configure Docker image references
env:
KEYLOAD_SERVER_IMAGE: ${{ steps.images.outputs.server-image }}
KEYLOAD_RUNNER_IMAGE: ${{ steps.images.outputs.load-generator-image }}
run: |
test -n "$KEYLOAD_SERVER_IMAGE" && test -n "$KEYLOAD_RUNNER_IMAGE"
printf 'KeyLoad__ContainerImages__Server=%s\nBenchmarks__ContainerImages__LoadGenerator=%s\nKEYLOAD_IMAGE_RECEIPT=%s\n' "$KEYLOAD_SERVER_IMAGE" "$KEYLOAD_RUNNER_IMAGE" "$RUNNER_TEMP/keyload-images/image-receipt.json" >> "$GITHUB_ENV"
- name: Check native KurrentDB discovery settings
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedKurrentDiscoverySettingsTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/kurrent-discovery
- name: Check exact OpenSearch vector query contract
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/OpenSearchVectorQueryTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/opensearch-query
- name: Check exact OpenSearch vector response contract
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/OpenSearchVectorResponseTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/opensearch-response
- name: Check TimescaleDB Docker image and startup tools
env:
KEYLOAD_TIMESERIES_IMAGE_FACTS_DIRECTORY: ${{ runner.temp }}/keyload-timeseries-image-facts
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/TimeSeriesIntensivePinnedImageTests/*' --KeyLoadTests:ResultsDirectory=TestResults/timeseries-image
- name: Save TimescaleDB image checks
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: timeseries-native-pinned-image-facts
path: |
${{ runner.temp }}/keyload-timeseries-image-facts/**
**/TestResults/**
artifacts/code-quality/**
if-no-files-found: error
retention-days: 90
- name: Check Docker image export and import
id: roundtrip
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/ImageBundleRealTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/image-roundtrip
- name: Verify GitHub job identity
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedGitHubCurrentJobTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/job-identity
- name: Test database cluster resource models
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/Isolated*Resource*/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/resource-models
- name: Test MongoDB readiness configuration
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/MongoReadinessResourceTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/mongo-resource
- name: Test MongoDB node identity
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/MongoReadinessIdentityTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/mongo-identity
- name: Test MongoDB startup failure handling
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/MongoReadinessTaskFailureTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/mongo-task-failure
- name: Test KurrentDB storage failure handling
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedKurrentVolumeRegressionFailureTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/kurrent-volume-failure
- name: Test KeyLoad request admission
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedKeyLoadAdmissionTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/keyload-admission
- name: Test bounded database log buffers
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/ComparisonResourceLogBufferTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/log-buffer
- name: Test KeyLoad replay admission
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedKeyLoadReplayAdmissionTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/replay-admission
- name: Test Redis replica error reporting
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/RedisReplicaDiagnosticTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/redis-diagnostics
- name: Test MongoDB startup error reporting
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/MongoBootstrapDiagnosticTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/mongo-diagnostics
- name: Test KurrentDB cleanup error reporting
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/KurrentCleanupDiagnosticTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/kurrent-diagnostics
- name: Test KurrentDB stream ownership
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/KurrentStreamOwnershipTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/kurrent-stream-ownership
- name: Test database replay logs
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/ComparisonReplayDiagnosticLogTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/replay-log
- name: Test database replay log retention
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/ComparisonReplayDiagnosticRetentionTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/replay-retention
- name: Test time-series workload correctness
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/TimeSeriesWorkloadTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/timeseries-workload
- name: Check published time-series package version
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/TimeSeriesPackageVersionTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/timeseries-package
- name: Test KeyLoad time-series cluster configuration
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedTimeSeriesKeyLoadResourceTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/timeseries-keyload-model
- name: Test TimescaleDB cluster configuration
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedTimeSeriesTimescaleResourceTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/timeseries-timescale-model
- name: Test time-series workload configuration
run: dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedTimeSeriesBenchmarkResourceTests/*' --KeyLoadTests:ResultsDirectory=TestResults/comparison-images/timeseries-family-model
- name: Save Docker images
id: bundle
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-image-bundle
path: ${{ runner.temp }}/keyload-image-bundle/*
if-no-files-found: error
compression-level: 0
retention-days: 90
- name: Clean up Docker registry after image failure
if: ${{ always() && steps.roundtrip.outcome != 'success' && (steps.images.outcome == 'success' || steps.images.outcome == 'failure' || steps.images.outcome == 'cancelled') }}
run: node scripts/Features/BenchmarkComparisons/cleanup-images.mjs
- name: Save Docker image checks and test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-images-qualification
path: |
${{ runner.temp }}/keyload-images/**
${{ runner.temp }}/keyload-images-build/**
${{ runner.temp }}/keyload-cell-github/**
**/TestResults/**
artifacts/code-quality/**
if-no-files-found: error
retention-days: 90
comparison-preflight:
name: Check database / ${{ matrix.id }}
needs: [comparison-plan, comparison-images]
runs-on: ubuntu-latest
timeout-minutes: 150
permissions: {contents: read, actions: read}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.comparison-plan.outputs.preflight) }}
env:
GH_TOKEN: ${{ github.token }}
KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }}
KEYLOAD_COMPARISON_JOB_NAME: Check database / ${{ matrix.id }}
Benchmarks__Target: ${{ matrix.target }}
Benchmarks__NodeCount: ${{ matrix.nodeCount }}
Benchmarks__Scenario: ${{ matrix.scenario }}
Benchmarks__EvidenceProfile: ${{ matrix.profile }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Prepare database containers
id: images
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup
with:
bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }}
- name: Restore .NET packages
run: dotnet restore KeyLoad.slnx
- name: Build benchmark tests
id: benchmark-build
run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release
- name: Run database workload
id: workload
if: ${{ !cancelled() }}
env:
PREPARATION_OUTCOME: ${{ steps.images.outcome }}
BUILD_OUTCOME: ${{ steps.benchmark-build.outcome }}
run: |
if [ "$PREPARATION_OUTCOME" != success ] || [ "$BUILD_OUTCOME" != success ]; then
echo '::error::Benchmark preparation failed; no measurement data is available.'
exit 1
fi
dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedNativeComparisonTests/*' --KeyLoadTests:TimeoutMinutes=140
- name: Record benchmark availability
if: ${{ !cancelled() }}
env:
KEYLOAD_WORKLOAD_OUTCOME: ${{ steps.workload.outcome }}
run: node scripts/Features/BenchmarkComparisons/finalize-worker.mjs
- name: Save benchmark results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-preflight-${{ matrix.id }}
path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/*
if-no-files-found: error
retention-days: 90
- name: Clean up containers and save logs
if: always()
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown
with:
setup-outcome: ${{ steps.images.outcome }}
artifact-name: comparison-preflight-qualification-${{ matrix.id }}
comparison-crud:
name: Benchmark / ${{ matrix.id }}
needs: [comparison-plan, comparison-images]
runs-on: ubuntu-latest
timeout-minutes: 150
permissions: {contents: read, actions: read}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.comparison-plan.outputs.crud) }}
env:
GH_TOKEN: ${{ github.token }}
KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }}
KEYLOAD_COMPARISON_JOB_NAME: Benchmark / ${{ matrix.id }}
Benchmarks__Target: ${{ matrix.target }}
Benchmarks__NodeCount: ${{ matrix.nodeCount }}
Benchmarks__Scenario: ${{ matrix.scenario }}
Benchmarks__EvidenceProfile: ${{ matrix.profile }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Prepare database containers
id: images
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup
with:
bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }}
- name: Restore .NET packages
run: dotnet restore KeyLoad.slnx
- name: Build benchmark tests
id: benchmark-build
run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release
- name: Run database workload
id: workload
if: ${{ !cancelled() }}
env:
PREPARATION_OUTCOME: ${{ steps.images.outcome }}
BUILD_OUTCOME: ${{ steps.benchmark-build.outcome }}
run: |
if [ "$PREPARATION_OUTCOME" != success ] || [ "$BUILD_OUTCOME" != success ]; then
echo '::error::Benchmark preparation failed; no measurement data is available.'
exit 1
fi
dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedNativeComparisonTests/*' --KeyLoadTests:TimeoutMinutes=140
- name: Record benchmark availability
if: ${{ !cancelled() }}
env:
KEYLOAD_WORKLOAD_OUTCOME: ${{ steps.workload.outcome }}
run: node scripts/Features/BenchmarkComparisons/finalize-worker.mjs
- name: Save benchmark results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-worker-${{ matrix.id }}
path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/*
if-no-files-found: error
retention-days: 90
- name: Clean up containers and save logs
if: always()
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown
with:
setup-outcome: ${{ steps.images.outcome }}
artifact-name: comparison-case-qualification-${{ matrix.id }}
comparison-specialized:
name: Benchmark / ${{ matrix.id }}
needs: [comparison-plan, comparison-images]
runs-on: ubuntu-latest
timeout-minutes: 150
permissions: {contents: read, actions: read}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.comparison-plan.outputs.specialized) }}
env:
GH_TOKEN: ${{ github.token }}
KEYLOAD_COMPARISON_CELL_ID: ${{ matrix.id }}
KEYLOAD_COMPARISON_JOB_NAME: Benchmark / ${{ matrix.id }}
Benchmarks__Target: ${{ matrix.target }}
Benchmarks__NodeCount: ${{ matrix.nodeCount }}
Benchmarks__Scenario: ${{ matrix.scenario }}
Benchmarks__EvidenceProfile: ${{ matrix.profile }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Prepare database containers
id: images
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellSetup
with:
bundle-artifact-id: ${{ needs.comparison-images.outputs.bundle-artifact-id }}
- name: Restore .NET packages
run: dotnet restore KeyLoad.slnx
- name: Build benchmark tests
id: benchmark-build
run: dotnet build tests/KeyLoad.ComparisonTests --no-restore --configuration Release
- name: Run database workload
id: workload
if: ${{ !cancelled() }}
env:
PREPARATION_OUTCOME: ${{ steps.images.outcome }}
BUILD_OUTCOME: ${{ steps.benchmark-build.outcome }}
run: |
if [ "$PREPARATION_OUTCOME" != success ] || [ "$BUILD_OUTCOME" != success ]; then
echo '::error::Benchmark preparation failed; no measurement data is available.'
exit 1
fi
dotnet run --project src/KeyLoad.AppHost --no-build --no-restore --configuration Release -- --KeyLoadTests:Suite=comparison '--KeyLoadTests:Filter=/*/*/IsolatedNativeComparisonTests/*' --KeyLoadTests:TimeoutMinutes=140
- name: Record benchmark availability
if: ${{ !cancelled() }}
env:
KEYLOAD_WORKLOAD_OUTCOME: ${{ steps.workload.outcome }}
run: node scripts/Features/BenchmarkComparisons/finalize-worker.mjs
- name: Save benchmark results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-worker-${{ matrix.id }}
path: artifacts/comparisons/isolated/workers/${{ matrix.id }}/*
if-no-files-found: error
retention-days: 90
- name: Clean up containers and save logs
if: always()
uses: ./.github/workflows/Features/BenchmarkComparisons/IsolatedCellTeardown
with:
setup-outcome: ${{ steps.images.outcome }}
artifact-name: comparison-case-qualification-${{ matrix.id }}
comparison-aggregate:
name: Combine benchmark results
needs: [comparison-build, comparison-plan, comparison-images, comparison-preflight, comparison-crud, comparison-specialized]
if: ${{ always() && !cancelled() && needs.comparison-plan.result == 'success' && needs.comparison-images.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 150
permissions: {contents: read, actions: read}
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Verify benchmark plan
run: node scripts/Features/BenchmarkComparisons/isolated-plan.mjs --output="$RUNNER_TEMP/isolated-plan.json"
- name: Download benchmark results
run: node scripts/Features/BenchmarkComparisons/isolated-github-collect.mjs --plan="$RUNNER_TEMP/isolated-plan.json" --input="$RUNNER_TEMP/isolated-capture"
- name: Check all 270 benchmark results
run: node scripts/Features/BenchmarkComparisons/aggregate-cli.mjs --plan="$RUNNER_TEMP/isolated-plan.json" --input="$RUNNER_TEMP/isolated-capture/data" --proof="$RUNNER_TEMP/isolated-capture/github/proof.json" --output="$RUNNER_TEMP/isolated-aggregate"
- name: Generate website benchmark data
run: node site/scripts/build.mjs --isolated="$RUNNER_TEMP/isolated-aggregate" --output="$RUNNER_TEMP/isolated-site" --revision="$GITHUB_SHA" --site-revision="$GITHUB_SHA" --evidence-url="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
- name: Save website benchmark data
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-isolated-site-candidate
path: ${{ runner.temp }}/isolated-site/**
if-no-files-found: error
retention-days: 90
- name: Save combined benchmark results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-isolated-suite
path: ${{ runner.temp }}/isolated-aggregate/**
if-no-files-found: error
retention-days: 90
- name: Save GitHub result verification
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: comparison-isolated-provider-evidence
path: ${{ runner.temp }}/isolated-capture/github/**
if-no-files-found: error
retention-days: 90
qualify:
name: Check website
needs: comparison-aggregate
if: ${{ always() && !cancelled() && needs.comparison-aggregate.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 180
permissions: {contents: read, actions: read}
outputs:
mode: ${{ steps.qualification.outputs.mode }}
site_revision: ${{ steps.qualification.outputs.site_revision }}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.workflow_sha }}
path: control
persist-credentials: false
- name: Run website checks
id: qualification
uses: ./control/.github/workflows/Features/BenchmarkComparisons/QualifySite
deploy:
name: Publish website
needs: qualify
if: ${{ always() && !cancelled() && needs.qualify.result == 'success' && needs.qualify.outputs.mode == 'publish' }}
runs-on: ubuntu-latest
timeout-minutes: 90
permissions: {contents: read, actions: read, pages: write, id-token: write}
environment: {name: github-pages, url: '${{ steps.publication.outputs.page_url }}'}
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
QUALIFIED_REVISION: ${{ needs.qualify.outputs.site_revision }}
CONTROL_REVISION: ${{ github.workflow_sha }}
steps:
- name: Download source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.workflow_sha }}
path: control
persist-credentials: false
- name: Publish website
id: publication
uses: ./control/.github/workflows/Features/BenchmarkComparisons/DeploySite