|
1 | | -name: NumPy + SciPy C-Extension Switching |
| 1 | +name: NumPy + SciPy C Extension Test |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
@@ -30,10 +30,10 @@ jobs: |
30 | 30 | with: |
31 | 31 | python-version: '3.11' |
32 | 32 |
|
33 | | - - name: Install dependencies |
| 33 | + - name: 📦 Install omnipkg (editable) and Redis client |
34 | 34 | run: | |
35 | 35 | python -m pip install --upgrade pip |
36 | | - pip install -e . redis numpy==1.26.4 scipy==1.13.0 |
| 36 | + pip install -e . redis |
37 | 37 |
|
38 | 38 | - name: Configure omnipkg for non-interactive use |
39 | 39 | run: | |
@@ -84,57 +84,39 @@ jobs: |
84 | 84 | sys.exit(1) |
85 | 85 | EOF |
86 | 86 |
|
87 | | - - name: Run the Demo - NumPy + SciPy Stress Test |
| 87 | + - name: Run the Demo - NumPy + SciPy |
88 | 88 | id: run_demo |
89 | 89 | 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) ---" |
91 | 91 | mkdir -p /tmp/omnipkg-artifacts |
92 | 92 | |
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' |
99 | 94 | DEMO_EXIT_CODE=$? |
100 | 95 | |
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 | | - |
114 | 96 | echo "## NumPy + SciPy Demo Output" >> $GITHUB_STEP_SUMMARY |
115 | 97 | echo '```' >> $GITHUB_STEP_SUMMARY |
116 | 98 | cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt >> $GITHUB_STEP_SUMMARY |
117 | 99 | echo '```' >> $GITHUB_STEP_SUMMARY |
118 | 100 | |
119 | 101 | 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 |
138 | 120 | else |
139 | 121 | echo "Demo failed with exit code $DEMO_EXIT_CODE." |
140 | 122 | echo "demo_outcome=failure" >> $GITHUB_OUTPUT |
|
0 commit comments