1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat(CI): Run AddressSanitizer on Fedora build

Keep disabled for jobs that produce artifacts to not affect user performance.
Keep disabled for other distros that don't produce artifacts as well since other versions of Qt fail themselves in e.g. TestSmileyPack's QGuiApplication usage.

Don't enable thread sanitizer yet due to many Qt internal errors.

This should still give us a significant increase in qTox coverage, even if we have low platform coverage.
This commit is contained in:
Anthony Bilinski 2022-02-17 07:36:14 -08:00
parent 25b70761e5
commit bf6d01598f
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 12 additions and 4 deletions

View File

@ -27,6 +27,7 @@ while (( $# > 0 )); do
case $1 in case $1 in
--minimal) MINIMAL=1 ; shift ;; --minimal) MINIMAL=1 ; shift ;;
--full) MINIMAL=0; shift ;; --full) MINIMAL=0; shift ;;
--sanitize) SANITIZE=1; shift ;;
--build-type) BUILD_TYPE=$2; shift 2 ;; --build-type) BUILD_TYPE=$2; shift 2 ;;
--help|-h) usage; exit 1 ;; --help|-h) usage; exit 1 ;;
*) echo "Unexpected argument $1"; usage; exit 1 ;; *) echo "Unexpected argument $1"; usage; exit 1 ;;
@ -45,6 +46,11 @@ if [ -z "${BUILD_TYPE+x}" ]; then
exit 1 exit 1
fi fi
SANITIZE_ARGS=""
if [ ! -z ${SANITIZE+x} ]; then
SANITIZE_ARGS="-DASAN=ON"
fi
SRCDIR=/qtox SRCDIR=/qtox
export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_OUTPUT_ON_FAILURE=1
@ -53,14 +59,16 @@ if [ $MINIMAL -eq 1 ]; then
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DSMILEYS=DISABLED \ -DSMILEYS=DISABLED \
-DSTRICT_OPTIONS=ON \ -DSTRICT_OPTIONS=ON \
-DSPELL_CHECK=OFF -DSPELL_CHECK=OFF \
$SANITIZE_ARGS
else else
cmake "$SRCDIR" \ cmake "$SRCDIR" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DUPDATE_CHECK=ON \ -DUPDATE_CHECK=ON \
-DSTRICT_OPTIONS=ON \ -DSTRICT_OPTIONS=ON \
-DCODE_COVERAGE=ON \ -DCODE_COVERAGE=ON \
-DDESKTOP_NOTIFICATIONS=ON -DDESKTOP_NOTIFICATIONS=ON \
$SANITIZE_ARGS
fi fi
cmake --build . -- -j $(nproc) cmake --build . -- -j $(nproc)

View File

@ -109,7 +109,7 @@ jobs:
- name: Run build - name: Run build
run: docker-compose run --rm almalinux ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} run: docker-compose run --rm almalinux ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }}
build-fedora: build-fedora:
name: Fedora name: Fedora with ASAN
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build-fedora-docker needs: build-fedora-docker
strategy: strategy:
@ -123,7 +123,7 @@ jobs:
with: with:
docker_image_name: fedora docker_image_name: fedora
- name: Run build - name: Run build
run: docker-compose run --rm fedora ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} run: docker-compose run --rm fedora ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} --sanitize
build-opensuse: build-opensuse:
name: Opensuse name: Opensuse
runs-on: ubuntu-latest runs-on: ubuntu-latest