name: sanitizer-test-gcc on: push: pull_request: types: [opened, reopened] env: GTEST_OUTPUT: xml:./ jobs: sanitizer-test-gcc: runs-on: ubuntu-22.04 steps: - name: Prepare run: | set -ex sudo apt-get update sudo apt-get install -y --no-install-recommends \ ca-certificates \ cmake \ g++ \ gettext \ libcurl4-openssl-dev \ libdeflate-dev \ libevent-dev \ libfmt-dev \ libminiupnpc-dev \ libnatpmp-dev \ libpsl-dev \ libssl-dev \ ninja-build - name: Checkout uses: actions/checkout@v3 with: path: src submodules: recursive - name: Configure run: | cmake \ -S src \ -B obj \ -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER='g++' \ -DCMAKE_CXX_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,pointer-compare,pointer-subtract,leak,undefined' \ -DCMAKE_C_COMPILER='gcc' \ -DCMAKE_C_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,pointer-compare,pointer-subtract,leak,undefined' \ -DCMAKE_INSTALL_PREFIX=pfx \ -DENABLE_CLI=OFF \ -DENABLE_GTK=OFF \ -DENABLE_QT=OFF \ `#-DENABLE_WEB=ON` - name: Build run: cmake --build obj --config Debug --target libtransmission-test transmission-show - name: Test run: cmake -E chdir obj ctest --build-config Debug --output-on-failure