Skip to content

Enable backend AOT with CI OpenAPI freshness check#6

Merged
Keboo merged 1 commit into
mainfrom
keboo/backend-aot-setup
Jun 8, 2026
Merged

Enable backend AOT with CI OpenAPI freshness check#6
Keboo merged 1 commit into
mainfrom
keboo/backend-aot-setup

Conversation

@Keboo

@Keboo Keboo commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Why

Backend startup performance improvements require Native AOT publishing, but OpenAPI document generation fails during AOT publish. We still want OpenAPI specs committed and current.

What changed

  • Enabled Native AOT for src/AzraTasks.Api Release builds (PublishAot, invariant globalization, speed optimization).
  • Disabled OpenAPI document generation in Release/AOT publish for the backend project to avoid publish-time failures.
  • Added a CI verification step in build-and-deploy.yml that builds the backend with PublishAot=false and OpenApiGenerateDocuments=true, then fails if src/AzraTasks.Api/AzraTasks.Api.json is out of date.

Notes for reviewers

This keeps AOT publishing and OpenAPI accuracy at the same time by separating concerns: OpenAPI is validated in CI using a non-AOT build, while production publish remains AOT-focused.

Configure Native AOT for Release builds in the backend project and disable OpenAPI document generation during AOT publish to avoid publish-time failures.

Add a CI guard step that regenerates the backend OpenAPI document in non-AOT mode and fails if the checked-in JSON is out of date.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Keboo Keboo merged commit fff0f5e into main Jun 8, 2026
1 of 2 checks passed
@Keboo Keboo deleted the keboo/backend-aot-setup branch June 8, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant