Skip to content

feat(distill): distill() + native tree student (RFC 0005 §4.2.5) #15

feat(distill): distill() + native tree student (RFC 0005 §4.2.5)

feat(distill): distill() + native tree student (RFC 0005 §4.2.5) #15

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: build + test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Build loadable extension
run: make loadable
- name: Run test suite
run: make test
sanitizers:
name: ASan + UBSan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run sanitizer soak
run: make test-asan CC=clang
valgrind:
name: valgrind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install valgrind
run: sudo apt-get update -qq && sudo apt-get install -y -qq valgrind
- name: Build soak
run: make soak CC=gcc
- name: Run under valgrind
run: |
valgrind --leak-check=full --error-exitcode=9 \
--errors-for-leak-kinds=definite ./dist/soak
fuzz-smoke:
name: fuzz smoke (60s)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build + run libFuzzer
run: |
make vendor/sqlite3ext.h sqlite-predict.h
clang -std=c99 -g -O1 -fsanitize=fuzzer,address \
-DSQLITE_CORE -DSQLITE_PREDICT_STATIC -DSQLITE_STRICT_SUBTYPE=1 \
-Ivendor/ -I./ \
fuzz/fuzz_predict.c sqlite-predict.c predict-forecast.c \
predict-tabular.c predict-receipts.c vendor/sha256.c \
vendor/sqlite3.c -o fuzz_predict -lm -lpthread -ldl
./fuzz_predict -max_total_time=60 -max_len=512 fuzz/seeds
windows:
name: windows (mingw)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc make curl unzip mingw-w64-x86_64-sqlite3
- name: Build loadable DLL
run: make loadable
- name: Build + run soak (static, portability proof)
run: make soak && ./dist/soak
- name: Load the DLL via the SQLite CLI
run: |
sqlite3 ":memory:" ".load ./dist/predict0" "SELECT predict_version();"
wasm:
name: wasm (emscripten)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install emscripten
run: |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
./emsdk/emsdk install latest
./emsdk/emsdk activate latest
- name: Compile soak to WebAssembly
run: |
source ./emsdk/emsdk_env.sh
make soak-wasm
- name: Run under node
run: node dist/soak.js
onnx:
name: onnx (cpu)
runs-on: ubuntu-latest
env:
ORT_VERSION: "1.27.1"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Fetch onnxruntime
run: |
curl -fsSL -o ort.tgz \
"https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}/onnxruntime-linux-x64-${ORT_VERSION}.tgz"
tar xzf ort.tgz
echo "ONNXRUNTIME_PREFIX=$PWD/onnxruntime-linux-x64-${ORT_VERSION}" \
>> "$GITHUB_ENV"
- name: Build the onnx variant + run its tests
run: make test-onnx
- name: ASan + LSan soak of the onnx backend
run: make test-asan-onnx
- name: Compile-check the GPU build (CUDA/TensorRT wiring)
run: make loadable-onnx-gpu