Skip to content

Migrate CI to GitHub Actions, one job per BLAS/LAPACK backend#173

Merged
ViralBShah merged 8 commits into
mainfrom
im/ci-github-actions
Jun 6, 2026
Merged

Migrate CI to GitHub Actions, one job per BLAS/LAPACK backend#173
ViralBShah merged 8 commits into
mainfrom
im/ci-github-actions

Conversation

@ViralBShah

@ViralBShah ViralBShah commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

Reworks the test suite and CI so that each BLAS/LAPACK backend is tested in its own process with its own Project.toml, and migrates CI from Buildkite + Cirrus to GitHub Actions (including GitHub-hosted ARM runners and 32-bit jobs).

Previously every backend was loaded into a single julia test/runtests.jl process, so multiple BLAS/LAPACK libraries were loaded at once and could clash — e.g. adding the reference-BLAS tests broke the OpenBLAS tests (see #128). Isolating each backend in its own process + project fixes that at the root.

Test restructuring

  • test/common.jl — shared harness (run_test, the C-test tuples, run_all_tests).
  • test/runtests.jl — a driver:
    • julia --project=test/backends/<b> test/runtests.jl <b> runs a single backend in-process, using only that backend's JLLs (this is how CI invokes each job);
    • julia test/runtests.jl (or with several names) runs each backend in its own process/project, so only one BLAS/LAPACK set is ever loaded at once.
  • test/backends/<name>/{Project.toml,runtests.jl} — one self-contained project per backend, each pulling in only the JLLs it needs: openblas, mkl, refblas, blis, blas64, accelerate, direct.
  • test/utils.jl — gains open_lbt_handle() and the in-process config-inspection helpers shared by direct/accelerate. Also fixes a latent bug where build_libblastrampoline() returned a bare string on its cached path instead of the (link_name, dir) tuple.

New backends

  • refblas — vanilla + LBT reference BLAS/LAPACK (LP64). The ILP64 variant is left commented out: the ILP64 ReferenceBLAS_jll/LAPACK_jll artifacts export both the plain (ilaver_) and _64_-suffixed symbols, so LBT autodetects them as LP64 and never forwards the ILP64 LAPACK symbols. The Debian libblas64/liblapack64 system packages (the blas64 backend) do work, confirming this is a JLL packaging issue. Enabling the ILP64 JLL path is left to Add tests with reference BLAS and LAPACK #128.
  • blis — BLIS (ILP64, BLAS-only).

CI

  • .github/workflows/ci.yml:
    • test — exclude-based matrix over backends × GitHub-hosted runners (ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest, macos-15-intel) × Julia 1.10 + nightly (50 jobs).
    • test-32biti686 Linux and Windows: 32-bit Julia on the x86_64 runner (Pkg resolves i686 artifacts), built -m32 via gcc-multilib on Linux and a native i686 MINGW32 toolchain on Windows (10 jobs).
    • func-list-idempotency — preserved from the old Buildkite pipeline.
    • Actions pinned to latest: actions/checkout@v6, julia-actions/setup-julia@v3, julia-actions/cache@v3, msys2/setup-msys2@v2.
  • Removes Buildkite (.buildkite/) and Cirrus (.cirrus.yml).

Also included

Coverage notes vs. the old setup

GitHub-hosted runners can't easily provide FreeBSD or musl Linux (previously on Cirrus). i686 (Linux + Windows) and ARM are covered via GitHub Actions. armv7l is dropped. Flagging in case FreeBSD/musl should be retained (musl via an Alpine container, FreeBSD via vmactions/freebsd-vm).

Required-check note

The buildkite/libblastrampoline status will fail instantly until the Buildkite integration / required check is removed at the org / branch-protection level (the repo no longer contains a pipeline).

🤖 Generated with Claude Code

ViralBShah and others added 6 commits June 6, 2026 00:20
Previously all BLAS/LAPACK backends were tested in a single Julia process
(`test/runtests.jl`), which meant several different BLAS/LAPACK libraries
were loaded at once and could clash (e.g. adding reference BLAS broke the
OpenBLAS tests). This restructures the test suite so each backend runs in
its own process with its own `Project.toml` that pulls in only the JLLs
relevant to that backend, and wires that into a GitHub Actions matrix with
one job per backend × platform.

Test changes:
- `test/common.jl`: shared harness (`run_test`, test tuples, `run_all_tests`),
  extracted from the old monolithic `runtests.jl`.
- `test/runtests.jl`: now a dispatcher that runs each requested backend in a
  separate Julia process. `julia test/runtests.jl` runs them all;
  `julia test/runtests.jl openblas mkl` runs a subset.
- `test/backends/<name>/{Project.toml,runtests.jl}`: one self-contained
  project per backend: openblas, mkl, refblas, blis, blas64, accelerate,
  direct.
- `test/utils.jl`: gains `open_lbt_handle()` and the in-process config
  inspection helpers (`unpack_loaded_libraries`, `find_symbol_offset`,
  `bitfield_get`) shared by the `direct` and `accelerate` backends.

New backends:
- `refblas`: vanilla + LBT reference BLAS/LAPACK (LP64). The ILP64 variant is
  left commented out: the ILP64 `ReferenceBLAS_jll`/`LAPACK_jll` artifacts
  export both plain and `_64_`-suffixed symbols, so LBT autodetects them as
  LP64 and never forwards the ILP64 LAPACK symbols.
- `blis`: BLIS (ILP64, BLAS-only).

CI:
- Add `.github/workflows/ci.yml`: matrix over backends, GitHub-hosted runners
  (including ubuntu-24.04-arm and macos-14 Apple Silicon), and Julia 1.10 +
  nightly; plus the `func_list` idempotency check.
- Remove Buildkite (`.buildkite/`) and Cirrus (`.cirrus.yml`). Note this drops
  the i686, armv7l, FreeBSD, and musl coverage those provided.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- test/utils.jl: `build_libblastrampoline()` returned a bare directory string
  on its cached path but a `(link_name, dir)` tuple on the fresh path, so a
  second call in the same process (e.g. the accelerate backend calls it once
  directly and again via `open_lbt_handle()`) destructured the string into
  garbage and tried to `dlopen` a bogus path. Always return the tuple.
- .github/workflows/ci.yml: switch the matrix from base + `exclude` to an
  explicit `include` list (one entry per backend × OS × julia), so each combo
  is opt-in. Use `macos-latest` (Apple Silicon) and `macos-15-intel` for the
  macOS runners. Drop refblas on Windows for now (reference BLAS DLLs are not
  yet resolvable there).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- test/runtests.jl: the driver now runs a single explicitly-requested backend
  *in-process* (using the active project's JLLs), which is how CI invokes it
  (`julia --project=test/backends/<b> test/runtests.jl <b>`). With no args (or
  several), it still spawns one process per backend with that backend's project,
  so only one set of BLAS/LAPACK libraries is ever loaded at once.
- .github/workflows/ci.yml:
  - run each backend through the `test/runtests.jl` driver rather than the
    per-backend file directly.
  - add a `test-32bit` job that tests i686 Linux and Windows: a 32-bit Julia on
    the x86_64 runner (Pkg resolves i686 JLL artifacts), built with `-m32` via
    gcc-multilib on Linux and a native i686 MinGW (MINGW32) toolchain on Windows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`info` is a `blasint`, which is 32-bit in LP64 builds, so `%ld` triggers a
-Wformat warning (and is incorrect) there. Use `%d` for LP64 and `%ld` for
ILP64. Pulled from #128.

Co-authored-by: Alexis Montoison <alexis.montoison@polymtl.ca>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ViralBShah

ViralBShah commented Jun 6, 2026

Copy link
Copy Markdown
Member Author

@staticfloat @imciner2 Do you feel comfortable with this PR? It's a lot of actions running per job, but it isolates everything, tries many more BLAS, and runs everything on GHA.

To make it fully green, we'll need to disable buildkite on the repo.

@staticfloat

Copy link
Copy Markdown
Member

This seems fine to me.

ViralBShah and others added 2 commits June 6, 2026 15:04
Keeps the core openblas and direct backends on the full {1.10, nightly} x
all-platforms matrix, and runs the mkl/refblas/blis/blas64/accelerate
backends on the 1.10 LTS only, trimming the matrix from 61 to 45 jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ViralBShah ViralBShah merged commit b0edfb0 into main Jun 6, 2026
45 of 46 checks passed
@ViralBShah ViralBShah deleted the im/ci-github-actions branch June 6, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants