aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml48
-rw-r--r--autotests/callcandidateseventtest.cpp2
2 files changed, 28 insertions, 22 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 47e55421..c78a5981 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,7 +71,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -qq install ninja-build valgrind
- echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=quotest/.valgrind.supp" >>$GITHUB_ENV
+ echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=$GITHUB_WORKSPACE/quotest/.valgrind.supp" >>$GITHUB_ENV
- name: Setup build environment
run: |
@@ -97,8 +97,17 @@ jobs:
fi
echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV
echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \
- -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV
+ -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local\
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" >>$GITHUB_ENV
+
+ if [[ '${{ runner.os }}' != 'Windows' ]]; then
+ BIN_DIR=/bin
+ fi
+ echo "BIN_DIR=$BIN_DIR" >>$GITHUB_ENV
+ echo "~/.local$BIN_DIR" >>$GITHUB_PATH
+
cmake -E make_directory ${{ runner.workspace }}/build
+ echo "BUILD_PATH=${{ runner.workspace }}/build/libQuotient" >>$GITHUB_ENV
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
@@ -108,23 +117,23 @@ jobs:
- name: Build and install olm
if: matrix.e2ee
+ working-directory: ${{ runner.workspace }}
run: |
- cd ..
git clone https://gitlab.matrix.org/matrix-org/olm.git
- cmake -S olm -B olm/build $CMAKE_ARGS
- cmake --build olm/build --target install
+ cmake -S olm -B build/olm $CMAKE_ARGS
+ cmake --build build/olm --target install
echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV
- name: Pull CS API and build GTAD
if: matrix.update-api
+ working-directory: ${{ runner.workspace }}
run: |
- cd ..
git clone https://github.com/matrix-org/matrix-doc.git
git clone --recursive https://github.com/KitsuneRal/gtad.git
- cmake -S gtad -B gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF
- cmake --build gtad
- echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=$GITHUB_WORKSPACE/../matrix-doc \
- -DGTAD_PATH=$GITHUB_WORKSPACE/../gtad/gtad" \
+ cmake -S gtad -B build/gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF
+ cmake --build build/gtad
+ echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc \
+ -DGTAD_PATH=${{ runner.workspace }}/build/gtad/gtad" \
>>$GITHUB_ENV
echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with API files regeneration" >>$GITHUB_ENV
@@ -140,22 +149,17 @@ jobs:
- name: Configure libQuotient
run: |
- if [[ '${{ runner.os }}' == 'Windows' ]]; then
- BIN_DIR=.
- else
- BIN_DIR=bin
- fi
- echo "BIN_DIR=$BIN_DIR" >>$GITHUB_ENV
- cmake -S $GITHUB_WORKSPACE -B build $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee }}
+ cmake -S $GITHUB_WORKSPACE -B $BUILD_PATH $CMAKE_ARGS \
+ -DQuotient_ENABLE_E2EE=${{ matrix.e2ee }} -DQuotient_INSTALL_TESTS=ON
- name: Regenerate API code
if: matrix.update-api
- run: cmake --build build --target update-api
+ run: cmake --build ../build/libQuotient --target update-api
- name: Build and install libQuotient
run: |
- cmake --build build --target install
- ls ~/.local/$BIN_DIR/quotest
+ cmake --build $BUILD_PATH --target all install
+ ls ~/.local$BIN_DIR/quotest
- name: Run tests
env:
@@ -164,7 +168,9 @@ jobs:
QT_LOGGING_RULES: 'quotient.main.debug=true;quotient.jobs.debug=true'
QT_MESSAGE_PATTERN: '%{time h:mm:ss.zzz}|%{category}|%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}|%{message}'
run: |
- [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN"
+ ctest --test-dir $BUILD_PATH --output-on-failure
+ [[ -z "$TEST_USER" ]] || \
+ $VALGRIND quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN"
timeout-minutes: 4 # quotest is supposed to finish within 3 minutes, actually
- name: Perform CodeQL analysis
diff --git a/autotests/callcandidateseventtest.cpp b/autotests/callcandidateseventtest.cpp
index 1a69cb66..0d5a543b 100644
--- a/autotests/callcandidateseventtest.cpp
+++ b/autotests/callcandidateseventtest.cpp
@@ -53,5 +53,5 @@ void TestCallCandidatesEvent::fromJson()
QStringLiteral("candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0"));
}
-QTEST_MAIN(TestCallCandidatesEvent)
+QTEST_APPLESS_MAIN(TestCallCandidatesEvent)
#include "callcandidateseventtest.moc"