Skip to content

ci: fix YAML syntax in diagnose step (heredoc for python) #76

ci: fix YAML syntax in diagnose step (heredoc for python)

ci: fix YAML syntax in diagnose step (heredoc for python) #76

Workflow file for this run

# Bit-exact CI: every push/PR must pass all 792 IEEE-754 tests.
#
# Requirements driving the setup:
# - numpy must be pip-installed (its bundled OpenBLAS exposes sdot_64_ /
# cblas_sgemm64_ / __svml_exp8 etc. that numpycpp resolves via dlsym)
# - AVX-512 hardware is required at runtime (-mavx512f compile flag +
# __attribute__((target)) guards; GitHub ubuntu-latest uses Intel Xeon
# which supports AVX-512)
# - pybind11, Eigen3, OpenMP needed to build the test extension module
name: CI
on:
push:
branches: [ master, bit-exact ]
pull_request:
branches: [ master ]
jobs:
test:
name: bit-exact tests — Python ${{ matrix.python }} / ${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python: "3.10"
compiler: g++
- python: "3.11"
compiler: g++
- python: "3.12"
compiler: g++
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python dependencies
run: pip install "numpy>=1.23,<2.0" pybind11 pytest cmake
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libeigen3-dev
# libgomp1 (OpenMP runtime) and omp.h (OpenMP headers) are bundled
# with GCC on Ubuntu 24.04 — no separate libgomp1-dev package exists
- name: Diagnose numpy symbols
run: |
python - <<'PYEOF'
import numpy, subprocess, glob, os

Check failure on line 56 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 56
print('numpy version:', numpy.__version__)
so = None
for d in ['core', '_core']:
for f in glob.glob(os.path.join(os.path.dirname(numpy.__file__), d, '_multiarray_umath*.so')):
so = f; break
if so:
break
print('numpy so:', so)
if so:
r = subprocess.run(['nm', '-D', so], capture_output=True, text=True)
for sym in ['npy_exp', '__svml_exp8', 'npy_log', 'cblas_sdot64_', 'cblas_sdot']:
found = any(sym in line for line in r.stdout.splitlines())
status = 'found' if found else 'NOT found'
print(' ' + sym + ': ' + status)
PYEOF
grep -q avx512f /proc/cpuinfo \
&& echo "AVX-512: present in cpuinfo" \
|| echo "AVX-512: NOT in cpuinfo"
- name: Configure
run: cmake -S tests -B tests/build -DCMAKE_BUILD_TYPE=Release
env:
CXX: ${{ matrix.compiler }}
- name: Build
run: cmake --build tests/build -j$(nproc)
- name: Run bit-exact tests
run: |
cd tests
python -m pytest test_all.py -q --tb=short --no-header