Skip to content

Commit c958ac1

Browse files
Merge pull request #985 from DrewThomasson/v25
V25 merge into main
2 parents 59cdf65 + 99a9dfb commit c958ac1

File tree

2 files changed

+34
-150
lines changed

2 files changed

+34
-150
lines changed

.github/workflows/Docker-Build.yml

Lines changed: 18 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -17,155 +17,15 @@ on:
1717
- dockerfiles/**
1818
- Notebooks/**
1919

20-
jobs:
21-
macos-E2A:
22-
runs-on: [self-hosted, macos]
23-
24-
steps:
25-
- name: Print runner info
26-
run: |
27-
echo "Running on:"
28-
uname -a
29-
sw_vers
30-
31-
- name: Print current commit SHA (GitHub variable)
32-
run: echo "Current commit SHA is ${{ github.sha }}"
33-
34-
- name: Wipe & Re-Install E2A
35-
if: ${{ inputs.wipeAndReinstall }}
36-
run: rm -rf ~/ebook2audiobook
37-
38-
- name: Clone ebook2audiobook
39-
shell: bash
40-
run: |
41-
if [ -d ~/ebook2audiobook ]; then
42-
cd ~/ebook2audiobook
43-
git fetch --all
44-
git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
45-
else
46-
git clone https://github.com/DrewThomasson/ebook2audiobook.git ~/ebook2audiobook
47-
cd ~/ebook2audiobook
48-
git fetch --all
49-
git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
50-
fi
51-
52-
- name: Initalize conda for Unidict
53-
shell: bash
54-
run: |
55-
echo "Initializing conda..."
56-
# Properly initialize Conda, if needed (Needed for unidict to download) you may need a diff for mac and windows and mac depending on the runner
57-
#source /opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh
58-
source "$(conda info --base)/etc/profile.d/conda.sh"
59-
echo "conda initilized!"
60-
61-
- name: Ebook2audiobook install
62-
shell: bash
63-
run: |
64-
echo "Running help install test..."
65-
# ./ebook2audiobook.sh --help
66-
cd ~/ebook2audiobook
67-
source "$(conda info --base)/etc/profile.d/conda.sh"
68-
conda deactivate
69-
source "$(conda info --base)/etc/profile.d/conda.sh"
70-
conda deactivate
71-
# Safely initialize conda (portable across systems)
72-
source "$(conda info --base)/etc/profile.d/conda.sh"
73-
74-
# Now deactivate safely
75-
conda deactivate
76-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine yourtts
77-
78-
- name: Add set -e at beginning of ebook2audiobook.sh (for error passing)
79-
shell: bash
80-
run: |
81-
echo "Adding set -e at beginning of ebook2audiobook.sh (for error passing)..."
82-
cd ~/ebook2audiobook
83-
source "$(conda info --base)/etc/profile.d/conda.sh"
84-
conda deactivate
85-
sed -i '' '1s;^;set -e\n;' ebook2audiobook.sh
86-
87-
- name: English TACOTRON2 Custom-Voice headless single test
88-
shell: bash
89-
run: |
90-
echo "Running English TACOTRON2 Custom-Voice headless single test..."
91-
cd ~/ebook2audiobook
92-
source "$(conda info --base)/etc/profile.d/conda.sh"
93-
conda deactivate
94-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine TACOTRON2 --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
95-
96-
97-
- name: English FAIRSEQ Custom-Voice headless single test
98-
shell: bash
99-
run: |
100-
echo "Running English FAIRSEQ Custom-Voice headless single test..."
101-
cd ~/ebook2audiobook
102-
source "$(conda info --base)/etc/profile.d/conda.sh"
103-
conda deactivate
104-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine FAIRSEQ --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
105-
106-
107-
- name: Unusual FAIRSEQ Custom-Voice headless single test
108-
shell: bash
109-
run: |
110-
echo "Running Unusual FAIRSEQ Custom-Voice headless single test..."
111-
cd ~/ebook2audiobook
112-
source "$(conda info --base)/etc/profile.d/conda.sh"
113-
conda deactivate
114-
./ebook2audiobook.sh --headless --language urd-script_devanagari --ebook "tools/workflow-testing/urd-script_davanagari-test.txt" --tts_engine FAIRSEQ --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
115-
116-
- name: English VITS Custom-Voice headless single test
117-
shell: bash
118-
run: |
119-
echo "Running English VITS Custom-Voice headless single test..."
120-
121-
cd ~/ebook2audiobook
122-
source "$(conda info --base)/etc/profile.d/conda.sh"
123-
conda deactivate
124-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine VITS --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
125-
126-
- name: English YOURTTS Custom-Voice headless batch test
127-
shell: bash
128-
run: |
129-
echo "Running English YOURTTS Custom-Voice headless batch test..."
130-
cd ~/ebook2audiobook
131-
source "$(conda info --base)/etc/profile.d/conda.sh"
132-
conda deactivate
133-
./ebook2audiobook.sh --headless --language eng --ebooks_dir "tools/workflow-testing" --tts_engine YOURTTS --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
134-
135-
136-
- name: Default XTTSv2 headless Custom-Voice single test
137-
shell: bash
138-
run: |
139-
echo "Running Default XTTSv2 headless Custom-Voice single test..."
140-
cd ~/ebook2audiobook
141-
source "$(conda info --base)/etc/profile.d/conda.sh"
142-
conda deactivate
143-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine XTTSv2 --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
144-
145-
- name: English XTTSv2 headless fine-tuned XTTSv2 model single test
146-
shell: bash
147-
run: |
148-
echo "Running English XTTSv2 headless fine-tuned XTTSv2 model single test..."
149-
cd ~/ebook2audiobook
150-
source "$(conda info --base)/etc/profile.d/conda.sh"
151-
conda deactivate
152-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine XTTSv2 --fine_tuned AiExplained
153-
154-
- name: English BARK Custom-Voice headless single test
155-
shell: bash
156-
run: |
157-
echo "Running English XTTSv2 headless fine-tuned XTTSv2 model single test..."
158-
cd ~/ebook2audiobook
159-
source "$(conda info --base)/etc/profile.d/conda.sh"
160-
conda deactivate
161-
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine BARK --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
162-
163-
164-
165-
20+
workflow_run:
21+
workflows: ["Mac E2A Test"]
22+
types:
23+
- completed
24+
branches:
25+
- main
16626

27+
jobs:
16728
DockerBuild:
168-
needs: macos-E2A
16929
runs-on: [self-hosted, macos]
17030
steps:
17131

@@ -223,8 +83,12 @@ jobs:
22383
-t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:latest \
22484
--push .
22585
86+
- name: Prune docker & buildx
87+
run: |
88+
docker system prune -af --volumes
89+
docker buildx prune -af
90+
22691
huggingface-build:
227-
needs: macos-E2A
22892
runs-on: [self-hosted, macos]
22993
steps:
23094

@@ -266,4 +130,9 @@ jobs:
266130
-t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:HuggingfaceSpace \
267131
--push .
268132
269-
133+
- name: Prune docker & buildx
134+
run: |
135+
docker system prune -af --volumes
136+
docker buildx prune -af
137+
138+

.github/workflows/E2A-Test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
wipeAndReinstall:
77
type: boolean
88
description: 'Wipe & Re-Install E2A'
9+
910
pull_request:
1011
branches:
1112
- main
@@ -21,6 +22,20 @@ on:
2122
- dockerfiles/**
2223
- Notebooks/**
2324

25+
push:
26+
branches:
27+
- main
28+
paths-ignore:
29+
- CODE_OF_CONDUCT.md
30+
- LICENSE
31+
- README.md
32+
- readme/**
33+
- dockerfiles/**
34+
- Notebooks/**
35+
36+
release:
37+
types:
38+
- published
2439

2540

2641
jobs:
@@ -164,4 +179,4 @@ jobs:
164179
source "$(conda info --base)/etc/profile.d/conda.sh"
165180
conda deactivate
166181
./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine BARK --voice "voices/eng/elder/male/DavidAttenborough_24000.wav"
167-
182+

0 commit comments

Comments
 (0)