Skip to content

Commit 913480c

Browse files
authored
Update numpy-scipy-c-extension-test.yml
1 parent 77c258a commit 913480c

1 file changed

Lines changed: 24 additions & 42 deletions

File tree

.github/workflows/numpy-scipy-c-extension-test.yml

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: NumPy + SciPy C-Extension Switching
1+
name: NumPy + SciPy C Extension Test
22

33
on:
44
push:
@@ -30,10 +30,10 @@ jobs:
3030
with:
3131
python-version: '3.11'
3232

33-
- name: Install dependencies
33+
- name: 📦 Install omnipkg (editable) and Redis client
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install -e . redis numpy==1.26.4 scipy==1.13.0
36+
pip install -e . redis
3737
3838
- name: Configure omnipkg for non-interactive use
3939
run: |
@@ -84,57 +84,39 @@ jobs:
8484
sys.exit(1)
8585
EOF
8686
87-
- name: Run the Demo - NumPy + SciPy Stress Test
87+
- name: Run the Demo - NumPy + SciPy
8888
id: run_demo
8989
run: |
90-
echo "--- Running Omnipkg Demo for NumPy + SciPy Stress Test (C-Extensions) ---"
90+
echo "--- Running Omnipkg Demo for NumPy + SciPy (C Extension Nuclear Testing) ---"
9191
mkdir -p /tmp/omnipkg-artifacts
9292
93-
# Clear output file to ensure single run
94-
rm -f /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
95-
96-
# Run demo once and count runs
97-
echo "Starting demo run" > /tmp/omnipkg-artifacts/run_count.txt
98-
timeout 900 bash -c 'echo "3" | omnipkg demo 2>&1 | tee /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt'
93+
timeout 900 bash -c 'echo "2" | omnipkg demo 2>&1 | tee /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt'
9994
DEMO_EXIT_CODE=$?
10095
101-
# Check run count
102-
RUN_COUNT=$(grep -c "Starting demo run" /tmp/omnipkg-artifacts/run_count.txt)
103-
echo "DEBUG: Demo run count: $RUN_COUNT"
104-
if [ "$RUN_COUNT" -ne 1 ]; then
105-
echo "Error: Demo ran $RUN_COUNT times instead of once."
106-
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
107-
exit 1
108-
fi
109-
110-
# Log output file for debugging
111-
echo "DEBUG: Output file contents:"
112-
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
113-
11496
echo "## NumPy + SciPy Demo Output" >> $GITHUB_STEP_SUMMARY
11597
echo '```' >> $GITHUB_STEP_SUMMARY
11698
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt >> $GITHUB_STEP_SUMMARY
11799
echo '```' >> $GITHUB_STEP_SUMMARY
118100
119101
if [ $DEMO_EXIT_CODE -eq 0 ] || \
120-
(grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
121-
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
122-
grep -q "Demo completed successfully" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt); then
123-
echo "Demo completed successfully (exit code $DEMO_EXIT_CODE, logs verified)."
124-
echo "demo_outcome=success" >> $GITHUB_OUTPUT
125-
if grep -q "numpy==1.26.4" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
126-
grep -q "scipy==1.16.1" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
127-
grep -q "numpy==1.24.3" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
128-
grep -q "scipy==1.12.0" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
129-
grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
130-
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt; then
131-
echo "NumPy + SciPy demo verified: numpy==1.26.4, 1.24.3, scipy==1.16.1, 1.12.0, all tests passed!"
132-
else
133-
echo "Error: Expected NumPy + SciPy demo output not found."
134-
echo "Missing one of: 'numpy==1.26.4', 'scipy==1.16.1', 'numpy==1.24.3', 'scipy==1.12.0', 'ALL TESTS PASSED!', or 'OMNIPKG SURVIVED NUCLEAR TESTING'"
135-
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
136-
exit 1
137-
fi
102+
(grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
103+
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
104+
grep -q "Demo completed successfully" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt); then
105+
echo "Demo completed successfully (exit code $DEMO_EXIT_CODE, logs verified)."
106+
echo "demo_outcome=success" >> $GITHUB_OUTPUT
107+
if grep -q "numpy==1.26.4" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
108+
grep -q "scipy==1.16.1" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
109+
grep -q "numpy==1.24.3" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
110+
grep -q "scipy==1.12.0" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
111+
grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
112+
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt; then
113+
echo "NumPy + SciPy demo verified: numpy==1.26.4, 1.24.3, scipy==1.16.1, 1.12.0, all tests passed!"
114+
else
115+
echo "Error: Expected NumPy + SciPy demo output not found."
116+
echo "Missing one of: 'numpy==1.26.4', 'scipy==1.16.1', 'numpy==1.24.3', 'scipy==1.12.0', 'ALL TESTS PASSED!', or 'OMNIPKG SURVIVED NUCLEAR TESTING'"
117+
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
118+
exit 1
119+
fi
138120
else
139121
echo "Demo failed with exit code $DEMO_EXIT_CODE."
140122
echo "demo_outcome=failure" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)