Skip to content

Commit

Permalink
Add unit-tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Jun 6, 2024
1 parent 539ce07 commit a4971b5
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,58 @@ jobs:
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:

strategy:
Expand Down

0 comments on commit a4971b5

Please sign in to comment.