Skip to content

Commit a19653f

Browse files
committed
Merge remote-tracking branch 'origin/main' into kal-align-2pass
2 parents 1c18c6a + eabbe5c commit a19653f

42 files changed

Lines changed: 1753 additions & 1538 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/api-docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Update API Documentation
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types:
6+
- published
7+
8+
permissions: {}
9+
10+
jobs:
11+
build-docs:
12+
name: Build API Documentation
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
17+
with:
18+
persist-credentials: false
19+
20+
- name: Install doxygen
21+
run: sudo apt-get install doxygen
22+
23+
- name: Build doxygen
24+
run: |
25+
cmake -S. -Bbuild
26+
cmake --build build --target docs
27+
28+
- name: Upload Artifact
29+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # was: actions/upload-artifact@v7
30+
with:
31+
name: api-docs
32+
path: build/doxygen/html
33+
34+
commit-docs:
35+
name: Update cmusphinx.github.io
36+
needs: build-docs
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: write
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
43+
with:
44+
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
45+
repository: cmusphinx/cmusphinx.github.io
46+
47+
- name: Remove Previous Docs
48+
run: rm -rf doc/pocketsphinx
49+
50+
- name: Download Artifact
51+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
52+
with:
53+
name: api-docs
54+
path: doc/pocketsphinx
55+
56+
- name: Commit upstream
57+
run: |
58+
git config user.name "github-actions[bot]"
59+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
60+
git add doc/pocketsphinx
61+
if git commit -m 'chore: update PocketSphinx API documentation'; then
62+
git push
63+
fi

.github/workflows/build_wheels.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types:
6+
- published
7+
8+
permissions: {}
9+
10+
jobs:
11+
build_wheels:
12+
name: Build wheels on ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
needs: build_sdist
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
22+
23+
- name: Build wheels
24+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # was: pypa/cibuildwheel@v3.4.1
25+
26+
- name: Upload
27+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # was: actions/upload-artifact@v7
28+
with:
29+
name: cibw-wheels-${{ matrix.os }}
30+
path: ./wheelhouse/*.whl
31+
32+
build_sdist:
33+
name: Build source distribution
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
38+
39+
- name: Build SDist
40+
run: pipx run build --sdist
41+
42+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # was: actions/upload-artifact@v7
43+
with:
44+
name: cibw-sdist
45+
path: dist/*.tar.gz
46+
47+
upload_pypi:
48+
needs: [build_wheels, build_sdist]
49+
runs-on: ubuntu-latest
50+
environment: pypi
51+
permissions:
52+
id-token: write
53+
# Comment this line for testing
54+
if: github.event_name == 'release' && github.event.action == 'published'
55+
steps:
56+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
57+
with:
58+
# unpacks all CIBW artifacts into dist/
59+
pattern: cibw-*
60+
path: dist
61+
merge-multiple: true
62+
63+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
64+
# To test uploads to TestPyPI, uncomment the following:
65+
# with:
66+
# repository-url: https://test.pypi.org/legacy/

.github/workflows/tests.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ name: Run Tests
22
on:
33
- push
44
- workflow_dispatch
5+
6+
permissions: {}
7+
58
jobs:
69
test:
710
runs-on: ubuntu-latest
811
steps:
912
- name: Checkout
10-
uses: actions/checkout@v6
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
1114
- name: Install
1215
run: |
1316
sudo apt-get install sox ninja-build
@@ -22,7 +25,7 @@ jobs:
2225
runs-on: ubuntu-latest
2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@v6
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
2629
- name: Install
2730
run: |
2831
sudo apt-get install sox ninja-build
@@ -40,36 +43,34 @@ jobs:
4043
fail-fast: true
4144
matrix:
4245
py:
43-
- "3.13"
44-
- "3.12"
45-
- "3.11"
46-
- "3.10"
47-
- "3.9"
46+
- "3.14"
4847
- "3.8"
4948
os:
5049
- ubuntu-latest
50+
- ubuntu-24.04-arm
5151
- macos-latest
5252
- windows-latest
5353
steps:
54-
- uses: actions/checkout@v6
54+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
5555
- name: Setup python for test ${{ matrix.py }}
56-
uses: actions/setup-python@v6
56+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # was: actions/setup-python@v6
5757
with:
5858
python-version: ${{ matrix.py }}
5959
- name: Install sox
6060
if: ${{ startsWith(matrix.os, 'ubuntu') }}
6161
run: sudo apt-get install sox
62-
- name: Install tox
63-
run: python -m pip install tox-gh>=1.2
64-
- name: Setup test suite
65-
run: tox -vv --notest
66-
- name: Run test suite
67-
run: tox --skip-pkg-install
62+
- name: Install pytest
63+
run: |
64+
python -m pip install --upgrade pip
65+
python -m pip install pytest memory_profiler
66+
python -m pip install .
67+
- name: Run tests
68+
run: pytest
6869
pytest-editable:
6970
runs-on: ubuntu-latest
7071
steps:
7172
- name: Checkout
72-
uses: actions/checkout@v6
73+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # was: actions/checkout@v6
7374
- name: Install
7475
run: |
7576
sudo apt-get install sox

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ include/pocketsphinx/sphinx_config.h
2020
pocketsphinx.pc
2121
test/testfuncs.sh
2222
test/unit/test_macros.h
23+
test/regression/*.json
24+
test/regression/*.log
25+
/Testing
26+
_test_solve.out
27+
test/unit/**/*.out

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM alpine:latest as runtime
1+
FROM alpine:latest AS runtime
22
RUN apk add --no-cache python3 py3-pip sox portaudio alsa-utils alsaconf
33

