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
19 changes: 5 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
os: [windows-latest, ubuntu-latest, macos-latest]
Comment thread
mahach666 marked this conversation as resolved.
Resolved
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
Expand All @@ -25,20 +25,11 @@ jobs:
- run: dotnet restore TdbIO.slnx
- run: dotnet build TdbIO.slnx -c Release --no-restore
- run: dotnet test TdbIO.slnx -c Release --no-build
- run: dotnet pack TdbIO.slnx -c Release --no-build -o artifacts
- uses: actions/upload-artifact@v7
- if: matrix.os == 'windows-latest'
run: dotnet pack TdbIO.slnx -c Release --no-build -o artifacts
- if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v7
with:
name: packages-${{ matrix.os }}
path: artifacts/*.nupkg
if-no-files-found: error

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
dotnet-version: |
8.0.x
- run: dotnet build src/TdbIO.Cli/TdbIO.Cli.csproj -c Release
7 changes: 5 additions & 2 deletions tests/TdbIO.Tests/GzipTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ public void CorruptDeflateDataIsRejected()
[Fact]
public void PeekInflatesTheHeadOfCutData()
{
byte[] file = Synthetic.Gzip(Payload);
// Deterministic uncompressed deflate block (BFINAL=0, BTYPE=00) of 32 bytes,
// ensuring the cut prefix inflates across all platforms without depending on platform-specific compression trees.
byte[] uncompressedBlock = [0x00, 0x20, 0x00, 0xDF, 0xFF];
byte[] file = Synthetic.Concat([0x1F, 0x8B, 0x08, 0x00, 0, 0, 0, 0, 0, 0], uncompressedBlock, Payload[..32], [0x00]);
var into = new byte[32];
Assert.Equal(32, Gzip.Peek(file.AsSpan(0, file.Length / 2), into));
Assert.Equal(32, Gzip.Peek(file, into));
Assert.Equal(Payload[..32], into);
}

Expand Down
Loading