mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-06 21:01:42 +02:00
Add unit-tests to CI
This commit is contained in:
parent
81e05254dc
commit
fe6c40fa8d
1 changed files with 52 additions and 0 deletions
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
|
@ -52,6 +52,58 @@ jobs:
|
||||||
run: cmake --build build --target ${{ matrix.tool }}
|
run: cmake --build build --target ${{ matrix.tool }}
|
||||||
|
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
sanitizer:
|
||||||
|
- asan
|
||||||
|
- tsan
|
||||||
|
include:
|
||||||
|
- sanitizer: asan
|
||||||
|
param: "ASAN=ON"
|
||||||
|
- compiler: tsan
|
||||||
|
param: "TSAN=ON"
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: print environment
|
||||||
|
run: env
|
||||||
|
- name: dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && \
|
||||||
|
sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev \
|
||||||
|
libopus-dev alsa-utils libpulse-dev libavahi-client-dev libssl-dev \
|
||||||
|
avahi-daemon debhelper ccache expat cppcheck
|
||||||
|
- name: cache boost
|
||||||
|
id: cache-boost
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: boost_${{ env.BOOST_VERSION }}
|
||||||
|
key: boost-${{ env.BOOST_VERSION }}
|
||||||
|
enableCrossOsArchive: true
|
||||||
|
- name: get boost
|
||||||
|
if: steps.cache-boost.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2
|
||||||
|
tar xjf boost_${BOOST_VERSION}.tar.bz2
|
||||||
|
- name: configure
|
||||||
|
run: |
|
||||||
|
cmake -S . -B build \
|
||||||
|
-DWERROR=ON \
|
||||||
|
-DBUILD_TESTS=ON \
|
||||||
|
-D${{ matrix.param }} \
|
||||||
|
-DBOOST_ROOT=boost_${BOOST_VERSION} \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \
|
||||||
|
-DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14"
|
||||||
|
- name: analysis
|
||||||
|
run: cmake --build build --verbose
|
||||||
|
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue