Migrate CI to GitHub Actions, one job per BLAS/LAPACK backend#173
Merged
Conversation
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>
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. |
Member
|
This seems fine to me. |
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jlprocess, 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— gainsopen_lbt_handle()and the in-process config-inspection helpers shared bydirect/accelerate. Also fixes a latent bug wherebuild_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 ILP64ReferenceBLAS_jll/LAPACK_jllartifacts export both the plain (ilaver_) and_64_-suffixed symbols, so LBT autodetects them as LP64 and never forwards the ILP64 LAPACK symbols. The Debianlibblas64/liblapack64system packages (theblas64backend) 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) × Julia1.10+nightly(50 jobs).test-32bit— i686 Linux and Windows: 32-bit Julia on the x86_64 runner (Pkg resolves i686 artifacts), built-m32viagcc-multilibon Linux and a native i686 MINGW32 toolchain on Windows (10 jobs).func-list-idempotency— preserved from the old Buildkite pipeline.actions/checkout@v6,julia-actions/setup-julia@v3,julia-actions/cache@v3,msys2/setup-msys2@v2..buildkite/) and Cirrus (.cirrus.yml).Also included
test/dpstrf_test/dpstrf_test.c: use%dforinfoin LP64 builds (%ldonly for ILP64) to silence a-Wformatwarning. Pulled from Add tests with reference BLAS and LAPACK #128 (co-authored by @amontoison).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.
armv7lis dropped. Flagging in case FreeBSD/musl should be retained (musl via an Alpine container, FreeBSD viavmactions/freebsd-vm).Required-check note
The
buildkite/libblastrampolinestatus 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