Skip to content

Commit b8f9919

Browse files
author
peng.li24
committed
ci: fix YAML syntax in diagnose step (heredoc for python)
1 parent 31aa92d commit b8f9919

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,26 @@ jobs:
5252
5353
- name: Diagnose numpy symbols
5454
run: |
55-
python -c "
56-
import numpy, subprocess, glob, os, ctypes
55+
python - <<'PYEOF'
56+
import numpy, subprocess, glob, os
5757
print('numpy version:', numpy.__version__)
58-
# Find _multiarray_umath.so
5958
so = None
6059
for d in ['core', '_core']:
6160
for f in glob.glob(os.path.join(os.path.dirname(numpy.__file__), d, '_multiarray_umath*.so')):
6261
so = f; break
63-
if so: break
62+
if so:
63+
break
6464
print('numpy so:', so)
6565
if so:
6666
r = subprocess.run(['nm', '-D', so], capture_output=True, text=True)
6767
for sym in ['npy_exp', '__svml_exp8', 'npy_log', 'cblas_sdot64_', 'cblas_sdot']:
68-
found = any(sym in l for l in r.stdout.splitlines())
69-
print(f' {sym}: {\"found\" if found else \"NOT found\"}')
70-
"
68+
found = any(sym in line for line in r.stdout.splitlines())
69+
status = 'found' if found else 'NOT found'
70+
print(' ' + sym + ': ' + status)
71+
PYEOF
7172
grep -q avx512f /proc/cpuinfo \
72-
&& echo "AVX-512 supported" \
73-
|| echo "AVX-512 not in cpuinfo"
73+
&& echo "AVX-512: present in cpuinfo" \
74+
|| echo "AVX-512: NOT in cpuinfo"
7475
7576
- name: Configure
7677
run: cmake -S tests -B tests/build -DCMAKE_BUILD_TYPE=Release

0 commit comments

Comments
 (0)