Run builds in parallel except for plugin test

This commit is contained in:
Michael Hansen 2022-05-05 12:16:33 -04:00
commit db3e68f12e
2 changed files with 16 additions and 22 deletions

View file

@ -116,28 +116,29 @@ ENV USER root
ENV MIMIC_DIR /tmp/mycroft/cache/tts/Mimic3TTSPlugin
# Start relevant services:
# 1. Start message bus, wait for ready message in log (5 min timeout)
# 2. Start audio service, wait for ready message in log (5 min timeout)
# 1. Start message bus, wait for ready message in log (10 min timeout)
# 2. Start audio service, wait for ready message in log (10 min timeout)
# 3. Run mycroft-speak with sample text
# 4. Watch cache directory for a file creation (5 min timeout)
# 4. Watch cache directory for a file creation (10 min timeout)
# 5. Copy first WAV file to known location
RUN mycroft-core/bin/mycroft-start bus && \
timeout 300 tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
RUN export timeout_sec='600' && \
mycroft-core/bin/mycroft-start bus && \
timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
echo 'Message bus started' && \
mycroft-core/bin/mycroft-start audio && \
timeout 300 tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
echo 'Audio service started' && \
xargs -a tests/apope_sample.txt mycroft-core/bin/mycroft-speak && \
echo 'Speak request sent' && \
mkdir -p "${MIMIC_DIR}" && \
for i in $(seq 1 300); do \
for i in $(seq 1 "${timeout_sec}"); do \
wav_path="$(find "${MIMIC_DIR}" -name '*.wav' | head -n1)"; \
if [ -n "${wav_path}" ]; then \
mv "${wav_path}" tests/actual_sample.wav; \
break; \
fi; \
sleep 1; \
echo "Looking for WAV file in ${MIMIC_DIR}"; \
echo "${i}/${timeout_sec}: Looking for WAV file in ${MIMIC_DIR}"; \
done
# Check sample