Implementation:Interpretml Interpret CI Workflow
| Knowledge Sources | |
|---|---|
| Domains | CI_CD, Build_System, Testing |
| Last Updated | 2026-02-07 12:00 GMT |
Overview
Main CI/CD GitHub Actions workflow that orchestrates building native libraries, packaging Python/R/npm distributions, running tests across multiple platforms and Python versions, and performing code formatting checks.
Description
The interpret-CI workflow is triggered on push, pull request, manual dispatch (with optional commit ID), and a daily cron schedule. It consists of the following job stages:
Build jobs:
- bld -- Compiles the native
libebmshared library across a matrix of platforms (Linux x64, Linux ARM, macOS x64, macOS ARM, Windows x64) in both release and debug configurations. Linux builds use themanylinux2010_x86_64Docker container for compatibility. Publishes library artifacts and optional assembly output. - vis -- Builds the JavaScript visualization bundle (
interpret-inline.js) using Node.js 18 and npm.
Packaging jobs:
- sdist -- Creates source distribution tarballs for
interpret-coreandinterpretpackages. - bdist -- Creates wheel distributions combining native libraries and vis assets (depends on bld + vis).
- npm -- Packages the vis bundle as an npm tarball.
- R -- Builds the R package with LaTeX documentation support.
- powerlift -- Builds the powerlift wheel distribution.
Test jobs:
- testC -- Runs native C/C++ tests across platforms with optional Valgrind (Linux scheduled), AddressSanitizer (macOS debug ARM), and static analysis (Windows scheduled).
- testS -- Runs Python tests from source distributions across Python 3.10-3.13 on Linux, Linux ARM, macOS, and Windows with full optional dependency installation and code coverage reporting via Codecov.
- testB -- Runs Python tests from wheel distributions across the same matrix as testS.
- test_powerlift -- Runs powerlift-specific tests on Linux and Windows with Python 3.12.
- testR -- Runs R package checks with
R CMD check --as-cran.
Formatting checks:
- format_clang -- Checks C++ code formatting with clang-format-16 against the project style file.
- format_ruff -- Checks Python code formatting with ruff.
Both formatting checks create neutral GitHub check annotations on failure rather than failing the build.
Usage
This workflow runs automatically on all pushes and pull requests. It can also be manually triggered with a specific commit ID via workflow_dispatch. The daily scheduled run enables extended testing (Valgrind, static analysis) that is too slow for regular CI.
Code Reference
Source Location
- Repository: Interpretml_Interpret
- File:
.github/workflows/ci.yml
Signature
name: interpret-CI
on:
push:
pull_request:
workflow_dispatch:
inputs:
commit_id:
description: 'Branch or Commit ID (optional)'
required: false
type: string
schedule:
- cron: "0 12 * * *"
jobs:
bld: # Native library compilation (matrix: linux/mac/win x release/debug x 64/arm)
vis: # JavaScript visualization bundle
sdist: # Python source distributions
bdist: # Python wheel distributions (depends: bld, vis)
npm: # npm package
R: # R package
powerlift: # Powerlift wheel
docs: # Documentation build (depends: sdist)
testC: # Native C/C++ tests (depends: bld)
testS: # Python sdist tests (depends: sdist)
testB: # Python bdist tests (depends: bdist)
test_powerlift: # Powerlift tests (depends: powerlift)
testR: # R package tests (depends: R)
format_clang: # C++ formatting check
format_ruff: # Python formatting check
Import
N/A -- This is a GitHub Actions workflow file, not an importable module.
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| commit_id | string | No | Branch or commit ID for manual workflow dispatch |
| Push event | GitHub event | No | Triggered automatically on push to any branch |
| Pull request event | GitHub event | No | Triggered automatically on pull requests |
| Schedule | cron | No | Daily at 12:00 UTC for extended testing |
Outputs
| Name | Type | Description |
|---|---|---|
| libebm_* | artifact | Native shared libraries for each platform/config |
| asm_* | artifact | Assembly output for release builds with -asm flag |
| vis | artifact | Built interpret-inline.js bundle |
| sdist | artifact | Python source distribution tarballs |
| bdist | artifact | Python wheel distributions |
| powerlift | artifact | Powerlift wheel distribution |
| npm | artifact | npm package tarball |
| R | artifact | R package tarball |
| docs | artifact | Built HTML documentation |
Usage Examples
# Manual trigger with specific commit
# Go to Actions -> interpret-CI -> Run workflow
# Enter commit SHA or branch name in "Branch or Commit ID" field
# The workflow produces artifacts downloadable from the Actions run page:
# - libebm shared libraries for all platforms
# - Python wheels (interpret-core, interpret)
# - R package
# - npm package
# - Documentation
Related Pages
- Interpretml_Interpret_Build_Script -- Shell build script invoked by the bld job for Linux/macOS
- Interpretml_Interpret_R_Bindings -- R language bindings compiled during the R job
- Interpretml_Interpret_VisRenderer -- JavaScript visualization code built during the vis job