diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4716763..4284438 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Windows Release on: push: - branches: [main] + branches: ['**'] tags: - 'v*' @@ -10,7 +10,62 @@ env: MINGW_ROOT: /usr/x86_64-w64-mingw32/sys-root/mingw jobs: + test: + runs-on: ubuntu-latest + container: + image: fedora:41 + + steps: + - name: Install build tools and test dependencies + run: | + dnf install -y git gcc-c++ libsamplerate-devel python3 + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fix git ownership + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Compile ring buffer tests + run: | + g++ -std=c++17 -pthread \ + tests/test_ring_buffer.cpp \ + -I include/ \ + -o tests/test_ring_buffer + + - name: Run ring buffer tests + timeout-minutes: 2 + run: ./tests/test_ring_buffer + + - name: Compile resampler quality tests + run: | + g++ -std=c++17 \ + tests/test_resampler_quality.cpp \ + src/audio/Resampler.cpp \ + -I include/ \ + -lsamplerate \ + -DHAVE_LIBSAMPLERATE \ + -o tests/test_resampler_quality + + - name: Run resampler quality tests + run: ./tests/test_resampler_quality + + - name: Validate Python plugin syntax + run: | + echo "Checking Python plugin files for syntax errors..." + python3 -m py_compile plugins_py/nda_py_utils/__init__.py + python3 -m py_compile plugins_py/nda_py_utils/audio_ring_buffer.py + python3 -m py_compile plugins_py/examples/passthrough.py + python3 -m py_compile plugins_py/examples/simple_gain.py + python3 -m py_compile plugins_py/examples/fernet_encryptor.py + python3 -m py_compile plugins_py/examples/fernet_decryptor.py + echo "All Python plugin files pass syntax check" + build-windows: + needs: test + if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest container: image: fedora:41