forked from bootphon/phonemizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
continuous integration on GitHub for Linux/MacOS/Windows (bootphon#80)
Also: - bugfix with festival backend on Windows - fixed some tests on Windows
- Loading branch information
Mathieu Bernard
authored
Sep 29, 2021
1 parent
bb52397
commit 700e06f
Showing
14 changed files
with
293 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Test on Linux Ubuntu with festival-2.5 with various Python and espeak versions | ||
|
||
name: Linux | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
python-version: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
|
||
steps: | ||
- name: Checkout phonemizer | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system dependencies | ||
run: sudo apt-get install espeak-ng festival mbrola mbrola-fr1 | ||
|
||
- name: Install phonemizer | ||
run: | | ||
pip install --upgrade pip pytest pytest-cov | ||
python setup.py install | ||
- name: Version phonemizer | ||
run: phonemize --version | ||
|
||
- name: Test phonemizer | ||
run: pytest -v --cov=phonemizer --cov-report=xml test/ | ||
|
||
- name: Upload coverage to Codecov | ||
if: ${{ matrix.python-version == '3.9' }} | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: coverage.xml | ||
verbose: true | ||
|
||
espeak-version: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
espeak-version: ['1.48.03', '1.49.2', '1.50', 'master'] | ||
|
||
steps: | ||
- name: Checkout phonemizer | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install system dependencies | ||
run: sudo apt-get install festival mbrola mbrola-fr1 | ||
|
||
- name: Install espeak-1.48 | ||
if: ${{ matrix.espeak-version == '1.48.03' }} | ||
run: sudo apt install espeak | ||
|
||
- name: Install espeak>=1.49 | ||
if: ${{ matrix.espeak-version != '1.48.03' }} | ||
env: | ||
ESPEAK_VERSION: ${{ matrix.espeak-version }} | ||
run: | | ||
sudo apt-get install make autoconf automake libtool pkg-config gcc libsonic-dev libpcaudio-dev git | ||
git clone --depth 1 --branch $ESPEAK_VERSION https://github.com/espeak-ng/espeak-ng.git | ||
cd espeak-ng | ||
./autogen.sh | ||
./configure | ||
make | ||
sudo make install | ||
sudo ldconfig | ||
espeak --version | ||
- name: Install phonemizer | ||
run: | | ||
pip install --upgrade pip pytest | ||
python setup.py install | ||
- name: Version phonemizer | ||
run: phonemize --version | ||
|
||
- name: Test phonemizer | ||
run: pytest -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Test on macos with festival-2.4 compiled from source and espeak-1.48 from | ||
# homebrew. To save time and ressources, festival is cached across runs. | ||
|
||
name: MacOS | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: macos-latest | ||
|
||
env: | ||
PHONEMIZER_FESTIVAL_PATH: ${{ github.workspace }}/festival/build_festival/festival/bin/festival | ||
|
||
steps: | ||
- name: Checkout phonemizer | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install espeak-1.48 | ||
run: | | ||
brew update | ||
brew install espeak | ||
- name: Cache festival | ||
uses: actions/cache@v2 | ||
id: cache-festival | ||
with: | ||
path: ${{ github.workspace }}/festival | ||
key: ${{ runner.os }}-festival | ||
|
||
- name: Checkout festival | ||
if: steps.cache-festival.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: pettarin/setup-festival-mbrola | ||
path: festival | ||
|
||
- name: Install festival | ||
if: steps.cache-festival.outputs.cache-hit != 'true' | ||
run: | | ||
cd festival | ||
bash setup_festival_mbrola.sh . festival | ||
- name: Install phonemizer | ||
run: | | ||
pip install --upgrade pip | ||
python setup.py install | ||
pip install --upgrade pytest | ||
- name: Version phonemizer | ||
run: phonemize --version | ||
|
||
- name: Test phonemizer | ||
run: pytest -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Uppload to pypi on new tags | ||
|
||
name: Publish to Pypi | ||
|
||
on: | ||
push: | ||
tags: v* | ||
branches: master | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout phonemizer | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install system dependencies | ||
run: sudo apt-get install espeak-ng festival mbrola mbrola-fr1 | ||
|
||
- name: Build phonemizer | ||
run: | | ||
pip install --upgrade pip pytest | ||
python setup.py install | ||
pytest | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to Pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Test on windows with espeak-1.50 and festival-2.5 | ||
|
||
name: Windows | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: windows-latest | ||
|
||
env: | ||
PHONEMIZER_ESPEAK_PATH: "C:\\Program Files\\eSpeak NG\\espeak-ng.exe" | ||
PHONEMIZER_FESTIVAL_PATH: "C:\\festival\\src\\main\\festival.exe" | ||
|
||
steps: | ||
- name: Checkout phonemizer | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Cache festival | ||
uses: actions/cache@v2 | ||
id: cache-festival | ||
with: | ||
path: | | ||
C:\festival | ||
C:\speech_tools | ||
key: ${{ runner.os }}-festival | ||
|
||
- name: Install espeak | ||
if: steps.cache-espeak.outputs.cache-hit != 'true' | ||
run: | | ||
$source = 'https://github.com/espeak-ng/espeak-ng/releases/download/1.50/espeak-ng-20191129-b702b03-x64.msi' | ||
Invoke-WebRequest -Uri $source -OutFile espeak.msi | ||
Start-Process msiexec.exe -Wait -ArgumentList '/I espeak.msi /qn' | ||
- name: Install festival | ||
if: steps.cache-festival.outputs.cache-hit != 'true' | ||
run: | | ||
$uri = "https://sourceforge.net/projects/e-guidedog/files/related-third-party-software/0.3" | ||
$webclient = New-Object System.Net.WebClient | ||
$webclient.DownloadFile("$uri" + "/festival-2.5-win.7z", "festival-2.5.7z") | ||
$webclient.DownloadFile("$uri" + "/speech_tools-2.5-win.7z", "speech_tools-2.5.7z") | ||
set-alias sz "$env:ProgramFiles\7-Zip\7z.exe" | ||
sz x -oC:\ festival-2.5.7z | ||
sz x -oC:\ speech_tools-2.5.7z | ||
- name: Install phonemizer | ||
run: | | ||
pip install --upgrade pip pytest | ||
python setup.py install | ||
- name: Version phonemizer | ||
run: | | ||
phonemize --version | ||
- name: Test phonemizer | ||
run: pytest -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
/build/* | ||
/dist/* | ||
.coverage* | ||
coverage.xml | ||
htmlcov/* | ||
.eggs/* | ||
test/htmlcov |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.