Skip to content

Commit

Permalink
Add CI tests with temporary in-place config.json updates
Browse files Browse the repository at this point in the history
As part of #67 the configurations is planned to be dynamically loaded.
This is a hacky test to see if we can use this in the meantime.
  • Loading branch information
omeryusufyagci committed Nov 12, 2024
1 parent fc05e05 commit 79ebcfe
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 4 deletions.
72 changes: 70 additions & 2 deletions .github/workflows/build_test_and_format_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ on:
- main

jobs:
test:
test-linux:
name: Linux Test
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Dependencies
- name: Install Dependencies on Linux
run: |
sudo apt update
sudo apt install -y ffmpeg cmake nlohmann-json3-dev libsndfile1-dev g++
- name: Update Config Paths for Linux
run: |
sed -i 's|"deep_filter_path": ".*"|"deep_filter_path": "MediaProcessor/lib/libdf.so"|' config.json
sed -i 's|"ffmpeg_path": ".*"|"ffmpeg_path": "/usr/bin/ffmpeg"|' config.json
- name: Build with Tests Enabled
run: |
mkdir -p build
Expand All @@ -33,7 +39,69 @@ jobs:
cd build
ctest --output-on-failure
test-windows:
name: Windows Test
runs-on: windows-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Dependencies on Windows
run: |
choco install ffmpeg cmake -y
curl -L -o nlohmann-json.zip https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp.zip
tar -xf nlohmann-json.zip
- name: Update Config Paths for Windows
run: |
sed -i 's|"deep_filter_path": ".*"|"deep_filter_path": "MediaProcessor/lib/df.dll"|' config.json
sed -i 's|"ffmpeg_path": ".*"|"ffmpeg_path": "ffmpeg"|' config.json
- name: Build with Tests Enabled
run: |
mkdir -p build
cd build
cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ../MediaProcessor
cmake --build . --config Release
- name: Run Tests
run: |
cd build
ctest --output-on-failure
test-macos:
name: macOS ARM Test
runs-on: macos-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Dependencies on macOS ARM
run: |
brew update
brew install ffmpeg cmake nlohmann-json libsndfile
- name: Update Config Paths for macOS ARM
run: |
sed -i '' 's|"deep_filter_path": ".*"|"deep_filter_path": "MediaProcessor/lib/libdf.dylib"|' config.json
sed -i '' 's|"ffmpeg_path": ".*"|"ffmpeg_path": "/usr/local/bin/ffmpeg"|' config.json
- name: Build with Tests Enabled
run: |
mkdir -p build
cd build
cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ../MediaProcessor
cmake --build . --config Release
- name: Run Tests
run: |
cd build
ctest --output-on-failure
format:
name: Format Check
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions MediaProcessor/src/AudioProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ bool AudioProcessor::filterChunks() {
results.emplace_back(pool.enqueue([&, i]() {
fs::path chunkPath = m_chunkPathCol[i];

invokeDeepFilter(chunkPath);
// invokeDeepFilterFFI(chunkPath); // RT API still under validation
// invokeDeepFilter(chunkPath);
invokeDeepFilterFFI(chunkPath);
}));
}

Expand Down

0 comments on commit 79ebcfe

Please sign in to comment.