mirror of
https://github.com/drowe67/codec2
synced 2026-08-14 19:31:34 -04:00
ctest, README.md, first pass at github action
This commit is contained in:
parent
7e88771a42
commit
ea0379f375
5 changed files with 18 additions and 6 deletions
1
.github/workflows/cmake.yml
vendored
1
.github/workflows/cmake.yml
vendored
|
|
@ -22,6 +22,7 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind clang-format
|
||||
sudo apt-get install texmaker texlive-bibtex-extra texlive-science
|
||||
|
||||
- name: Create Build Directory
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -312,6 +312,10 @@ if(UNITTEST)
|
|||
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR};
|
||||
clang-format --dry-run --Werror src/*.c src/*.h unittest/*.c demo/*.c")
|
||||
|
||||
add_test(NAME test_codec2_doc
|
||||
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/doc;
|
||||
CODEC2_SRC=${CMAKE_CURRENT_SOURCE_DIR} CODEC2_BINARY=${CMAKE_CURRENT_BINARY_DIR} make")
|
||||
|
||||
add_test(NAME test_freedv_get_hash
|
||||
COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/thash")
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,10 @@ We have standardized on C99 and develop and test using gcc on a Linux platform.
|
|||
make
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
An algorithm description can be found in `doc/codec2.pdf`.
|
||||
|
||||
## Programs
|
||||
|
||||
+ See `demo` directory for simple examples of using Codec and the FreeDV API.
|
||||
|
|
@ -138,7 +142,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn
|
|||
|
||||
1. Install GNU Octave and libraries on Ubuntu with:
|
||||
```
|
||||
sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format
|
||||
sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format texmaker texlive-bibtex-extra texlive-science
|
||||
```
|
||||
1. To build and run the tests:
|
||||
```
|
||||
|
|
@ -180,6 +184,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn
|
|||
```
|
||||
cmake - cmake support files
|
||||
demo - Simple Codec 2 and FreeDv API demo applications
|
||||
doc - documentation
|
||||
octave - Octave scripts used to support ctests
|
||||
src - C source code for Codec 2, FDMDV modem, COHPSK modem, FreeDV API
|
||||
raw - speech files in raw format (16 bits signed linear 8 kHz)
|
||||
|
|
|
|||
12
doc/Makefile
12
doc/Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile for codec2.pdf
|
||||
#
|
||||
# usage:
|
||||
# Build codec2 with -DDUMP (see README)
|
||||
# Build codec2 with -DUNITEST=1 (see README)
|
||||
# cd ~/codec2/doc
|
||||
# make
|
||||
|
||||
|
|
@ -9,14 +9,16 @@
|
|||
# defaults below. Need to run cmake with -DDUMP
|
||||
|
||||
CODEC2_SRC ?= $(HOME)/codec2
|
||||
CODEC2_BINARY ?= $(HOME)/codec2/build_linux/src
|
||||
CODEC2_BINARY ?= $(HOME)/codec2/build_linux
|
||||
|
||||
PATH := $(PATH):$(CODEC2_BINARY)
|
||||
PATH := $(PATH):$(CODEC2_BINARY)/src
|
||||
|
||||
DOCNAME := codec2
|
||||
PLOT_FILES := hts2a_37_sn.tex hts2a_37_sw.tex hts2a_37_lpc_lsp.tex hts2a_37_lpc_pf.tex
|
||||
|
||||
$(DOCNAME).pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib
|
||||
# For automated tests we always want to build the PDF, despite codec2.pdf existing in the repo
|
||||
.PHONY: pdf
|
||||
pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib
|
||||
pdflatex $(DOCNAME).tex
|
||||
bibtex $(DOCNAME).aux
|
||||
pdflatex $(DOCNAME).tex
|
||||
|
|
@ -29,4 +31,4 @@ $(PLOT_FILES):
|
|||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm *.blg *.bbl *.aux *.log $(DOCNAME).pdf
|
||||
rm -f *.blg *.bbl *.aux *.log *.out $(DOCNAME).pdf hts2a*
|
||||
BIN
doc/codec2.pdf
BIN
doc/codec2.pdf
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue