Chrysostomos Nanakos f1878d6aaa
chore: orc support
Refactor public API to use `var openArray[seq[byte]]` instead of raw
pointers for ORC compatibility.

The previous API required callers to extract raw pointers from seqs
before calling encode/decode. With refc and shallowCopy, reference
counting kept buffers alive. ORC doesn't track raw pointers and can
reallocate seq buffers at yield points, leaving pointers dangling.

The new openArray API borrows data safely.

Also updates CI to Nim 2.2.4 and bumps version to 0.2.0.

Part of https://github.com/logos-storage/nim-leopard/issues/24

Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
2025-12-24 01:43:25 +02:00

45 lines
1.0 KiB
YAML

name: Tests
on: [push, pull_request, workflow_dispatch]
jobs:
test:
strategy:
matrix:
platform:
- {
icon: 🐧,
label: Linux,
runner: ubuntu-latest
}
- {
icon: 🍎,
label: macOS,
runner: macos-latest
}
- {
icon: 🏁,
label: Windows,
runner: windows-latest
}
# Earliest supported and latest nim
nim: [binary:2.2.4]
name: ${{ matrix.platform.icon }} ${{ matrix.platform.label }} - Nim v${{ matrix.nim }}
runs-on: ${{ matrix.platform.runner }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: iffy/install-nim@v5
with:
version: ${{ matrix.nim }}
- name: Install
run: nimble install -y
- name: Build and run tests
run: |
eval nimble --verbose test -d:release --mm:refc
eval nimble --verbose test -d:release --mm:orc