Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2cc3de1
Debug Windows access violation
lesteve Oct 1, 2026
bc8ba72
Trigger CI 1
lesteve Oct 1, 2026
baf959b
Trigger CI 2
lesteve Oct 1, 2026
a9b0300
Trigger CI 3
lesteve Oct 1, 2026
bd556d3
Trigger CI 1
lesteve Oct 1, 2026
d361c81
Trigger CI 2
lesteve Oct 1, 2026
1a563de
Trigger CI 3
lesteve Oct 1, 2026
0f6b706
Trigger CI 4
lesteve Oct 1, 2026
fd64cf4
Trigger CI 5
lesteve Oct 1, 2026
b168dcf
Trigger CI 6
lesteve Oct 1, 2026
91a8d64
Trigger CI 7
lesteve Oct 1, 2026
bd68c79
Trigger CI 8
lesteve Oct 1, 2026
3ea36a4
Trigger CI 9
lesteve Oct 1, 2026
93c4edd
Trigger CI 10
lesteve Oct 1, 2026
c68030e
Add more debug info
lesteve Oct 1, 2026
374b662
Trigger CI 1
lesteve Oct 1, 2026
cc75d2f
Only keep problematic Windows workflow
lesteve Oct 1, 2026
6db091c
Trigger simplified CI 1
lesteve Oct 1, 2026
c055a2c
Trigger simplified CI 2
lesteve Oct 1, 2026
ceec17d
Trigger simplified CI 3
lesteve Oct 1, 2026
a23958e
Trigger really simplified CI 1
lesteve Oct 1, 2026
1f17e1e
Trigger slimmed down CI 1
lesteve Oct 1, 2026
89b6ea7
Trigger slimmed down CI 2
lesteve Oct 1, 2026
54a76b7
Trigger slimmed down CI 3
lesteve Oct 1, 2026
4152df6
Trigger slimmed down CI 4
lesteve Oct 1, 2026
ff73739
Trigger slimmed down CI 4
lesteve Oct 1, 2026
a88e9e2
Trigger slimmed down CI 5
lesteve Oct 1, 2026
5d620cb
Trigger slimmed down CI 6
lesteve Oct 1, 2026
d75d3da
Trigger slimmed down CI 7
lesteve Oct 1, 2026
0c31c67
Trigger slimmed down CI 8
lesteve Oct 1, 2026
c72f598
Trigger slimmed down CI 9
lesteve Oct 1, 2026
2d61abf
Trigger slimmed down CI 10
lesteve Oct 1, 2026
618367c
Try with and without ProcDump
lesteve Oct 1, 2026
cb2c9fc
Trigger slimmed down CI 1
lesteve Oct 1, 2026
df18643
both with and without ProcDump 1
lesteve Oct 1, 2026
0b5313e
both with and without ProcDump 2
lesteve Oct 1, 2026
be695f0
both with and without ProcDump 3
lesteve Oct 1, 2026
770d109
both with and without ProcDump 4
lesteve Oct 1, 2026
55bb537
both with and without ProcDump 5
lesteve Oct 1, 2026
9510f83
both with and without ProcDump 6
lesteve Oct 1, 2026
3e3d72f
both with and without ProcDump 7
lesteve Oct 1, 2026
f135db9
both with and without ProcDump 8
lesteve Oct 1, 2026
ae6dbb2
both with and without ProcDump 9
lesteve Oct 1, 2026
74215ba
both with and without ProcDump 10
lesteve Oct 1, 2026
43e6b49
both with and without ProcDump 11
lesteve Oct 1, 2026
085e96f
both with and without ProcDump 12
lesteve Oct 1, 2026
f405d0a
both with and without ProcDump 13
lesteve Oct 1, 2026
2f8251f
both with and without ProcDump 14
lesteve Oct 1, 2026
3af6928
both with and without ProcDump 15
lesteve Oct 1, 2026
75f52e1
both with and without ProcDump 16
lesteve Oct 1, 2026
870f1bd
both with and without ProcDump 17
lesteve Oct 1, 2026
16ff7fc
both with and without ProcDump 18
lesteve Oct 1, 2026
a2f6f94
both with and without ProcDump 19
lesteve Oct 1, 2026
b5bd651
both with and without ProcDump 20
lesteve Oct 1, 2026
a0a559f
both with and without ProcDump 21
lesteve Oct 1, 2026
53b66a3
both with and without ProcDump 22
lesteve Oct 1, 2026
685d039
both with and without ProcDump 23
lesteve Oct 1, 2026
c4e1709
both with and without ProcDump 24
lesteve Oct 1, 2026
63ae638
both with and without ProcDump 25
lesteve Oct 1, 2026
e056e85
both with and without ProcDump 26
lesteve Oct 1, 2026
17decbd
both with and without ProcDump 27
lesteve Oct 1, 2026
5925d40
both with and without ProcDump 28
lesteve Oct 1, 2026
719b51a
both with and without ProcDump 29
lesteve Oct 1, 2026
770bf02
both with and without ProcDump 30
lesteve Oct 1, 2026
52035b2
both with and without ProcDump 31
lesteve Oct 1, 2026
70432da
both with and without ProcDump 32
lesteve Oct 1, 2026
33098e8
both with and without ProcDump 33
lesteve Oct 1, 2026
c8aec0c
both with and without ProcDump 34
lesteve Oct 1, 2026
3583e09
both with and without ProcDump 35
lesteve Oct 1, 2026
eb5c8e6
both with and without ProcDump 36
lesteve Oct 1, 2026
4e646b7
both with and without ProcDump 37
lesteve Oct 1, 2026
9e985c7
both with and without ProcDump 38
lesteve Oct 1, 2026
0a61f24
both with and without ProcDump 39
lesteve Oct 1, 2026
90423c0
both with and without ProcDump 40
lesteve Oct 2, 2026
55cf1c9
both with and without ProcDump 41
lesteve Oct 2, 2026
43222fc
both with and without ProcDump 42
lesteve Oct 2, 2026
6046630
both with and without ProcDump 43
lesteve Oct 2, 2026
e39f45c
both with and without ProcDump 44
lesteve Oct 2, 2026
707702f
both with and without ProcDump 45
lesteve Oct 2, 2026
b49a19c
both with and without ProcDump 46
lesteve Oct 2, 2026
c6d7f07
both with and without ProcDump 47
lesteve Oct 2, 2026
b184375
both with and without ProcDump 48
lesteve Oct 2, 2026
c8584f7
both with and without ProcDump 49
lesteve Oct 2, 2026
e28e050
both with and without ProcDump 50
lesteve Oct 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 68 additions & 275 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,249 +21,19 @@ concurrency:

