forked from drowe67/codec2-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 2.14 KB
/
Copy pathcmake.yml
File metadata and controls
65 lines (53 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CMake
on: [pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# 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:
- uses: actions/checkout@v2
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind
- name: Create Build Directory
shell: bash
run: mkdir $GITHUB_WORKSPACE/build_linux
- name: Configure codec2 CMake
shell: bash
working-directory: ${{github.workspace}}/build_linux
run: cmake -DUNITTEST=1 $GITHUB_WORKSPACE
- name: Build codec2
working-directory: ${{github.workspace}}/build_linux
shell: bash
# First pass build of codec2 without LPCNet
run: make -j4
- name: Build LPCNet
shell: bash
run: |
cd $HOME
git clone https://github.com/drowe67/LPCNet.git
cd LPCNet && mkdir -p build_linux && cd build_linux
cmake -DCODEC2_BUILD_DIR=$GITHUB_WORKSPACE/build_linux ..
make
cd src && sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s > /dev/null
- name: Rebuild codec2 with LPCNet
working-directory: ${{github.workspace}}/build_linux
shell: bash
# Second pass build of codec2 with LPCNet
run: |
cmake -DLPCNET_BUILD_DIR=$HOME/LPCNet/build_linux -DUNITTEST=1 $GITHUB_WORKSPACE
make -j4
- name: Run ctests
working-directory: ${{github.workspace}}/build_linux
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --output-on-failure