← back to Exo
tweak
bdf417f25e43d55af522ff5f13e074fb77b1ee55 · 2024-12-06 20:01:57 +0000 · Glen
Files touched
M .github/workflows/build_and_test.yml
Diff
commit bdf417f25e43d55af522ff5f13e074fb77b1ee55
Author: Glen <glen@192.168.1.214>
Date: Fri Dec 6 20:01:57 2024 +0000
tweak
---
.github/workflows/build_and_test.yml | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml
index d840b9fa..116d7426 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -17,15 +17,12 @@ jobs:
strategy:
matrix:
cpu: ['M3', 'M4']
+ include:
+ - benchmark_timeout: 500
runs-on: ['self-hosted', 'macOS', '${{ matrix.cpu }}']
steps:
- uses: actions/checkout@v4
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: ${{ env.PYTHON_VERSION }}
-
- name: Install dependencies
run: |
python -m venv env
@@ -33,9 +30,8 @@ jobs:
pip install --upgrade pip
pip install .
- - name: Run discovery integration test
+ - name: Run exo
run: |
- source env/bin/activate
ALL_NODE_IDS=$(for i in $(seq 0 ${{ strategy.job-total }} -1); do echo -n "${GITHUB_JOB}_${i},"; done | sed 's/,$//')
MY_NODE_ID="${GITHUB_JOB}_${{ strategy.job-index }}"
DEBUG_DISCOVERY=7 DEBUG=7 exo --node-id="${MY_NODE_ID}" --filter-node-ids="${ALL_NODE_IDS}" --chatgpt-api-port 52415 --disable-tui > output1.log 2>&1 &
@@ -59,23 +55,13 @@ jobs:
exit 1
fi
-
-
- kill $PID1 $PID2
- if grep -q "Peer statuses: {.*'node2': 'is_connected=True, health_check=True" output1.log && \
- ! grep -q "Failed to connect peers:" output1.log && \
- grep -q "Peer statuses: {.*'node1': 'is_connected=True, health_check=True" output2.log && \
- ! grep -q "Failed to connect peers:" output2.log; then
- echo "Test passed: Both instances discovered each other"
- exit 0
+ if [ "${{ strategy.job-index }}" -eq "0" ]; then
+ python .github/bench.py
else
- echo "Test failed: Devices did not discover each other"
- echo "Output of first instance:"
- cat output1.log
- echo "Output of second instance:"
- cat output2.log
- exit 1
+ sleep ${{ matrix.benchmark_timeout }}
fi
+
+ kill $PID1
- name: Test
run: |
echo "GITHUB_JOB: ${GITHUB_JOB}, GITHUB_RUN_ID: ${GITHUB_RUN_ID}, GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER}, GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}"
\ No newline at end of file
← d154d37a add exo run
·
back to Exo
·
tweak python install 6b61fc66 →