4-
FROM runtime as build
4+
FROM runtime AS build
55
RUN apk add --no-cache cmake ninja gcc musl-dev python3-dev pkgconfig
66

77
COPY . /pocketsphinx

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PocketSphinx 5.1.0rc1
1+
PocketSphinx 5.1.0rc2
22
=====================
33

44
This is PocketSphinx, one of Carnegie Mellon University's open source large
@@ -172,7 +172,56 @@ also read the [documentation for the Python
172172
API](https://pocketsphinx.readthedocs.io) or [the C
173173
API](https://cmusphinx.github.io/doc/pocketsphinx/)
174174

175-
Authors
175+
Development
176+
-----------
177+
178+
There isn't quite enough information here for potential developers,
179+
but here's a start. The C API documentation is built with Doxygen,
180+
which will be auto-detected when running CMake. If you have it
181+
installed, you can build the docs with:
182+
183+
cmake --build build --target docs
184+
185+
There is a suite of regression and unit tests, run with:
186+
187+
cmake --build build --target check
188+
189+
You can run it somewhat faster with:
190+
191+
cd build && ctest -j4 # or however many CPUs you want to use
192+
193+
Somewhat confusingly (because readthedocs needs it, I think?), the
194+
Python API documentation is in the `docs` directory which has nothing
195+
to do with the abovementioned CMake target. These use some extra
196+
dependencies named in `docs/requirements.txt`. To build the
197+
documentation first set up a virtual environment, then run `make` in
198+
the `docs` directory, with one of its many targets (`html` here will
199+
make multi-page HTML documentation):
200+
201+
python3 -m venv ~/ve_pocketsphinx
202+
. ~/ve_pocketsphinx/bin/activate
203+
pip install -r docs/requirements.txt
204+
make -C docs html
205+
206+
There are also Python regression tests, of course, which for some
207+
reason require `memory_profiler`:
208+
209+
python3 -m venv ~/ve_pocketsphinx
210+
. ~/ve_pocketsphinx/bin/activate
211+
pip install -e .
212+
pip install memory_profiler
213+
pytest
214+
215+
Most, but not all of the release process is managed with GitHub
216+
Actions, namely the "Release" and "Update API Documentation"
217+
workflows. The notable exception here is updating the version, which
218+
is done with [Bump My
219+
Version](https://github.com/callowayproject/bump-my-version).
220+
221+
Also, the [Read The Docs](https://pocketsphinx.readthedocs.io) pages
222+
must be updated manually, it seems (maybe this will be fixed soon).
223+
224+
AUTHORS
176225
-------
177226

178227
PocketSphinx is ultimately based on `Sphinx-II` which in turn was

TODO.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

cython/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PocketSphinx 5.1.0rc1
1+
PocketSphinx 5.1.0rc2
22
=====================
33

44
This is PocketSphinx, one of Carnegie Mellon University's open source large

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'David Huggins-Daines'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '5.1.0rc1'
25+
release = '5.1.0rc2'
2626

2727

2828
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)