Skip to content

Run samples on arm64 as well as amd64 in CI - #108

Draft
DrisDary wants to merge 2 commits into
mainfrom
feat/arm64-sample-coverage
Draft

Run samples on arm64 as well as amd64 in CI#108
DrisDary wants to merge 2 commits into
mainfrom
feat/arm64-sample-coverage

Conversation

@DrisDary

Copy link
Copy Markdown
Contributor

The Samples CI only ever ran on amd64, so nothing caught the Azure
Functions arm64 breakage that a reviewer hit on Apple Silicon (fixed in
localstack-pro#8102). Add an architecture axis to the test matrix.

Not every sample can run natively on arm64. The emulator starts these
samples on container images Microsoft publishes for amd64 only, with no
arm64 manifest to pull:

  • mcr.microsoft.com/oryx/ backs every az webapp create --runtime ... code deployment, covering all web-app-* samples and
    eventhubs (it deploys a dashboard web app)
  • mcr.microsoft.com/azure-app-service/java backs servicebus/java
  • mcr.microsoft.com/mssql/server backs web-app-sql-database

The remaining six sample families are arch-agnostic: Function Apps build
their image from a multi-arch base, and the custom-image Web App and ACI
samples run an image the sample builds itself.

run-samples.sh now declares this per sample in ARM64_SAMPLE_DIRS and
emits an arches field from --list; build-matrix.sh expands each
selected test into one job per supported architecture, mapping amd64 to
ubuntu-22.04 and arm64 to ubuntu-22.04-arm. This takes a full run from
34 to 48 jobs. The MSSQL ODBC install is skipped on arm64, where no
sample needs it.

Note that "amd64-only" means not native: the emulator never pins
--platform, so Docker Desktop on Apple Silicon runs these under Rosetta,
just more slowly. run-samples.sh therefore warns rather than skips on an
arm64 host, with SKIP_AMD64_ONLY=1 to opt out. CI schedules only the
natively-supported samples because GitHub's arm64 runners register no
binfmt/QEMU.

The Samples CI only ever ran on amd64, so nothing caught the Azure
Functions arm64 breakage that a reviewer hit on Apple Silicon (fixed in
localstack-pro#8102). Add an architecture axis to the test matrix.

Not every sample can run natively on arm64. The emulator starts these
samples on container images Microsoft publishes for amd64 only, with no
arm64 manifest to pull:

  - mcr.microsoft.com/oryx/<platform> backs every `az webapp create
    --runtime ...` code deployment, covering all web-app-* samples and
    eventhubs (it deploys a dashboard web app)
  - mcr.microsoft.com/azure-app-service/java backs servicebus/java
  - mcr.microsoft.com/mssql/server backs web-app-sql-database

The remaining six sample families are arch-agnostic: Function Apps build
their image from a multi-arch base, and the custom-image Web App and ACI
samples run an image the sample builds itself.

run-samples.sh now declares this per sample in ARM64_SAMPLE_DIRS and
emits an `arches` field from --list; build-matrix.sh expands each
selected test into one job per supported architecture, mapping amd64 to
ubuntu-22.04 and arm64 to ubuntu-22.04-arm. This takes a full run from
34 to 48 jobs. The MSSQL ODBC install is skipped on arm64, where no
sample needs it.

Note that "amd64-only" means not *native*: the emulator never pins
--platform, so Docker Desktop on Apple Silicon runs these under Rosetta,
just more slowly. run-samples.sh therefore warns rather than skips on an
arm64 host, with SKIP_AMD64_ONLY=1 to opt out. CI schedules only the
natively-supported samples because GitHub's arm64 runners register no
binfmt/QEMU.
@DrisDary
DrisDary requested a review from a team as a code owner July 28, 2026 19:21
@DrisDary
DrisDary marked this pull request as draft July 28, 2026 19:21
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