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

chore(CI): Disable online tests in all but one CI job

They're still slightly flaky even with insanely long timeouts, and even when not they waste a huge amount of our runner time sitting and waiting for the DHT to disconnect and reconnect.

Still run on our fedora job to get almost all of the benefit, plus AddressSanitizer is enabled there for better testing synergy.
This commit is contained in:
Anthony Bilinski 2022-03-08 18:55:53 -08:00
parent e316a683ff
commit fd2997c2db
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
4 changed files with 31 additions and 6 deletions

View File

@ -20,6 +20,14 @@ set -eu -o pipefail
readonly BIN_NAME="qTox.dmg"
while (( $# > 0 )); do
case $1 in
--run-tests) RUN_TESTS=1; shift ;;
--online-tests) ONLINE_TESTS=1; shift ;;
*) echo "Unexpected argument $1"; exit 1 ;;
esac
done
build_qtox() {
cmake -DUPDATE_CHECK=ON \
-DSPELL_CHECK=OFF \
@ -27,8 +35,14 @@ build_qtox() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" .
make -j$(sysctl -n hw.ncpu)
export CTEST_OUTPUT_ON_FAILURE=1
ctest -j$(sysctl -n hw.ncpu)
if [ ! -z ${RUN_TESTS+x} ]; then
EXCLUDE_TESTS=""
if [ -z ${ONLINE_TESTS+x} ]; then
EXCLUDE_TESTS="-E core"
fi
export CTEST_OUTPUT_ON_FAILURE=1
ctest ${EXCLUDE_TESTS} -j$(sysctl -n hw.ncpu)
fi
make install
}

View File

@ -28,6 +28,7 @@ while (( $# > 0 )); do
--minimal) MINIMAL=1 ; shift ;;
--full) MINIMAL=0; shift ;;
--sanitize) SANITIZE=1; shift ;;
--online-tests) ONLINE_TESTS=1; shift ;;
--build-type) BUILD_TYPE=$2; shift 2 ;;
--help|-h) usage; exit 1 ;;
*) echo "Unexpected argument $1"; usage; exit 1 ;;
@ -71,5 +72,10 @@ else
$SANITIZE_ARGS
fi
EXCLUDE_TESTS=""
if [ -z ${ONLINE_TESTS+x} ]; then
EXCLUDE_TESTS="-E core"
fi
cmake --build . -- -j $(nproc)
ctest -j$(nproc)
ctest ${EXCLUDE_TESTS} -j$(nproc)

View File

@ -123,7 +123,7 @@ jobs:
with:
docker_image_name: fedora
- name: Run build
run: docker-compose run --rm fedora ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} --sanitize
run: docker-compose run --rm fedora ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} --sanitize --online-tests
build-opensuse:
name: Opensuse
runs-on: ubuntu-latest
@ -501,7 +501,7 @@ jobs:
- name: Install toxcore and toxext
run: buildscripts/build_toxcore_linux.sh
- name: Build qTox
run: ./.ci-scripts/build-osx.sh
run: ./.ci-scripts/build-osx.sh --run-tests
- name: Upload dmg
uses: actions/upload-artifact@v2
with:

View File

@ -37,6 +37,7 @@ while (( $# > 0 )); do
--src-dir) QTOX_SRC_DIR=$2; shift 2 ;;
--arch) ARCH=$2; shift 2 ;;
--run-tests) RUN_TESTS=1; shift ;;
--online-tests) ONLINE_TESTS=1; shift ;;
--build-type) BUILD_TYPE=$2; shift 2;;
*) "Unexpected argument $1"; exit 1 ;;
esac
@ -116,7 +117,11 @@ then
export WINEPATH='/export;/windows/bin'
export CTEST_OUTPUT_ON_FAILURE=1
export PATH="$PATH:/opt/wine-stable/bin"
ctest -j$(nproc)
EXCLUDE_TESTS=""
if [ -z ${ONLINE_TESTS+x} ]; then
EXCLUDE_TESTS="-E core"
fi
ctest ${EXCLUDE_TESTS} -j$(nproc)
fi
set -u