jobs:

linting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.14"
- name: Install black
run: |
pip install black==26.5.1
- name: Run black
run: |
black --check --diff .

testing:
needs: linting
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:

# Windows env with numpy, scipy,MKL installed through conda-forge
- name: pylatest_conda_forge_mkl
os: windows-latest
PYTHON_VERSION: "*"
PACKAGER: "conda-forge"
BLAS: "mkl"
INSTALL_OPENCV: "true"
# Windows env with numpy, scipy, OpenBLAS installed through conda-forge
# Reproduce the intermittent Windows OpenBLAS access violation.
- name: pylatest_conda_forge_openblas
os: windows-latest
PYTHON_VERSION: "*"
PACKAGER: "conda-forge"
BLAS: "openblas"
INSTALL_OPENCV: "true"
# Windows env with numpy, scipy installed through conda default channel
- name: py311_conda
os: windows-latest
PYTHON_VERSION: "3.11"
PACKAGER: "conda"
INSTALL_OPENCV: "true"
# Windows env with numpy, scipy installed through pip
- name: py310_pip
os: windows-latest
PYTHON_VERSION: "3.10"
PACKAGER: "pip"
INSTALL_OPENCV: "true"

# MacOS env with OpenMP installed through homebrew
- name: py310_conda_homebrew_libomp
os: macos-latest
PYTHON_VERSION: "3.10"
PACKAGER: "conda"
BLAS: "openblas"
CC_OUTER_LOOP: "clang"
CC_INNER_LOOP: "clang"
INSTALL_LIBOMP: "homebrew"
INSTALL_OPENCV: "true"

# MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers
- name: pylatest_conda_forge_clang_openblas
os: macos-latest
PYTHON_VERSION: "*"
PACKAGER: "conda-forge"
BLAS: "openblas"
INSTALL_LIBOMP: "conda-forge"
INSTALL_OPENCV: "true"

# MacOS env with FlexiBLAS
- name: pylatest_flexiblas
os: macos-latest
PYTHON_VERSION: "*"
INSTALL_BLAS: "flexiblas"
PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp"

# Linux environments to test that packages that comes with Ubuntu 22.04
# are correctly handled.
- name: py310_ubuntu_atlas_gcc_gcc
os: ubuntu-22.04
PYTHON_VERSION: "3.10"
PACKAGER: "ubuntu"
APT_BLAS: "libatlas3-base libatlas-base-dev"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
- name: py310_ubuntu_openblas_gcc_gcc
os: ubuntu-22.04
PYTHON_VERSION: "3.10"
PACKAGER: "ubuntu"
APT_BLAS: "libopenblas-base libopenblas-dev"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"

