Skip to content

Commit d3b6efc

Browse files
committed
Add Resource Monitoring during Build
1 parent 0e656b8 commit d3b6efc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,29 @@ jobs:
217217
#git commit -s -a -m "getting rid of -dirty"
218218
219219
BUILD_TYPE="gki"
220-
BAZEL_ARGS=(--jobs=$(nproc --all) --verbose_failures --lto=thin)
220+
BAZEL_ARGS=(--jobs=$(nproc --all) --verbose_failures --lto=thin --max_idle_secs=600)
221221
if [ "${{ inputs.soc }}" == "sun" ]; then
222222
BUILD_TYPE="perf"
223223
BAZEL_ARGS+=(-g)
224224
fi
225225
226+
(while true; do
227+
echo "=== $(date) ==="
228+
free -h
229+
top -b -n 1 | head -n 15
230+
echo ""
231+
sleep 60
232+
done) &
233+
MONITOR_PID=$!
234+
226235
if [ -f ./kernel_platform/build_with_bazel.py ]; then
227236
./kernel_platform/oplus/bazel/oplus_modules_variant.sh ${{ inputs.soc }} "$BUILD_TYPE" ""
228237
./kernel_platform/build_with_bazel.py -t ${{ inputs.soc }} "$BUILD_TYPE" "${BAZEL_ARGS[@]}" -o "$(pwd)/out"
229238
else
230239
LTO=thin ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE"
231240
fi
241+
242+
kill $MONITOR_PID
232243
233244
- name: Copy Images
234245
run: |

0 commit comments

Comments
 (0)