Skip to content
Merged
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
35 changes: 28 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,35 @@ on:
pull_request:

jobs:
test:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{matrix.os}}
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: 0.14.0
- run: zig build test
- run: |
zig build test
zig build -Dtarget=x86-windows-gnu test

test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: 0.14.0
# Note that there's no testing for 32-bit on macos since offical support has been dropped
- run: |
zig build test

test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mlugg/setup-zig@v1
with:
version: 0.14.0
- run: |
zig build test
zig build -Dtarget=x86-linux-gnu test
6 changes: 5 additions & 1 deletion stable_array.zig
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,11 @@ test "huge max size" {
const MB = KB * 1024;
const GB = MB * 1024;

var a = StableArray(u8).init(GB * 128);
const MAX_MEMORY_32 = GB * 1;
const MAX_MEMORY_64 = GB * 128;
const MAX_MEMORY = if (@sizeOf(usize) < @sizeOf(u64)) MAX_MEMORY_32 else MAX_MEMORY_64;

var a = StableArray(u8).init(MAX_MEMORY);
defer a.deinit();

try a.resize(MB * 4);
Expand Down
Loading