bench(forecast): real-data forecast validation on gluonts (slice 1) #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| # Run valgrind inside a container instead of apt-installing it on the | |
| # runner: the host's apt contends with the runner's background | |
| # unattended-upgrades dpkg lock and can hang. `make test-valgrind` builds | |
| # the soak in a fresh gcc:13 container (glibc + gcc coverage too) and | |
| # runs it under valgrind with --error-exitcode. | |
| - name: Run valgrind (containerized) | |
| run: make test-valgrind | |
| 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 predict-distill.c \ | |
| predict-student.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 |