# Linux environment with development versions of numpy and scipy
- name: pylatest_pip_dev
os : ubuntu-latest
PACKAGER: "pip-dev"
PYTHON_VERSION: "*"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
INSTALL_OPENCV: "true"

# Linux + Python 3.10 and homogeneous runtime nesting.
- name: py310_conda_openblas_clang_clang
os: ubuntu-latest
PACKAGER: "conda"
PYTHON_VERSION: "3.10"
BLAS: "openblas"
CC_OUTER_LOOP: "clang-18"
CC_INNER_LOOP: "clang-18"
INSTALL_OPENCV: "true"

# Linux environment with MKL and Clang (known to be unsafe for
# threadpoolctl) to only test the warning from multiple OpenMP.
- name: pylatest_conda_mkl_clang_gcc
os: ubuntu-latest
PYTHON_VERSION: "*"
PACKAGER: "conda"
BLAS: "mkl"
CC_OUTER_LOOP: "clang-18"
CC_INNER_LOOP: "gcc"
TESTS: "libomp_libiomp_warning"
# Linux environment with MKL, safe for threadpoolctl.
- name: pylatest_conda_mkl_gcc_gcc
os: ubuntu-latest
PYTHON_VERSION: "*"
PACKAGER: "conda"
BLAS: "mkl"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
MKL_THREADING_LAYER: "INTEL"
INSTALL_OPENCV: "true"

# Linux + Python 3.11 with numpy / scipy installed with pip from PyPI
# and heterogeneous OpenMP runtimes.
- name: py311_pip_openblas_gcc_clang
os: ubuntu-latest
PACKAGER: "pip"
PYTHON_VERSION: "3.11"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "clang-18"
# Linux + conda-forge Python RC, extra deps from PyPI.
# OpenCV is omitted: no wheels for the current RC ABI yet.
- name: pyrc_pip
os: ubuntu-latest
PACKAGER: "pip"
# Using the "*" marker does not select the latest RC release
# from the conda-forge `python_rc` channel hence the need to pin
# a specific Python version when testing against an RC release.
PYTHON_VERSION: "3.15"
PYTHON_RC: "true"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
# Linux + conda-forge free-threaded Python RC, extra deps from PyPI.
- name: pyrc_ft_pip
os: ubuntu-latest
PACKAGER: "pip"
# Using the "*" marker does not select the latest RC release
# from the conda-forge `python_rc` channel hence the need to pin
# a specific Python version when testing against an RC release.
PYTHON_VERSION: "3.15"
PYTHON_RC: "true"
FREETHREADING: "1"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
# Linux environment with numpy from conda-forge channel and openblas-openmp
- name: pylatest_conda_forge
os: ubuntu-latest
PACKAGER: "conda-forge"
PYTHON_VERSION: "*"
BLAS: "openblas"
OPENBLAS_THREADING_LAYER: "openmp"
INSTALL_OPENCV: "true"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
# Linux environment with no numpy and heterogeneous OpenMP runtimes.
- name: pylatest_conda_nonumpy_gcc_clang
os: ubuntu-latest
PACKAGER: "conda"
PYTHON_VERSION: "*"
NO_NUMPY: "true"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "clang-18"

# Linux environments with numpy linked to BLIS
- name: pylatest_blis_gcc_clang_openmp
os: ubuntu-latest
PYTHON_VERSION: "*"
INSTALL_BLAS: "blis"
BLIS_NUM_THREAEDS: "4"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
BLIS_CC: "clang-18"
BLIS_ENABLE_THREADING: "openmp"
- name: pylatest_blis_clang_gcc_pthreads
os: ubuntu-latest
PYTHON_VERSION: "*"
INSTALL_BLAS: "blis"
BLIS_NUM_THREADS: "4"
CC_OUTER_LOOP: "clang-18"
CC_INNER_LOOP: "clang-18"
BLIS_CC: "gcc-12"
BLIS_ENABLE_THREADING: "pthreads"
- name: pylatest_blis_no_threading
os: ubuntu-latest
PYTHON_VERSION: "*"
INSTALL_BLAS: "blis"
BLIS_NUM_THREADS: "1"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"
BLIS_CC: "gcc-12"
BLIS_ENABLE_THREADING: "no"

# Linux env with FlexiBLAS
- name: pylatest_flexiblas
os: ubuntu-latest
PYTHON_VERSION: "*"
INSTALL_BLAS: "flexiblas"
PLATFORM_SPECIFIC_PACKAGES: "mkl"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"

