2021-12-12 20:49:01 +00:00
|
|
|
name: CTest
|
2021-12-12 20:44:18 +00:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-05-23 12:26:14 +00:00
|
|
|
# The CMake configure and build commands are platform-agnostic and should work equally
|
2021-12-12 20:44:18 +00:00
|
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
|
|
# cross-platform coverage.
|
|
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-09-17 14:31:19 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-12 20:44:18 +00:00
|
|
|
|
2022-10-05 17:43:23 +00:00
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
|
|
|
|
|
2022-05-21 23:04:17 +00:00
|
|
|
- name: Install packages
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-10-05 17:43:23 +00:00
|
|
|
sudo apt-get install octave octave-common octave-signal sox portaudio19-dev python3-pyaudio
|
2022-10-07 15:44:10 +00:00
|
|
|
pip3 install psutil crcengine ujson pyserial numpy structlog sounddevice pyaudio
|
2022-05-29 13:27:26 +00:00
|
|
|
pip3 install pytest pytest-rerunfailures
|
2021-12-12 20:44:18 +00:00
|
|
|
|
2022-05-21 23:04:17 +00:00
|
|
|
- name: Build codec2
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/drowe67/codec2.git
|
2022-05-20 13:55:22 +00:00
|
|
|
cd codec2 && git checkout master # This should be pinned to a release
|
2022-05-21 23:04:17 +00:00
|
|
|
mkdir -p build_linux && cd build_linux && cmake .. && make
|
2021-12-12 20:44:18 +00:00
|
|
|
|
2022-05-21 23:04:17 +00:00
|
|
|
- name: run ctests
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{github.workspace}}
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake -DCODEC2_BUILD_DIR=$GITHUB_WORKSPACE/codec2/build_linux ..
|
|
|
|
ctest --output-on-failure
|