Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/Test/L0/Worker/StepHostL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -108,6 +113,7 @@ public async Task DetermineNode20RuntimeVersionInAlpineContainerAsync()
Assert.Equal("node20_alpine", nodeVersion);
}
}
#endif

[Fact]
[Trait("Level", "L0")]
Expand Down Expand Up @@ -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")]
Expand All @@ -189,6 +198,7 @@ public async Task DetermineNode24RuntimeVersionInAlpineContainerAsync()
Assert.Equal("node24_alpine", nodeVersion);
}
}
#endif

[Fact]
[Trait("Level", "L0")]
Expand Down
Loading