# Python 3.14, free-threaded
- name: py314_freethreaded_pip_openblas
os: ubuntu-latest
PACKAGER: "conda-forge"
BLAS: "openblas"
PYTHON_VERSION: "3.14"
FREETHREADING: "1"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"

# Ubuntu 24.04, which has glibc with different dl_iterate_phdr than
# latest Ubuntus.
- name: ubuntu24_04
os: ubuntu-24.04
PACKAGER: "conda-forge"
BLAS: "openblas"
PYTHON_VERSION: "3.14"
CC_OUTER_LOOP: "gcc"
CC_INNER_LOOP: "gcc"

env: ${{ matrix }}

Expand All @@ -280,15 +50,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Restore ccache
if: matrix.INSTALL_BLAS == 'flexiblas'
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-flexiblas-${{ matrix.os }}-${{ hashFiles('continuous_integration/install_flexiblas.sh') }}
restore-keys: |
ccache-flexiblas-${{ matrix.os }}-

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -300,43 +61,75 @@ jobs:
run: |
./continuous_integration/install.sh

- name: Test library
- name: Record Windows CPU information
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force crash_diagnostics | Out-Null

Get-CimInstance Win32_Processor |
Select-Object Name, Manufacturer, NumberOfCores,
NumberOfLogicalProcessors, ProcessorId |
ConvertTo-Json -Depth 3 |
Tee-Object -FilePath crash_diagnostics/cpu.json

Get-CimInstance Win32_ComputerSystem |
Select-Object Manufacturer, Model, TotalPhysicalMemory,
NumberOfLogicalProcessors |
ConvertTo-Json -Depth 3 |
Tee-Object -FilePath crash_diagnostics/system.json

- name: Install ProcDump for Windows OpenBLAS diagnostic
if: matrix.os == 'windows-latest' && matrix.name == 'pylatest_conda_forge_openblas'
shell: pwsh
run: |
$toolDir = Join-Path $env:RUNNER_TEMP 'procdump'
$archive = Join-Path $env:RUNNER_TEMP 'procdump.zip'
Invoke-WebRequest https://download.sysinternals.com/files/Procdump.zip -OutFile $archive
Expand-Archive -LiteralPath $archive -DestinationPath $toolDir
"PROCDUMP_PATH=$(Join-Path $toolDir 'procdump64.exe')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Run Windows OpenBLAS diagnostic without ProcDump
id: direct
continue-on-error: true
env:
OPENBLAS_VERBOSE: "2"
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate testenv
PYTHONPATH=. python -u -X faulthandler tests/empirical_scope_observation.py blas

- name: Capture Windows OpenBLAS diagnostic crashes
id: procdump
if: ${{ !cancelled() && (steps.direct.outcome == 'success' || steps.direct.outcome == 'failure') }}
continue-on-error: true
env:
OPENBLAS_VERBOSE: "2"
run: |
./continuous_integration/run_tests.sh
source "$CONDA/etc/profile.d/conda.sh"
conda activate testenv
PYTHONPATH=. python -X faulthandler continuous_integration/capture_windows_blas_crash.py

- name: Check for crash dumps
id: dumps
if: always()
shell: pwsh
run: |
$found = Test-Path -Path 'crash_diagnostics/*.dmp'
"found=$($found.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT

- name: Upload test results
- name: Upload Windows OpenBLAS crash diagnostics
if: always() && steps.dumps.outputs.found == 'true'
uses: actions/upload-artifact@v4
with:
# Requires a unique name for each job in the matrix of this run
name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}
path: test_result.xml
retention-days: 1

- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.xml

# Meta-test to ensure that at least one of the above CI configurations had
# the necessary platform settings to execute each test without raising
# skipping.
meta_test:
needs: testing
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Checkout code
uses: actions/checkout@v3

- name: Download tests results
uses: actions/download-artifact@v4
with:
path: test_results

- name: Check no test always skipped
name: windows-openblas-crash-${{ github.run_id }}-${{ github.run_attempt }}
path: crash_diagnostics/
if-no-files-found: ignore
retention-days: 14

- name: Fail if either diagnostic failed or a dump was captured
if: always() && (steps.direct.outcome == 'failure' || steps.procdump.outcome == 'failure' || steps.dumps.outputs.found == 'true')
shell: pwsh
run: |
python continuous_integration/check_no_test_skipped.py test_results
Write-Output '::error::OpenBLAS diagnostic failed. Check both diagnostic logs and any uploaded crash dump.'
exit 1
Loading
Loading