mirror of
https://github.com/pstrueb/piper.git
synced 2026-06-02 01:47:02 +00:00
Move test into main Docker build
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
*
|
||||
!Makefile
|
||||
!src/cpp/
|
||||
!local/en-us/lessac/low/en-us-lessac-low.onnx
|
||||
!local/en-us/lessac/low/en-us-lessac-low.onnx.json
|
||||
+19
-1
@@ -47,6 +47,24 @@ RUN mkdir -p piper && \
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
FROM scratch
|
||||
FROM debian:buster as test
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
WORKDIR /test
|
||||
|
||||
COPY local/en-us/lessac/low/en-us-lessac-low.onnx \
|
||||
local/en-us/lessac/low/en-us-lessac-low.onnx.json ./
|
||||
|
||||
COPY --from=build /dist/piper_*.tar.gz ./
|
||||
RUN tar -xzf piper*.tar.gz
|
||||
RUN echo 'This is a test.' | ./piper/piper -m en-us-lessac-low.onnx -f test.wav
|
||||
RUN if [ ! -f test.wav ]; then exit 1; fi
|
||||
RUN size="$(wc -c < test.wav)"; \
|
||||
if [ "${size}" -lt "1000" ]; then echo "File size is ${size} bytes"; exit 1; fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=test /test/piper_*.tar.gz /test/test.wav ./
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*
|
||||
!Makefile
|
||||
!src/cpp/
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM debian:buster
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
COPY local/en-us/ljspeech/low/en-us-ljspeech-low.onnx \
|
||||
local/en-us/ljspeech/low/en-us-ljspeech-low.onnx.json ./
|
||||
|
||||
ADD dist/linux_${TARGETARCH}${TARGETVARIANT}/piper_${TARGETARCH}${TARGETVARIANT}.tar.gz ./
|
||||
|
||||
RUN cd piper/ && echo 'This is a test.' | ./piper -m ../en-us-ljspeech-low.onnx -f test.wav
|
||||
RUN if [ ! -f piper/test.wav ]; then exit 1; fi
|
||||
RUN size="$(wc -c < piper/test.wav)"; \
|
||||
if [ "${size}" -lt "1000" ]; then echo "File size is ${size} bytes"; exit 1; fi
|
||||
@@ -1,3 +0,0 @@
|
||||
*
|
||||
!dist/
|
||||
!local/en-us/ljspeech/low/
|
||||
Reference in New Issue
Block a user