diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee4a42da564..7b182a4d98c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,16 @@ jobs: run: | ./dev.sh test working-directory: src - if: matrix.runtime == 'arm64' || matrix.runtime == 'amd64' + # Compares against matrix.runs_on (bare arch names: amd64/arm64/ppc64le/s390x), not + # matrix.runtime (always 'linux-*'-prefixed) -- the two were previously confused here, + # which meant this condition never evaluated true for any matrix leg and L0 silently + # never ran in this workflow. linux-x64/linux-arm64 build/run natively on matching + # self-hosted hardware with no patches applied, so they're safe to test directly here. + # linux-arm (32-bit armv7l, cross-targeted even though it builds on arm64 hardware), + # ppc64le, and s390x are intentionally left out: they require the arm/ppc64le/s390x + # patches to be applied first and their 32-bit/cross-arch test-tooling behavior under + # dotnet test is not yet validated. + if: matrix.runtime == 'linux-x64' || matrix.runtime == 'linux-arm64' # Create runner package tar.gz/zip - name: Package Release diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs index bac7d41d90a..6030320101f 100644 --- a/src/Test/L0/Worker/StepHostL0.cs +++ b/src/Test/L0/Worker/StepHostL0.cs @@ -55,6 +55,11 @@ public async Task DetermineNodeRuntimeVersionInContainerAsync() } } + // Alpine-container Node support is only implemented for X64 (see StepHost.CheckPlatformForAlpineContainer, + // which throws NotSupportedException for any other Constants.Runner.PlatformArchitecture). That value is + // baked in at compile time via this same X64/ARM/ARM64 preprocessor symbol, so these tests can only pass + // when the Test assembly itself is built targeting X64. +#if X64 [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] @@ -108,6 +113,7 @@ public async Task DetermineNode20RuntimeVersionInAlpineContainerAsync() Assert.Equal("node20_alpine", nodeVersion); } } +#endif [Fact] [Trait("Level", "L0")] @@ -163,6 +169,9 @@ public async Task DetermineNode20RuntimeVersionInUnknowContainerAsync() } } + // See the comment above DetermineNodeRuntimeVersionInAlpineContainerAsync: Alpine-container Node support + // is X64-only in production code, so this test is only valid for X64-targeted Test assembly builds. +#if X64 [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] @@ -189,6 +198,7 @@ public async Task DetermineNode24RuntimeVersionInAlpineContainerAsync() Assert.Equal("node24_alpine", nodeVersion); } } +#endif [Fact] [Trait("Level", "L0")]