Skip to content

Commit 8dac297

Browse files
committed
fix(ci): mark AllocationTests as [HighMemory] to prevent OOM on ubuntu
The Allocate_1GB/2GB/4GB tests were causing OOM kills on ubuntu-latest runners (which have ~7GB RAM but less available). These tests allocate actual memory (not broadcast views), so they need to be excluded from CI. Also removed debug options (--output Detailed --timeout 5m) from workflow.
1 parent 30441b4 commit 8dac297

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ jobs:
5454
run: |
5555
dotnet run --project test/NumSharp.UnitTest/NumSharp.UnitTest.csproj \
5656
--configuration Release --no-build --framework net10.0 \
57-
-- --treenode-filter '/*/*/*/*[Category!=OpenBugs]&/*/*/*/*[Category!=HighMemory]' \
58-
--report-trx --output Detailed --timeout 5m
57+
-- --treenode-filter '/*/*/*/*[Category!=OpenBugs]&/*/*/*/*[Category!=HighMemory]' --report-trx
5958
6059
- name: Upload Test Results
6160
uses: actions/upload-artifact@v4

test/NumSharp.UnitTest/Backends/Unmanaged/AllocationTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
namespace NumSharp.UnitTest.Backends.Unmanaged
88
{
9+
/// <summary>
10+
/// Tests for large memory allocations.
11+
/// Marked as [HighMemory] because they allocate 1-4GB of memory and
12+
/// can cause OOM on CI runners (especially ubuntu with limited RAM).
13+
/// </summary>
14+
[HighMemory]
915
public class AllocationTests
1016
{
1117
private const long onegb = 1_073_741_824;

0 commit comments

Comments
 (0)