name: Performance gates # BRIEF ยง1.1 and the Phase 2/3 gates on a synthetic 500,000-photo library (SQLite and PostgreSQL 17) and a # 100,000-frame archive rebuild from sidecars. Too slow for every push: weekly and on demand. on: schedule: - cron: "41 3 * * 1" workflow_dispatch: permissions: contents: read concurrency: group: perf-${{ github.ref }} cancel-in-progress: true env: DOTNET_NOLOGO: "1" DOTNET_CLI_TELEMETRY_OPTOUT: "1" jobs: perf: name: Library and rebuild gates runs-on: ubuntu-latest timeout-minutes: 90 services: postgres: image: postgres:17 env: POSTGRES_USER: titano POSTGRES_PASSWORD: titano-ci POSTGRES_DB: titano_perf ports: - 5432:5432 options: >- --health-cmd "pg_isready -U titano -d titano_perf" --health-interval 5s --health-timeout 5s --health-retries 20 env: TITANO_PERF: "1" TITANO_TEST_PG: Host=127.0.0.1;Port=5432;Database=titano_perf;Username=titano;Password=titano-ci;SslMode=disable steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: global-json-file: global.json - name: Build run: dotnet build tests/Titano.Data.Tests -c Release - name: Perf tests (SQLite, PostgreSQL 17) run: | set -o pipefail dotnet run --project tests/Titano.Data.Tests -c Release --no-build -- --filter category:perf --verbose --junit out/junit/perf.xml | tee out-perf.log - name: Timings if: always() run: | { echo "## Performance gates" echo '```' if grep -q "perf:" out-perf.log 2>/dev/null; then grep -h "perf:" out-perf.log | sed 's/^ *//' else echo "no timings recorded" fi echo '```' } >> "$GITHUB_STEP_SUMMARY" - name: Upload results if: always() continue-on-error: true # the timings are also in the job summary uses: actions/upload-artifact@v4 with: name: perf-results path: | out/junit/ out-perf.log if-no-files-found: ignore retention-days: 30