From 68eabcc5e33f4f29f3fb2e57e3f1adbaf719661d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 29 Dec 2020 20:47:15 +0100 Subject: First shot at GHA --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..03909550 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CMake + +on: [push] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: RelWithDebInfo + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 1 + matrix: + os: [ubuntu-18.04, macos-10.15] +# e2ee: [false, true] + compiler: [gcc, clang] + exclude: + - os: macos-10.15 + compiler: gcc + + steps: + - uses: actions/checkout@v2 + + - name: Cache Qt + id: cache-qt + uses: actions/cache@v2 + with: + path: ../Qt + key: ${{ runner.os }}-QtCache + + - name: Install Qt + uses: jurplel/install-qt-action@v2.11.1 + with: + version: '5.9.9' + cached: ${{ steps.cache-qt.outputs.cache-hit }} + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + env: + CXX: ${{ matrix.compiler }} +# working-directory: ${{runner.workspace}}/build + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: cmake -Bbuild -S$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + run: cmake --build build --target quotest + +# - name: Test +# working-directory: ${{runner.workspace}}/build +# run: quotest ... -- cgit v1.2.3 From 1156f7bda0bb3728fb275cb1a12580bfb84156b1 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 29 Dec 2020 21:08:59 +0100 Subject: Fix using a C compiler for CXX; don't fail-fast --- .github/workflows/ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03909550..af8b7eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,15 @@ jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false max-parallel: 1 matrix: os: [ubuntu-18.04, macos-10.15] # e2ee: [false, true] - compiler: [gcc, clang] + compilers: [ 'CC=gcc CXX=g++', 'CC=clang CXX=clang++'] exclude: - os: macos-10.15 - compiler: gcc + compilers: 'CC=gcc CXX=g++' steps: - uses: actions/checkout@v2 @@ -30,26 +31,23 @@ jobs: id: cache-qt uses: actions/cache@v2 with: - path: ../Qt + path: ../../Qt key: ${{ runner.os }}-QtCache - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: version: '5.9.9' + dir: ${{runner.workspace}}/.. cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure CMake - env: - CXX: ${{ matrix.compiler }} -# working-directory: ${{runner.workspace}}/build - # Note the current convention is to use the -S and -B options here to specify source - # and build directories, but this is only available with CMake 3.13 and higher. - # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake -Bbuild -S$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: | + export ${{matrix.compilers}} + cmake -Bbuild -S$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS - name: Build run: cmake --build build --target quotest -- cgit v1.2.3 From 0c375fcd31448ef470e9a840fb1130775ef05e88 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 30 Dec 2020 09:23:32 +0100 Subject: Use the default path to install Qt --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af8b7eb1..8d45b09a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,14 +31,14 @@ jobs: id: cache-qt uses: actions/cache@v2 with: - path: ../../Qt + path: ${{runner.workspace}}/Qt key: ${{ runner.os }}-QtCache - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: version: '5.9.9' - dir: ${{runner.workspace}}/.. +# dir: ${{runner.home}} cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Create Build Environment -- cgit v1.2.3 From c315330cbee1c0fbd10352e0a38b51874f649cd0 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 30 Dec 2020 16:03:35 +0100 Subject: Add E2EE config; install libQuotient, build quotest --- .github/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d45b09a..68fca800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,6 @@ name: CMake on: [push] -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: RelWithDebInfo - defaults: run: shell: bash @@ -15,43 +11,61 @@ jobs: runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 1 +# max-parallel: 1 matrix: os: [ubuntu-18.04, macos-10.15] -# e2ee: [false, true] + e2ee: ['e2ee', ''] compilers: [ 'CC=gcc CXX=g++', 'CC=clang CXX=clang++'] exclude: - os: macos-10.15 compilers: 'CC=gcc CXX=g++' + env: + DESTDIR: ${{ github.workspace }} + CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=${{ github.workspace }}/usr' + steps: - uses: actions/checkout@v2 + with: + submodules: ${{ matrix.e2ee == 'e2ee' }} - name: Cache Qt id: cache-qt uses: actions/cache@v2 with: - path: ${{runner.workspace}}/Qt + path: ${{ runner.workspace }}/Qt key: ${{ runner.os }}-QtCache - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: version: '5.9.9' -# dir: ${{runner.home}} cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Create Build Environment - run: cmake -E make_directory ${{runner.workspace}}/build + run: cmake -E make_directory ${{ runner.workspace }}/build - - name: Configure CMake + - name: Build and install olm + if: ${{ matrix.e2ee == 'e2ee' }} run: | - export ${{matrix.compilers}} - cmake -Bbuild -S$GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS + git clone https://gitlab.matrix.org/matrix-org/olm.git + pushd olm + cmake . -Bbuild $CMAKE_ARGS + cmake --build build --target install + popd - - name: Build - run: cmake --build build --target quotest + - name: Configure libQuotient + run: | + export ${{ matrix.compilers }} + cmake $GITHUB_WORKSPACE -Bbuild $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee == 'e2ee' }} + + - name: Build and install libQuotient + run: cmake --build build --target install -# - name: Test -# working-directory: ${{runner.workspace}}/build -# run: quotest ... + - name: Build tests + run: | + cmake tests -Bbuild-test $CMAKE_ARGS + cmake --build build-test --target all + +# - name: Run tests +# run: build-test/quotest -- cgit v1.2.3 From 99beeb1f4a51a7fad2d1620aa5c7851a1938554c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 30 Dec 2020 18:10:44 +0100 Subject: A few renames; trigger by PRs too; start quotest --- .github/workflows/ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68fca800..b2d2cab4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,20 @@ -name: CMake +name: CI -on: [push] +on: + push: + pull_request: + types: [opened, reopened] defaults: run: shell: bash jobs: - build: + CI: runs-on: ${{ matrix.os }} strategy: fail-fast: false -# max-parallel: 1 + max-parallel: 1 matrix: os: [ubuntu-18.04, macos-10.15] e2ee: ['e2ee', ''] @@ -67,5 +70,8 @@ jobs: cmake tests -Bbuild-test $CMAKE_ARGS cmake --build build-test --target all -# - name: Run tests -# run: build-test/quotest + - name: Run tests + env: + TEST_USER: ${{ secrets.TEST_USER }} + TEST_PWD: ${{ secrets.TEST_PWD }} + run: build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "CI job ${{ github.job }}" -- cgit v1.2.3 From d46f9498c1deef0a229de693b1b5954fa9fd5bf2 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 1 Jan 2021 12:13:13 +0100 Subject: Better quotest origin line; setup CC/CXX globally There's no "job number" anymore but a textual description of the job is even better. --- .github/workflows/ci.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2d2cab4..b1474133 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,11 @@ jobs: max-parallel: 1 matrix: os: [ubuntu-18.04, macos-10.15] - e2ee: ['e2ee', ''] - compilers: [ 'CC=gcc CXX=g++', 'CC=clang CXX=clang++'] + e2ee: [e2ee, ''] + compiler: [ GCC, Clang ] exclude: - os: macos-10.15 - compilers: 'CC=gcc CXX=g++' + compiler: GCC env: DESTDIR: ${{ github.workspace }} @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: ${{ matrix.e2ee == 'e2ee' }} + submodules: ${{ matrix.e2ee != '' }} - name: Cache Qt id: cache-qt @@ -46,20 +46,29 @@ jobs: cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Create Build Environment - run: cmake -E make_directory ${{ runner.workspace }}/build + run: | + if [ "${{ matrix.compiler }}" == "GCC" ]; then + echo "CC=gcc" >>$GITHUB_ENV + echo "CXX=g++" >>$GITHUB_ENV + else + echo "CC=clang" >>$GITHUB_ENV + echo "CXX=clang++" >>$GITHUB_ENV + fi + echo "QUOTEST_ORIGIN=${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV + cmake -E make_directory ${{ runner.workspace }}/build - name: Build and install olm - if: ${{ matrix.e2ee == 'e2ee' }} + if: ${{ matrix.e2ee != '' }} run: | git clone https://gitlab.matrix.org/matrix-org/olm.git pushd olm cmake . -Bbuild $CMAKE_ARGS cmake --build build --target install popd + echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN, E2EE" >>$GITHUB_ENV - name: Configure libQuotient run: | - export ${{ matrix.compilers }} cmake $GITHUB_WORKSPACE -Bbuild $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee == 'e2ee' }} - name: Build and install libQuotient @@ -74,4 +83,4 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - run: build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "CI job ${{ github.job }}" + run: build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" -- cgit v1.2.3 From 6a97ce7e39ff23a398dd5a53d76cfc9ea3d1efcb Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 1 Jan 2021 12:57:54 +0100 Subject: Add update-api support Along adding update-api support DESTDIR and CMAKE_ARGS were moved to the environment setup step in order to use `${{ runner.workspace }}` for installation and not pollute `${{ github.workspace }}` where libQuotient sources reside. --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1474133..4e4e9209 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,15 +17,15 @@ jobs: max-parallel: 1 matrix: os: [ubuntu-18.04, macos-10.15] - e2ee: [e2ee, ''] compiler: [ GCC, Clang ] + # Not using binary values here, to make the job captions more readable + e2ee: [ '', 'E2EE' ] + update-api: [ '', 'update-api' ] exclude: - os: macos-10.15 compiler: GCC - - env: - DESTDIR: ${{ github.workspace }} - CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=${{ github.workspace }}/usr' + - e2ee: '' # Somewhat reduce the number of combinations to check + update-api: 'update-api' steps: - uses: actions/checkout@v2 @@ -45,7 +45,7 @@ jobs: version: '5.9.9' cached: ${{ steps.cache-qt.outputs.cache-hit }} - - name: Create Build Environment + - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then echo "CC=gcc" >>$GITHUB_ENV @@ -55,21 +55,40 @@ jobs: echo "CXX=clang++" >>$GITHUB_ENV fi echo "QUOTEST_ORIGIN=${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV + echo "DESTDIR=${{ runner.workspace }}" >>$GITHUB_ENV + echo "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=${{ runner.workspace }}/usr" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build - name: Build and install olm - if: ${{ matrix.e2ee != '' }} + if: matrix.e2ee run: | + cd ${{ runner.workspace }} git clone https://gitlab.matrix.org/matrix-org/olm.git pushd olm - cmake . -Bbuild $CMAKE_ARGS + cmake . -B build $CMAKE_ARGS cmake --build build --target install popd - echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN, E2EE" >>$GITHUB_ENV + echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV - - name: Configure libQuotient + - name: Pull CS API and build GTAD + if: matrix.update-api run: | - cmake $GITHUB_WORKSPACE -Bbuild $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee == 'e2ee' }} + cd ${{ runner.workspace }} + git clone https://github.com/matrix-org/matrix-doc.git + git clone --recursive https://github.com/KitsuneRal/gtad.git + pushd gtad + cmake . $CMAKE_ARGS + cmake --build . + popd + echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" >>$GITHUB_ENV + echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV + + - name: Configure libQuotient + run: cmake -S $GITHUB_WORKSPACE -B build $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee }} + + - name: Regenerate API code + if: matrix.update-api + run: cmake --build build --target update-api - name: Build and install libQuotient run: cmake --build build --target install -- cgit v1.2.3 From 788db43da4c8cd609189b7c2c5b4358cb303492c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 1 Jan 2021 18:43:02 +0100 Subject: GTAD requires GCC 8 at least --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e4e9209..fa28127e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,9 @@ jobs: - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then - echo "CC=gcc" >>$GITHUB_ENV - echo "CXX=g++" >>$GITHUB_ENV + if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-8'; fi + echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV + echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV else echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV -- cgit v1.2.3 From 10ba44adf1f782a62ff9d30b929554057c35b00f Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 1 Jan 2021 21:34:15 +0100 Subject: Add Valgrind on Linux --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa28127e..c5f02a03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,12 @@ jobs: version: '5.9.9' cached: ${{ steps.cache-qt.outputs.cache-hit }} + - name: Install Valgrind + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get install valgrind + echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=tests/.valgrind.supp" >>$GITHUB_ENV + - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then @@ -103,4 +109,4 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - run: build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + run: $VALGRIND build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" -- cgit v1.2.3 From 21ff5c1e92624b09a1f065af07d8330c8aedcd58 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 8 Jan 2021 08:37:38 +0100 Subject: Add a timeout to quotest runs The current Quotest gets stuck somewhere, and the its big internal 3-minute watchdog doesn't cut it for some reason. While investigating that, an external timeout would be quite handy. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5f02a03..a374fac0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,3 +110,4 @@ jobs: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} run: $VALGRIND build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From 723563bb27ceb17594eb04784449cd9f8ea6001d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 11 Jan 2021 19:15:36 +0100 Subject: Don't run the test if TEST_USER is empty --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a374fac0..082ce005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,7 @@ jobs: cmake --build build-test --target all - name: Run tests + if: secrets.TEST_USER != '' env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} -- cgit v1.2.3 From 0990ab8121002e1613ac68558e07c74855370713 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 11 Jan 2021 19:17:43 +0100 Subject: Ok, do the same in a different way --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 082ce005..201a4186 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,9 +106,9 @@ jobs: cmake --build build-test --target all - name: Run tests - if: secrets.TEST_USER != '' env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - run: $VALGRIND build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + run: | + [[ -z "$TEST_USER" ]] || $VALGRIND build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From ced197fc6606c0f12eee161408742da54f40411b Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 22 Jan 2021 17:30:20 +0100 Subject: Adjust according to the just merged PR --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 201a4186..d121e432 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,13 +102,13 @@ jobs: - name: Build tests run: | - cmake tests -Bbuild-test $CMAKE_ARGS - cmake --build build-test --target all + cmake -S quotest -Bbuild-quotest $CMAKE_ARGS + cmake --build build-quotest --target all - name: Run tests env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} run: | - [[ -z "$TEST_USER" ]] || $VALGRIND build-test/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -z "$TEST_USER" ]] || $VALGRIND build-quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From 08de0609df2649170ecdc927c312e08387e6cc67 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 09:14:14 +0100 Subject: CI: no need to explicitly build quotest Now that CTest is included, quotest target should build (and install) automatically together with the library. --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d121e432..7077ff35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,15 +100,10 @@ jobs: - name: Build and install libQuotient run: cmake --build build --target install - - name: Build tests - run: | - cmake -S quotest -Bbuild-quotest $CMAKE_ARGS - cmake --build build-quotest --target all - - name: Run tests env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} run: | - [[ -z "$TEST_USER" ]] || $VALGRIND build-quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From e23cddccf0dbafdb5e8d3503d6f6b7491f5b9010 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 14:02:45 +0100 Subject: CI: include github.ref in the quotest origin --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7077ff35..5def16ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV fi - echo "QUOTEST_ORIGIN=${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV + echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV echo "DESTDIR=${{ runner.workspace }}" >>$GITHUB_ENV echo "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=${{ runner.workspace }}/usr" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build -- cgit v1.2.3 From 579fc2504be9e5e0291e44da685f10a21a4c64a5 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 11:07:45 +0100 Subject: CI: install to ~/.local; invoke quotest from there That way InstallQuotest feature is also tested. Also fix the Valgrind suppression file path. Also: use cmake arguments instead of pushd/popd dance --- .github/workflows/ci.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5def16ee..52580dd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: if: contains(matrix.os, 'ubuntu') run: | sudo apt-get install valgrind - echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=tests/.valgrind.supp" >>$GITHUB_ENV + echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=quotest/.valgrind.supp" >>$GITHUB_ENV - name: Setup build environment run: | @@ -62,8 +62,8 @@ jobs: echo "CXX=clang++" >>$GITHUB_ENV fi echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV - echo "DESTDIR=${{ runner.workspace }}" >>$GITHUB_ENV - echo "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=${{ runner.workspace }}/usr" >>$GITHUB_ENV + echo "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build - name: Build and install olm @@ -71,10 +71,11 @@ jobs: run: | cd ${{ runner.workspace }} git clone https://gitlab.matrix.org/matrix-org/olm.git - pushd olm - cmake . -B build $CMAKE_ARGS - cmake --build build --target install - popd + cmake -S olm -B olm/build $CMAKE_ARGS + cmake --build olm/build --target install + OLM_SO_PATH=$(dirname $(find ~/.local/lib* -name libolm.so)) + test -n "$OLM_SO_PATH" + echo "DEP_SO_PATH=$OLM_SO_PATH" >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV - name: Pull CS API and build GTAD @@ -83,10 +84,8 @@ jobs: cd ${{ runner.workspace }} git clone https://github.com/matrix-org/matrix-doc.git git clone --recursive https://github.com/KitsuneRal/gtad.git - pushd gtad - cmake . $CMAKE_ARGS - cmake --build . - popd + cmake -S gtad -B gtad $CMAKE_ARGS + cmake --build gtad echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV @@ -98,12 +97,15 @@ jobs: run: cmake --build build --target update-api - name: Build and install libQuotient - run: cmake --build build --target install + run: | + cmake --build build --target install + ls ~/.local/bin/quotest - name: Run tests env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} + LD_LIBRARY_PATH: "${{ env.DEP_SO_PATH }}:${{ env.Qt5_DIR }}/lib" run: | - [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -z "$TEST_USER" ]] || $VALGRIND ~/.local/bin/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From d4005a2ee5fbd51ae169b8827421f448a4cf8050 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 16:19:50 +0100 Subject: Use Ninja --- .github/workflows/ci.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52580dd9..bebeff8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,24 +45,28 @@ jobs: version: '5.9.9' cached: ${{ steps.cache-qt.outputs.cache-hit }} - - name: Install Valgrind - if: contains(matrix.os, 'ubuntu') + - name: Install Ninja (macOS) + if: ${{ !startsWith(matrix.os, 'ubuntu') }} + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Install Ninja and Valgrind (Linux) + if: startsWith(matrix.os, 'ubuntu') run: | - sudo apt-get install valgrind + 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 - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then - if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-8'; fi - echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV - echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV + if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-8'; fi + echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV + echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV else - echo "CC=clang" >>$GITHUB_ENV - echo "CXX=clang++" >>$GITHUB_ENV + echo "CC=clang" >>$GITHUB_ENV + echo "CXX=clang++" >>$GITHUB_ENV fi echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV - echo "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo \ + echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build -- cgit v1.2.3 From 37fde3d877b162e8867416bd1d70ee0808976620 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 17:05:06 +0100 Subject: CI: build libraries statically Shared libraries are a bit of a chore to handle, maybe another time. --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bebeff8a..b69d34e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: echo "CXX=clang++" >>$GITHUB_ENV fi echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV - echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \ -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build @@ -77,9 +77,6 @@ jobs: git clone https://gitlab.matrix.org/matrix-org/olm.git cmake -S olm -B olm/build $CMAKE_ARGS cmake --build olm/build --target install - OLM_SO_PATH=$(dirname $(find ~/.local/lib* -name libolm.so)) - test -n "$OLM_SO_PATH" - echo "DEP_SO_PATH=$OLM_SO_PATH" >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV - name: Pull CS API and build GTAD @@ -90,7 +87,9 @@ jobs: git clone --recursive https://github.com/KitsuneRal/gtad.git cmake -S gtad -B gtad $CMAKE_ARGS cmake --build gtad - echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" >>$GITHUB_ENV + echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc \ + -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" \ + >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV - name: Configure libQuotient @@ -109,7 +108,7 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - LD_LIBRARY_PATH: "${{ env.DEP_SO_PATH }}:${{ env.Qt5_DIR }}/lib" + LD_LIBRARY_PATH: "${{ env.Qt5_DIR }}/lib" run: | [[ -z "$TEST_USER" ]] || $VALGRIND ~/.local/bin/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From 302dbc2df4e55855d1c9a97f679101e9d40a260e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 17:18:12 +0100 Subject: Make quotest origin even more informative --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b69d34e7..946b3073 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,14 @@ jobs: echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV fi - echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV + if grep -q 'refs/tags' <<<'${{ github.ref }}'; then + VERSION="$(git describe --tags)" + elif [ '${{ github.ref }}' == 'refs/heads/master' ]; then + VERSION="ci${{ github.run_number }}-$(git rev-parse --short HEAD)" + else + VERSION="$(git describe --all --contains)-ci${{ github.run_number }}-$(git rev-parse --short HEAD)" + 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 cmake -E make_directory ${{ runner.workspace }}/build -- cgit v1.2.3 From dbbd2c61c912769c8a0063454862fa2168e7afd9 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 25 Jan 2021 18:28:48 +0100 Subject: Revert to running quotest from the source tree For some reason the installed one doesn't find QtTest dynamic library. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 946b3073..fd6f489e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,6 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - LD_LIBRARY_PATH: "${{ env.Qt5_DIR }}/lib" run: | - [[ -z "$TEST_USER" ]] || $VALGRIND ~/.local/bin/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From f89ece678c47a54a28c91c2d0ced65ba3e9a6540 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 26 Apr 2021 19:12:08 +0200 Subject: CI: Use GCC 9 where GCC 8 was GitHub images no more have GCC 8. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd6f489e..24681460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then - if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-8'; fi + if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-9'; fi echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV else -- cgit v1.2.3 From f4255f83bf5f4bfe03dc7518a89b378d3238c940 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 12 Jun 2021 23:24:19 +0200 Subject: CI: Use Qt 5.12, as required from now --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24681460..00e17f42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: - version: '5.9.9' + version: '5.12.10' cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Install Ninja (macOS) -- cgit v1.2.3 From ab269f183fdc6f611559d69475543089088b4712 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 13 Jun 2021 09:41:28 +0200 Subject: CI: version Qt cache --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00e17f42..ed251bc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: matrix: os: [ubuntu-18.04, macos-10.15] compiler: [ GCC, Clang ] + qt-version: [ '5.12.10' ] # Not using binary values here, to make the job captions more readable e2ee: [ '', 'E2EE' ] update-api: [ '', 'update-api' ] @@ -37,12 +38,12 @@ jobs: uses: actions/cache@v2 with: path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}-QtCache + key: ${{ runner.os }}-Qt${{ matrix.qt-version }}-cache - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: - version: '5.12.10' + version: ${{ matrix.qt-version }} cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Install Ninja (macOS) -- cgit v1.2.3 From 466fe1a43389ac1d7408d32eee3e85e8b074b4bd Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 23 Jun 2021 20:16:04 +0200 Subject: Step to Ubuntu 20.04; drop (old) E2EE code building --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed251bc3..20100e5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,17 +16,15 @@ jobs: fail-fast: false max-parallel: 1 matrix: - os: [ubuntu-18.04, macos-10.15] + os: [ubuntu-20.04, macos-10.15] compiler: [ GCC, Clang ] qt-version: [ '5.12.10' ] # Not using binary values here, to make the job captions more readable - e2ee: [ '', 'E2EE' ] + e2ee: [ '' ] update-api: [ '', 'update-api' ] exclude: - os: macos-10.15 compiler: GCC - - e2ee: '' # Somewhat reduce the number of combinations to check - update-api: 'update-api' steps: - uses: actions/checkout@v2 -- cgit v1.2.3 From 6be4436494506f2fa5dbbdc633577e059a422bfe Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 24 Aug 2021 14:04:49 +0200 Subject: Add Windows, CodeQL Windows and CodeQL snippets picked from Quaternion --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20100e5f..87bb5149 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,13 +18,21 @@ jobs: matrix: os: [ubuntu-20.04, macos-10.15] compiler: [ GCC, Clang ] + platform: [ '' ] qt-version: [ '5.12.10' ] + qt-arch: [ '' ] # Not using binary values here, to make the job captions more readable e2ee: [ '' ] update-api: [ '', 'update-api' ] exclude: - os: macos-10.15 compiler: GCC + include: + - os: windows-2019 + compiler: MSVC + platform: x64 + qt-version: '5.12.10' + qt-arch: win64_msvc2017_64 steps: - uses: actions/checkout@v2 @@ -36,15 +44,16 @@ jobs: uses: actions/cache@v2 with: path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}-Qt${{ matrix.qt-version }}-cache + key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: version: ${{ matrix.qt-version }} + arch: ${{ matrix.qt-arch }} cached: ${{ steps.cache-qt.outputs.cache-hit }} - - name: Install Ninja (macOS) + - name: Install Ninja (macOS/Windows) if: ${{ !startsWith(matrix.os, 'ubuntu') }} uses: seanmiddleditch/gha-setup-ninja@v3 @@ -60,9 +69,13 @@ jobs: if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-9'; fi echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV - else + elif [[ '${{ matrix.compiler }}' == 'Clang' ]]; then echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV + if [[ '${{ runner.os }}' == 'Linux' ]]; then + # Do CodeQL analysis on one of Linux branches + echo "CODEQL_ANALYSIS=true" >>$GITHUB_ENV + fi fi if grep -q 'refs/tags' <<<'${{ github.ref }}'; then VERSION="$(git describe --tags)" @@ -76,6 +89,12 @@ jobs: -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build + - name: Setup MSVC environment + uses: ilammy/msvc-dev-cmd@v1 + if: matrix.compiler == 'MSVC' + with: + arch: ${{ matrix.platform }} + - name: Build and install olm if: matrix.e2ee run: | @@ -97,6 +116,16 @@ jobs: -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" \ >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV + + - name: Initialize CodeQL tools + if: env.CODEQL_ANALYSIS + uses: github/codeql-action/init@v1 + with: + languages: cpp + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - name: Configure libQuotient run: cmake -S $GITHUB_WORKSPACE -B build $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee }} @@ -117,3 +146,7 @@ jobs: run: | [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually + + - name: Perform CodeQL analysis + if: env.CODEQL_ANALYSIS + uses: github/codeql-action/analyze@v1 -- cgit v1.2.3 From 66795dbc90e5013eb5ddf941f7e462053a3d5229 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 24 Aug 2021 19:29:27 +0200 Subject: Fix bin path differences between POSIX and Windows --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87bb5149..9d985fca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,14 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - name: Configure libQuotient - run: cmake -S $GITHUB_WORKSPACE -B build $CMAKE_ARGS -DQuotient_ENABLE_E2EE=${{ matrix.e2ee }} + 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 }} - name: Regenerate API code if: matrix.update-api @@ -137,7 +144,7 @@ jobs: - name: Build and install libQuotient run: | cmake --build build --target install - ls ~/.local/bin/quotest + ls ~/.local/$BIN_DIR/quotest - name: Run tests env: -- cgit v1.2.3 From e150cdaf11800220f2cac0b6b348ebf8583514b0 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 1 Sep 2021 14:10:28 +0200 Subject: Add update-api on Windows pipeline --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d985fca..c90037ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,12 @@ jobs: platform: x64 qt-version: '5.12.10' qt-arch: win64_msvc2017_64 + - os: windows-2019 + compiler: MSVC + platform: x64 + qt-version: '5.12.10' + qt-arch: win64_msvc2017_64 + update-api: update-api steps: - uses: actions/checkout@v2 -- cgit v1.2.3 From 339db5a0e3e458f12beeec57116514e88f8ab354 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 1 Sep 2021 15:34:31 +0200 Subject: Change GTAD/matrix-doc paths `${{ runner.workspace }}` is, unfortunately, not portable to Windows. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c90037ea..670153eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,7 @@ jobs: - name: Build and install olm if: matrix.e2ee run: | - cd ${{ runner.workspace }} + 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 @@ -113,13 +113,13 @@ jobs: - name: Pull CS API and build GTAD if: matrix.update-api run: | - cd ${{ runner.workspace }} + 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 + cmake -S gtad -B gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF cmake --build gtad - echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=${{ runner.workspace }}/matrix-doc \ - -DGTAD_PATH=${{ runner.workspace }}/gtad/gtad" \ + echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=$GITHUB_WORKSPACE/../matrix-doc \ + -DGTAD_PATH=$GITHUB_WORKSPACE/../gtad/gtad" \ >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV -- cgit v1.2.3 From ee678fac0ee09c6262c7a39b2b1072660e6db9ca Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 2 Sep 2021 22:18:14 +0200 Subject: CI experiment: requires GCC 10 and Clang 11 --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 670153eb..47e31d55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,16 +72,17 @@ jobs: - name: Setup build environment run: | if [ "${{ matrix.compiler }}" == "GCC" ]; then - if [ -n "${{ matrix.update-api }}" ]; then VERSION_POSTFIX='-9'; fi - echo "CC=gcc$VERSION_POSTFIX" >>$GITHUB_ENV - echo "CXX=g++$VERSION_POSTFIX" >>$GITHUB_ENV + CXX_VERSION_POSTFIX='-10' + echo "CC=gcc$CXX_VERSION_POSTFIX" >>$GITHUB_ENV + echo "CXX=g++$CXX_VERSION_POSTFIX" >>$GITHUB_ENV elif [[ '${{ matrix.compiler }}' == 'Clang' ]]; then - echo "CC=clang" >>$GITHUB_ENV - echo "CXX=clang++" >>$GITHUB_ENV if [[ '${{ runner.os }}' == 'Linux' ]]; then + CXX_VERSION_POSTFIX='-11' # Do CodeQL analysis on one of Linux branches echo "CODEQL_ANALYSIS=true" >>$GITHUB_ENV fi + echo "CC=clang$CXX_VERSION_POSTFIX" >>$GITHUB_ENV + echo "CXX=clang++$CXX_VERSION_POSTFIX" >>$GITHUB_ENV fi if grep -q 'refs/tags' <<<'${{ github.ref }}'; then VERSION="$(git describe --tags)" -- cgit v1.2.3 From 71b7f05e42f93c3da590b6f7f55658a81b607c0e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 19 Nov 2021 17:17:30 +0100 Subject: Add continue-on-error for regenerated API files The current upstream API definitions are expected to fail the test. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47e31d55..f22ea6d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_DOC_PATH=$GITHUB_WORKSPACE/../matrix-doc \ -DGTAD_PATH=$GITHUB_WORKSPACE/../gtad/gtad" \ >>$GITHUB_ENV - echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN and API files regeneration" >>$GITHUB_ENV + echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with API files regeneration" >>$GITHUB_ENV - name: Initialize CodeQL tools if: env.CODEQL_ANALYSIS @@ -154,6 +154,7 @@ jobs: ls ~/.local/$BIN_DIR/quotest - name: Run tests + continue-on-error: ${{ matrix.update-api != '' }} # the current upstream API definitions are expected to fail the test env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} -- cgit v1.2.3 From 02fa42b8ac5694485c7f6dedc62a873e97da2d35 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 19 Nov 2021 18:57:36 +0100 Subject: continue-on-error on the job level Continue on the step level marks the whole job as successful which is not really accurate. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f22ea6d2..269e487c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ defaults: jobs: CI: runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.update-api != '' }} # the current upstream API definitions are expected to fail the test strategy: fail-fast: false max-parallel: 1 @@ -154,7 +155,6 @@ jobs: ls ~/.local/$BIN_DIR/quotest - name: Run tests - continue-on-error: ${{ matrix.update-api != '' }} # the current upstream API definitions are expected to fail the test env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} -- cgit v1.2.3 From e16ed41a6a28a43919126a85f7a802c5b2e091b6 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 21 Nov 2021 15:29:57 +0100 Subject: CI: Nicer and more detailed logging for quotest --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 269e487c..dd862a0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,6 +158,8 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} + 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" timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From a2cc707107464fd98fc8a33afde3ed29f8cd9526 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 21 Nov 2021 21:48:54 +0100 Subject: CI: Restrict workflow concurrency; tighten job timeout --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 269e487c..1b6d9e52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ defaults: run: shell: bash +concurrency: ci-${{ github.ref }} + jobs: CI: runs-on: ${{ matrix.os }} @@ -160,7 +162,7 @@ jobs: TEST_PWD: ${{ secrets.TEST_PWD }} run: | [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" - timeout-minutes: 5 # quotest is supposed to finish within 3 minutes, actually + timeout-minutes: 4 # quotest is supposed to finish within 3 minutes, actually - name: Perform CodeQL analysis if: env.CODEQL_ANALYSIS -- cgit v1.2.3 From 0a46049ef26270933ecf6fea7395b03e6aee783e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 27 Nov 2021 10:17:51 +0100 Subject: Add SonarCloud analysis to CI --- .github/workflows/ci.yml | 3 +- .github/workflows/sonar.yml | 113 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sonar.yml (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 714473b0..47e55421 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: steps: - uses: actions/checkout@v2 with: + fetch-depth: 0 submodules: ${{ matrix.e2ee != '' }} - name: Cache Qt @@ -126,7 +127,7 @@ jobs: -DGTAD_PATH=$GITHUB_WORKSPACE/../gtad/gtad" \ >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with API files regeneration" >>$GITHUB_ENV - + - name: Initialize CodeQL tools if: env.CODEQL_ANALYSIS uses: github/codeql-action/init@v1 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 00000000..76db59c9 --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,113 @@ +name: Sonar + +on: + push: + pull_request: + types: [opened, reopened] + +defaults: + run: + shell: bash + +jobs: + SonarCloud: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + qt-version: [ '5.12.10' ] + e2ee: [ '', 'e2ee' ] + update-api: [ '', 'update-api' ] + + env: + SONAR_SCANNER_VERSION: 4.6.2.2472 + SONAR_SERVER_URL: "https://sonarcloud.io" + BUILD_WRAPPER_OUT_DIR: build/sonar + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: ${{ matrix.e2ee != '' }} + + - name: Cache Qt + id: cache-qt + uses: actions/cache@v2 + with: + path: ${{ runner.workspace }}/Qt + key: ${{ runner.os }}-Qt${{ matrix.qt-version }}-cache + + - name: Install Qt + uses: jurplel/install-qt-action@v2.11.1 + with: + version: ${{ matrix.qt-version }} +# arch: ${{ matrix.qt-arch }} # Only Windows needs that + cached: ${{ steps.cache-qt.outputs.cache-hit }} + + - name: Install Ninja + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Setup build environment + run: | + echo "CC=gcc-10" >>$GITHUB_ENV + echo "CXX=g++-10" >>$GITHUB_ENV + mkdir -p $HOME/.sonar + echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \ + -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV + cmake -E make_directory ${{ runner.workspace }}/build + + - name: Build and install olm + if: matrix.e2ee + 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 + + - name: Pull CS API and build GTAD + if: matrix.update-api + run: | + cd .. + git clone https://github.com/quotient-im/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" \ + >>$GITHUB_ENV + + - name: Download and set up Sonar Cloud tools + run: | + pushd $HOME/.sonar + curl -sSLo build-wrapper.zip $SONAR_SERVER_URL/static/cpp/build-wrapper-linux-x86.zip + unzip -o build-wrapper.zip + echo "BUILD_WRAPPER=$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux* --out-dir $BUILD_WRAPPER_OUT_DIR" >>$GITHUB_ENV + curl -sSLo sonar-scanner.zip \ + https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip + unzip -o sonar-scanner.zip + popd + + - 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 }} + + - name: Regenerate API code + if: matrix.update-api + run: cmake --build build --target update-api + + - name: Build libQuotient + run: | + $BUILD_WRAPPER cmake --build build --target all + + - name: Run sonar-scanner + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + $HOME/.sonar/sonar-scanner*/bin/sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" -- cgit v1.2.3 From 7ad805492f8b42a4bc854313695a912c89019957 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 27 Jan 2021 17:54:27 +0100 Subject: Fix CI --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47e55421..0b707236 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,12 @@ jobs: with: arch: ${{ matrix.platform }} + - name: Install OpenSSL + if: contains(matrix.os, 'ubuntu') and matrix.e2ee + run: | + sudo apt-get install libssl-dev + echo "openssl version" >>$GITHUB_ENV + - name: Build and install olm if: matrix.e2ee run: | -- cgit v1.2.3 From d04543ba00335d87a872b0f0c8ff35c85301e096 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 31 Aug 2021 00:42:56 +0200 Subject: Try fixing the CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b707236..a1c8bf1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: arch: ${{ matrix.platform }} - name: Install OpenSSL - if: contains(matrix.os, 'ubuntu') and matrix.e2ee + if: ${{ contains(matrix.os, 'ubuntu') && matrix.e2ee }} run: | sudo apt-get install libssl-dev echo "openssl version" >>$GITHUB_ENV -- cgit v1.2.3 From f42b91eb52ea408c6aedd4954cac7eb02e7b0df4 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 31 Aug 2021 00:14:35 +0200 Subject: Try adding qtkeychain to github CI --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1c8bf1d..6f1db8ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,6 +121,14 @@ jobs: cmake --build olm/build --target install echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV + - name: Build and install QtKeychain + if: matrix.e2ee + run: | + cd ${{ runner.workspace }} + git clone https://github.com/frankosterfeld/qtkeychain.git + cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS + cmake --build qtkeychain/build --target install + - name: Pull CS API and build GTAD if: matrix.update-api run: | -- cgit v1.2.3 From 6896d3e1bd57c398bd4e1ee9badac87dc66ccea7 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 20 Nov 2021 00:16:14 +0100 Subject: We always need qtkeychain --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f1db8ef..c2076dea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,6 @@ jobs: echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV - name: Build and install QtKeychain - if: matrix.e2ee run: | cd ${{ runner.workspace }} git clone https://github.com/frankosterfeld/qtkeychain.git -- cgit v1.2.3 From e4802dc967c640ebac1d0bc7db55b47b79233544 Mon Sep 17 00:00:00 2001 From: Tobias Fella <9750016+TobiasFella@users.noreply.github.com> Date: Sat, 20 Nov 2021 20:54:34 +0100 Subject: Try fixing windows CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2076dea..d0c391be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,7 @@ jobs: - name: Build and install QtKeychain run: | - cd ${{ runner.workspace }} + cd .. git clone https://github.com/frankosterfeld/qtkeychain.git cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS cmake --build qtkeychain/build --target install -- cgit v1.2.3 From 9ddb72611f5575ccd5d3b68734a9d40d8ef2befc Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 6 Dec 2021 07:17:17 +0100 Subject: Add execution of autotests to CI --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47e55421..ec6b671c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,7 +154,7 @@ jobs: - name: Build and install libQuotient run: | - cmake --build build --target install + cmake --build build --target all install ls ~/.local/$BIN_DIR/quotest - name: Run tests @@ -164,6 +164,8 @@ 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: | + cd build + ctest --output-on-failure [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 4 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From 449456c2c86f56e9294294e03436d3aa0ff089f5 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 7 Dec 2021 09:43:00 +0100 Subject: Fix quotest invocation; use working-directory --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec6b671c..9eefa43f 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=${{ runner.workspace }}/quotest/.valgrind.supp" >>$GITHUB_ENV - name: Setup build environment run: | @@ -108,8 +108,8 @@ jobs: - name: Build and install olm if: matrix.e2ee + working-directory: '..' 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 @@ -117,8 +117,8 @@ jobs: - name: Pull CS API and build GTAD if: matrix.update-api + working-directory: '..' 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 @@ -163,10 +163,10 @@ jobs: TEST_PWD: ${{ secrets.TEST_PWD }} 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}' + working-directory: build run: | - cd build ctest --output-on-failure - [[ -z "$TEST_USER" ]] || $VALGRIND build/quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -z "$TEST_USER" ]] || $VALGRIND quotest/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 -- cgit v1.2.3 From cb7c57953024a23fc7c20db75f3a15f81bb62bd3 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 7 Dec 2021 14:43:27 +0100 Subject: Fix valgrind invocation failure It turned out that, confusingly, ${{ runner.workspace }} refers to the directory above $GITHUB_WORKSPACE, which is why the previous commit ended up with valgrind not finding its suppressions. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eefa43f..6fdb337a 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=${{ runner.workspace }}/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: | -- cgit v1.2.3 From 0128b8a296b1be7e7702ec525539614d47dd7471 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 7 Dec 2021 14:43:39 +0100 Subject: CI: Put all build directories to ${{ runner.workspace }}/build --- .github/workflows/ci.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fdb337a..2e023230 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,6 +99,7 @@ jobs: echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \ -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV 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 +109,23 @@ jobs: - name: Build and install olm if: matrix.e2ee - working-directory: '..' + working-directory: ${{ runner.workspace }} run: | 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: '..' + working-directory: ${{ runner.workspace }} run: | 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 @@ -146,15 +147,15 @@ jobs: 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 }} - 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 all install + cmake --build $BUILD_PATH --target all install ls ~/.local/$BIN_DIR/quotest - name: Run tests @@ -163,9 +164,9 @@ jobs: TEST_PWD: ${{ secrets.TEST_PWD }} 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}' - working-directory: build + working-directory: ../build/libQuotient run: | - ctest --output-on-failure + ctest --test-dir $BUILD_PATH --output-on-failure [[ -z "$TEST_USER" ]] || $VALGRIND quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" timeout-minutes: 4 # quotest is supposed to finish within 3 minutes, actually -- cgit v1.2.3 From bd728a91f69382a052d07582788fcecec8b0f35e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 7 Dec 2021 19:00:04 +0100 Subject: Test installed quotest This covers Quotient_INSTALL_TESTS setting. --- .github/workflows/ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e023230..9d286da6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,8 +98,16 @@ jobs: 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 + + 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 + echo "LD_LIBRARY_PATH=$Qt5_DIR/lib:$LD_LIBRARY_PATH" >>$GITHUB_ENV - name: Setup MSVC environment uses: ilammy/msvc-dev-cmd@v1 @@ -141,13 +149,8 @@ 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_PATH $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 @@ -164,10 +167,10 @@ jobs: TEST_PWD: ${{ secrets.TEST_PWD }} 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}' - working-directory: ../build/libQuotient run: | ctest --test-dir $BUILD_PATH --output-on-failure - [[ -z "$TEST_USER" ]] || $VALGRIND quotest/quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" + [[ -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 -- cgit v1.2.3 From 39ca00755d91c5e608bfe2a67c84ceb29ed49976 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 8 Dec 2021 23:18:27 +0100 Subject: Try fixing sonar --- .github/workflows/sonar.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 76db59c9..c987b0cc 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -64,6 +64,14 @@ jobs: cmake -S olm -B olm/build $CMAKE_ARGS cmake --build olm/build --target install + - name: Build and install qtKeychain + if: matrix.e2ee + run: | + cd .. + git clone https://github.com/frankosterfeld/qtkeychain.git + cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS + cmake --build qtkeychain/build --target install + - name: Pull CS API and build GTAD if: matrix.update-api run: | -- cgit v1.2.3 From c585227b3724666e3cf7aab3ab53d6f5930e7218 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 9 Dec 2021 21:07:52 +0100 Subject: Fix CI failure on macOS CMAKE_INSTALL_RPATH_USE_LINK_PATH is more universal than setting LD_LIBRARY_PATH Also: drop an extra slash in the path to installed quotest. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d286da6..c78a5981 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,8 @@ 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 @@ -107,7 +108,6 @@ jobs: cmake -E make_directory ${{ runner.workspace }}/build echo "BUILD_PATH=${{ runner.workspace }}/build/libQuotient" >>$GITHUB_ENV - echo "LD_LIBRARY_PATH=$Qt5_DIR/lib:$LD_LIBRARY_PATH" >>$GITHUB_ENV - name: Setup MSVC environment uses: ilammy/msvc-dev-cmd@v1 @@ -159,7 +159,7 @@ jobs: - name: Build and install libQuotient run: | cmake --build $BUILD_PATH --target all install - ls ~/.local/$BIN_DIR/quotest + ls ~/.local$BIN_DIR/quotest - name: Run tests env: -- cgit v1.2.3 From 42eaf3671c656088f8d038f83973f0931ad7051c Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 02:33:39 +0100 Subject: Sonar: leave just one job There's not much value in analysing the code without E2EE and with E2EE because E2EE is additive; and there's no plan to look close into the generated API code apart from what already ends up being committed. --- .github/workflows/sonar.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 76db59c9..ae96aebc 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -16,8 +16,8 @@ jobs: fail-fast: false matrix: qt-version: [ '5.12.10' ] - e2ee: [ '', 'e2ee' ] - update-api: [ '', 'update-api' ] + e2ee: [ 'e2ee' ] + update-api: [ '' ] env: SONAR_SCANNER_VERSION: 4.6.2.2472 -- cgit v1.2.3 From a08348007dd0a73a40b7b1d755b3affc963b5b80 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 22 Dec 2021 17:31:37 +0100 Subject: Sonar: add coverage analysis --- .github/workflows/sonar.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index ae96aebc..c8ddca66 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -53,7 +53,8 @@ jobs: echo "CXX=g++-10" >>$GITHUB_ENV mkdir -p $HOME/.sonar 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_CXX_FLAGS=--coverage >>$GITHUB_ENV cmake -E make_directory ${{ runner.workspace }}/build - name: Build and install olm @@ -110,4 +111,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - $HOME/.sonar/sonar-scanner*/bin/sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" + $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ + -Dsonar.host.url="${{ env.SONAR_SERVER_URL }}" \ + -Dsonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \ + -Dsonar.cfamily.gcov.reportsPath=build/coverage -- cgit v1.2.3 From 0cbbae133d61ccb1fbb41a40660a70c65f65235f Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 23 Dec 2021 11:43:01 +0100 Subject: Merge Sonar invocation back to ci.yml For coverage analysis to work, a test run is needed, making the overlap between ci.yaml and sonar.yml quite significant again. Note: 'update-api' option is temporarily dropped from the matrix to speed up the check. If things run fine, 'update-api' will come back. --- .github/workflows/ci.yml | 59 +++++++++++++++++++--- .github/workflows/sonar.yml | 117 -------------------------------------------- 2 files changed, 51 insertions(+), 125 deletions(-) delete mode 100644 .github/workflows/sonar.yml (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c78a5981..01a4468f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,16 +21,21 @@ jobs: matrix: os: [ubuntu-20.04, macos-10.15] compiler: [ GCC, Clang ] - platform: [ '' ] qt-version: [ '5.12.10' ] - qt-arch: [ '' ] # Not using binary values here, to make the job captions more readable e2ee: [ '' ] - update-api: [ '', 'update-api' ] + update-api: [ '' ] #, 'update-api' ] + sonar: [ '' ] + platform: [ '' ] + qt-arch: [ '' ] exclude: - os: macos-10.15 compiler: GCC include: + - os: ubuntu-latest + compiler: GCC + qt-version: '5.12.10' + sonar: 'sonar' - os: windows-2019 compiler: MSVC platform: x64 @@ -43,6 +48,9 @@ jobs: qt-arch: win64_msvc2017_64 update-api: update-api + env: + SONAR_SERVER_URL: 'https://sonarcloud.io' + steps: - uses: actions/checkout@v2 with: @@ -96,9 +104,18 @@ jobs: VERSION="$(git describe --all --contains)-ci${{ github.run_number }}-$(git rev-parse --short HEAD)" 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\ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" >>$GITHUB_ENV + + CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DBUILD_SHARED_LIBS=false \ + -DCMAKE_INSTALL_PREFIX=~/.local \ + -DCMAKE_PREFIX_PATH=~/.local \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" + + if [ -n "${{ matrix.sonar }}" ]; then + mkdir -p $HOME/.sonar + CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=--coverage" + fi + echo "CMAKE_ARGS=$CMAKE_ARGS" >>$GITHUB_ENV if [[ '${{ runner.os }}' != 'Windows' ]]; then BIN_DIR=/bin @@ -115,6 +132,20 @@ jobs: with: arch: ${{ matrix.platform }} + - name: Download and set up Sonar Cloud tools + if: matrix.sonar != '' + env: + SONAR_SCANNER_VERSION: 4.6.2.2472 + run: | + pushd $HOME/.sonar + curl -sSL --remote-name-all \ + $SONAR_SERVER_URL/static/cpp/build-wrapper-linux-x86.zip \ + https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip + unzip -o build-wrapper*.zip + echo "BUILD_WRAPPER=$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux* --out-dir $BUILD_PATH/sonar" >>$GITHUB_ENV + unzip -o sonar-scanner-cli*.zip + popd + - name: Build and install olm if: matrix.e2ee working-directory: ${{ runner.workspace }} @@ -158,7 +189,8 @@ jobs: - name: Build and install libQuotient run: | - cmake --build $BUILD_PATH --target all install + $BUILD_WRAPPER cmake --build $BUILD_PATH --target all + cmake --build $BUILD_PATH --target install ls ~/.local$BIN_DIR/quotest - name: Run tests @@ -172,7 +204,18 @@ jobs: [[ -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 if: env.CODEQL_ANALYSIS uses: github/codeql-action/analyze@v1 + + - name: Run sonar-scanner + if: matrix.sonar != '' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ + -Dsonar.host.url="$SONAR_SERVER_URL" \ + -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ + -Dsonar.cfamily.gcov.reportsPath="$BUILD_PATH/coverage" diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index c8ddca66..00000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Sonar - -on: - push: - pull_request: - types: [opened, reopened] - -defaults: - run: - shell: bash - -jobs: - SonarCloud: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - qt-version: [ '5.12.10' ] - e2ee: [ 'e2ee' ] - update-api: [ '' ] - - env: - SONAR_SCANNER_VERSION: 4.6.2.2472 - SONAR_SERVER_URL: "https://sonarcloud.io" - BUILD_WRAPPER_OUT_DIR: build/sonar - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - submodules: ${{ matrix.e2ee != '' }} - - - name: Cache Qt - id: cache-qt - uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}-Qt${{ matrix.qt-version }}-cache - - - name: Install Qt - uses: jurplel/install-qt-action@v2.11.1 - with: - version: ${{ matrix.qt-version }} -# arch: ${{ matrix.qt-arch }} # Only Windows needs that - cached: ${{ steps.cache-qt.outputs.cache-hit }} - - - name: Install Ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Setup build environment - run: | - echo "CC=gcc-10" >>$GITHUB_ENV - echo "CXX=g++-10" >>$GITHUB_ENV - mkdir -p $HOME/.sonar - echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \ - -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" \ - -DCMAKE_CXX_FLAGS=--coverage >>$GITHUB_ENV - cmake -E make_directory ${{ runner.workspace }}/build - - - name: Build and install olm - if: matrix.e2ee - 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 - - - name: Pull CS API and build GTAD - if: matrix.update-api - run: | - cd .. - git clone https://github.com/quotient-im/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" \ - >>$GITHUB_ENV - - - name: Download and set up Sonar Cloud tools - run: | - pushd $HOME/.sonar - curl -sSLo build-wrapper.zip $SONAR_SERVER_URL/static/cpp/build-wrapper-linux-x86.zip - unzip -o build-wrapper.zip - echo "BUILD_WRAPPER=$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux* --out-dir $BUILD_WRAPPER_OUT_DIR" >>$GITHUB_ENV - curl -sSLo sonar-scanner.zip \ - https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip - unzip -o sonar-scanner.zip - popd - - - 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 }} - - - name: Regenerate API code - if: matrix.update-api - run: cmake --build build --target update-api - - - name: Build libQuotient - run: | - $BUILD_WRAPPER cmake --build build --target all - - - name: Run sonar-scanner - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ - -Dsonar.host.url="${{ env.SONAR_SERVER_URL }}" \ - -Dsonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \ - -Dsonar.cfamily.gcov.reportsPath=build/coverage -- cgit v1.2.3 From 669ed9bcae110ca0539876193ec3b8cb9b8a8a18 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 02:35:44 +0100 Subject: Actually do and submit coverage ...instead of hoping the thing will sort itself out because CLion does. --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01a4468f..8596ccd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,7 @@ jobs: if [ -n "${{ matrix.sonar }}" ]; then mkdir -p $HOME/.sonar CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=--coverage" + echo "COV=gcov$CXX_VERSION_POSTFIX" >>$GITHUB_ENV fi echo "CMAKE_ARGS=$CMAKE_ARGS" >>$GITHUB_ENV @@ -215,7 +216,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | + mkdir .coverage && pushd .coverage + find $BUILD_PATH/CMakeFiles/Quotient.dir/lib -name '*.gcda' -print0 \ + | xargs -0 $COV -s $GITHUB_WORKSPACE/lib -pr + popd $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ - -Dsonar.cfamily.gcov.reportsPath="$BUILD_PATH/coverage" + -Dsonar.cfamily.gcov.reportsPath=.coverage -- cgit v1.2.3 From 3fa5925ad6c9ce558dd9726a02614fd6f9c031e5 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 02:35:56 +0100 Subject: Analyse in 2 threads --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8596ccd5..47c92ad3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,4 +223,5 @@ jobs: $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ + -Dsonar.cfamily.threads=2 \ -Dsonar.cfamily.gcov.reportsPath=.coverage -- cgit v1.2.3 From e1c19404846b2a7a2f321c662528252e4eeef35e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 06:42:36 +0100 Subject: Don't strip lib from names in .gcov files That apparently confuses Sonar as it fails to match the source files. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47c92ad3..27c65b26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -218,7 +218,7 @@ jobs: run: | mkdir .coverage && pushd .coverage find $BUILD_PATH/CMakeFiles/Quotient.dir/lib -name '*.gcda' -print0 \ - | xargs -0 $COV -s $GITHUB_WORKSPACE/lib -pr + | xargs -0 $COV -s $GITHUB_WORKSPACE -pr popd $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -- cgit v1.2.3 From a207439d165b00b689e37b2759e0ca42bdfb22ae Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 08:00:39 +0100 Subject: Reinstate update-api jobs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27c65b26..5a3a0708 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: qt-version: [ '5.12.10' ] # Not using binary values here, to make the job captions more readable e2ee: [ '' ] - update-api: [ '' ] #, 'update-api' ] + update-api: [ '', 'update-api' ] sonar: [ '' ] platform: [ '' ] qt-arch: [ '' ] -- cgit v1.2.3 From e4a9132ab5c684be9743823df7c31d12da1e3f3b Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 10:40:44 +0100 Subject: CI: Add missing coverage files --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a3a0708..72deb803 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,9 +217,11 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | mkdir .coverage && pushd .coverage - find $BUILD_PATH/CMakeFiles/Quotient.dir/lib -name '*.gcda' -print0 \ + find $BUILD_PATH -name '*.gcda' -print0 \ | xargs -0 $COV -s $GITHUB_WORKSPACE -pr popd + # Drop coverage of the test source code, which is obviously 100% + rm -f quotest* autotests* $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ -- cgit v1.2.3 From 179564eb4c2d5ee59ef129edab39ca1a7cbc4258 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 12:22:59 +0100 Subject: CI: Move a comment outside of the script Comments inside shell scripts apparently break the flimsy GHA machinery. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72deb803..5cac5874 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -215,12 +215,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # Coverage of the test source code is not tracked, as it is obviously 100% + # (if it's not, some tests failed and break the build at an earlier stage) run: | mkdir .coverage && pushd .coverage find $BUILD_PATH -name '*.gcda' -print0 \ | xargs -0 $COV -s $GITHUB_WORKSPACE -pr popd - # Drop coverage of the test source code, which is obviously 100% rm -f quotest* autotests* $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -- cgit v1.2.3 From 165e17d4ad289dabdcb6a09ce27c02c6122b7f8a Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 13:37:55 +0100 Subject: CI: Fix rm being run in the wrong directory It's been alright with the comment inside the script. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cac5874..a1b6f0c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -215,14 +215,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # Coverage of the test source code is not tracked, as it is obviously 100% - # (if it's not, some tests failed and break the build at an earlier stage) run: | mkdir .coverage && pushd .coverage find $BUILD_PATH -name '*.gcda' -print0 \ | xargs -0 $COV -s $GITHUB_WORKSPACE -pr - popd + # Coverage of the test source code is not tracked, as it is always 100% + # (if not, some tests failed and broke the build at an earlier stage) rm -f quotest* autotests* + popd $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ -- cgit v1.2.3 From 60947d610d0ece6943d2c2e385d6c6c2f960853d Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 24 Dec 2021 17:07:29 +0100 Subject: Apply suggestions --- .github/workflows/sonar.yml | 121 -------------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 .github/workflows/sonar.yml (limited to '.github/workflows') diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index c987b0cc..00000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: Sonar - -on: - push: - pull_request: - types: [opened, reopened] - -defaults: - run: - shell: bash - -jobs: - SonarCloud: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - qt-version: [ '5.12.10' ] - e2ee: [ '', 'e2ee' ] - update-api: [ '', 'update-api' ] - - env: - SONAR_SCANNER_VERSION: 4.6.2.2472 - SONAR_SERVER_URL: "https://sonarcloud.io" - BUILD_WRAPPER_OUT_DIR: build/sonar - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - submodules: ${{ matrix.e2ee != '' }} - - - name: Cache Qt - id: cache-qt - uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}-Qt${{ matrix.qt-version }}-cache - - - name: Install Qt - uses: jurplel/install-qt-action@v2.11.1 - with: - version: ${{ matrix.qt-version }} -# arch: ${{ matrix.qt-arch }} # Only Windows needs that - cached: ${{ steps.cache-qt.outputs.cache-hit }} - - - name: Install Ninja - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Setup build environment - run: | - echo "CC=gcc-10" >>$GITHUB_ENV - echo "CXX=g++-10" >>$GITHUB_ENV - mkdir -p $HOME/.sonar - echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \ - -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV - cmake -E make_directory ${{ runner.workspace }}/build - - - name: Build and install olm - if: matrix.e2ee - 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 - - - name: Build and install qtKeychain - if: matrix.e2ee - run: | - cd .. - git clone https://github.com/frankosterfeld/qtkeychain.git - cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS - cmake --build qtkeychain/build --target install - - - name: Pull CS API and build GTAD - if: matrix.update-api - run: | - cd .. - git clone https://github.com/quotient-im/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" \ - >>$GITHUB_ENV - - - name: Download and set up Sonar Cloud tools - run: | - pushd $HOME/.sonar - curl -sSLo build-wrapper.zip $SONAR_SERVER_URL/static/cpp/build-wrapper-linux-x86.zip - unzip -o build-wrapper.zip - echo "BUILD_WRAPPER=$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux* --out-dir $BUILD_WRAPPER_OUT_DIR" >>$GITHUB_ENV - curl -sSLo sonar-scanner.zip \ - https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip - unzip -o sonar-scanner.zip - popd - - - 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 }} - - - name: Regenerate API code - if: matrix.update-api - run: cmake --build build --target update-api - - - name: Build libQuotient - run: | - $BUILD_WRAPPER cmake --build build --target all - - - name: Run sonar-scanner - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - $HOME/.sonar/sonar-scanner*/bin/sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" -- cgit v1.2.3 From ac7ee73cb4fa1ac05f7bcae1800cb79b36c7647f Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 28 Dec 2021 20:20:41 +0100 Subject: CI: Put the shared object configuration to the test For now on Linux with GCC only, with a plan to add Windows eventually. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1b6f0c0..e4bf8e29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,8 +105,10 @@ jobs: fi echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV + # Build libQuotient as a shared library for the sonar-enabled run + # to have this configuration also covered CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBUILD_SHARED_LIBS=false \ + -DBUILD_SHARED_LIBS=${{ matrix.sonar }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" -- cgit v1.2.3 From cae9d908e8b319e8a0c33f7089ecb7f2e9317de8 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 1 Jan 2022 13:40:09 +0100 Subject: CI: up to Qt 5.12.12 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1b6f0c0..5c2c820e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: matrix: os: [ubuntu-20.04, macos-10.15] compiler: [ GCC, Clang ] - qt-version: [ '5.12.10' ] + qt-version: [ '5.12.12' ] # Not using binary values here, to make the job captions more readable e2ee: [ '' ] update-api: [ '', 'update-api' ] @@ -34,17 +34,17 @@ jobs: include: - os: ubuntu-latest compiler: GCC - qt-version: '5.12.10' + qt-version: '5.12.12' sonar: 'sonar' - os: windows-2019 compiler: MSVC platform: x64 - qt-version: '5.12.10' + qt-version: '5.12.12' qt-arch: win64_msvc2017_64 - os: windows-2019 compiler: MSVC platform: x64 - qt-version: '5.12.10' + qt-version: '5.12.12' qt-arch: win64_msvc2017_64 update-api: update-api -- cgit v1.2.3 From 545f9084bacead9f02ba6df609822be4672b7952 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 1 Jan 2022 20:02:05 +0100 Subject: CI: add events.debug to QT_LOGGING_RULES --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c2c820e..e56ea26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,7 +198,7 @@ jobs: env: TEST_USER: ${{ secrets.TEST_USER }} TEST_PWD: ${{ secrets.TEST_PWD }} - QT_LOGGING_RULES: 'quotient.main.debug=true;quotient.jobs.debug=true' + QT_LOGGING_RULES: 'quotient.main.debug=true;quotient.jobs.debug=true;quotient.events.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: | ctest --test-dir $BUILD_PATH --output-on-failure -- cgit v1.2.3 From bbaaab6590e5435fd9c967ca4af5ef06d9182698 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 1 Jan 2022 20:41:04 +0100 Subject: BUILD_SHARED_LIBS in most jobs; fix not finding libQuotient.so.* --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4bf8e29..d4af9b30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,10 +105,10 @@ jobs: fi echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV - # Build libQuotient as a shared library for the sonar-enabled run - # to have this configuration also covered + # Build libQuotient as a shared library across platforms but also + # check the static configuration somewhere CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBUILD_SHARED_LIBS=${{ matrix.sonar }} \ + -DBUILD_SHARED_LIBS=${{ !matrix.sonar }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" @@ -122,6 +122,7 @@ jobs: if [[ '${{ runner.os }}' != 'Windows' ]]; then BIN_DIR=/bin + echo "LIB_PATH=$HOME/.local/lib" >>$GITHUB_ENV fi echo "BIN_DIR=$BIN_DIR" >>$GITHUB_ENV echo "~/.local$BIN_DIR" >>$GITHUB_PATH @@ -205,6 +206,7 @@ jobs: run: | ctest --test-dir $BUILD_PATH --output-on-failure [[ -z "$TEST_USER" ]] || \ + LD_LIBRARY_PATH=$LIB_PATH \ $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 -- cgit v1.2.3 From 2dee2bf4f0b2bd6615866644b2df9460da6babbb Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 1 Jan 2022 20:46:12 +0100 Subject: Only test dynamic linking on Linux On Windows and macOS, the assumed practice is to package things up in a monolithic distribution package. On Linux, fine-grained library packages are installed. After adding CMAKE_INSTALL_RPATH_USE_LINK_PATH dynamic linkage is testable on macOS but that's not the "proper" way to install things on the platform, anyway. It also probably works on Windows but I couldn't get a workable setup for quotest after a few attempts. Perhaps it's a matter of running windeployqt instead of trying to figure out and add to PATH all the locations needed; or maybe not; I don't have the motivation to explore this further. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4af9b30..ef6ea3d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: # Build libQuotient as a shared library across platforms but also # check the static configuration somewhere CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBUILD_SHARED_LIBS=${{ !matrix.sonar }} \ + -DBUILD_SHARED_LIBS=${{ !matrix.sonar && runner.os == 'Linux' }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" -- cgit v1.2.3 From ba2dc2a1aa23c91a52bcd0d9f3feb29ea9ecfcd2 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 16 Feb 2022 10:31:37 +0100 Subject: ci.yml: enable E2EE pipelines again The whole cycle will get terribly long again; looking forward to parallel quotest... --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d902bd3..c8ea0d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,18 +19,20 @@ jobs: fail-fast: false max-parallel: 1 matrix: - os: [ubuntu-20.04, macos-10.15] + os: [ ubuntu-20.04, macos-10.15 ] compiler: [ GCC, Clang ] qt-version: [ '5.12.12' ] # Not using binary values here, to make the job captions more readable - e2ee: [ '' ] - update-api: [ '', 'update-api' ] + e2ee: [ '', e2ee ] + update-api: [ '', update-api ] sonar: [ '' ] platform: [ '' ] qt-arch: [ '' ] exclude: - os: macos-10.15 compiler: GCC + - os: windows-2019 + e2ee: e2ee # Not supported by the current CI script include: - os: ubuntu-latest compiler: GCC @@ -55,7 +57,6 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - submodules: ${{ matrix.e2ee != '' }} - name: Cache Qt id: cache-qt @@ -154,7 +155,6 @@ jobs: if: ${{ contains(matrix.os, 'ubuntu') && matrix.e2ee }} run: | sudo apt-get install libssl-dev - echo "openssl version" >>$GITHUB_ENV - name: Build and install olm if: matrix.e2ee -- cgit v1.2.3 From 120524a139dbac5d55c952de5dba0e23ba1025f8 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 18 Feb 2022 10:44:38 +0100 Subject: CI: setup mock Synapse before running ctest To use this in CI required extending/fixing autotests/run-tests.sh: it can now accept arguments that are further passed to ctest invocation, and it no more cd's to the build directory because build directories can be in all kinds of places, expecting the caller to pick the directory upfront. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8ea0d95..67ef5ac5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,7 +217,7 @@ jobs: QT_LOGGING_RULES: 'quotient.main.debug=true;quotient.jobs.debug=true;quotient.events.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: | - ctest --test-dir $BUILD_PATH --output-on-failure + autotests/run-tests.sh --test-dir $BUILD_PATH --output-on-failure [[ -z "$TEST_USER" ]] || \ LD_LIBRARY_PATH=$LIB_PATH \ $VALGRIND quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" -- cgit v1.2.3 From d7ecf9b839b841ca22a3611b3608801a811e7b00 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 18 Feb 2022 23:10:34 +0100 Subject: Only testolmaccount on Linux On other platforms Docker fails to stand up the container. --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67ef5ac5..f622662b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,7 +217,12 @@ jobs: QT_LOGGING_RULES: 'quotient.main.debug=true;quotient.jobs.debug=true;quotient.events.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: | - autotests/run-tests.sh --test-dir $BUILD_PATH --output-on-failure + CTEST_ARGS="--test-dir $BUILD_PATH --output-on-failure" + if [[ -z '${{ matrix.e2ee }}' || '${{ runner.os }}' != 'Linux' ]]; then + ctest $CTEST_ARGS -E testolmaccount + else + autotests/run-tests.sh $CTEST_ARGS + fi [[ -z "$TEST_USER" ]] || \ LD_LIBRARY_PATH=$LIB_PATH \ $VALGRIND quotest "$TEST_USER" "$TEST_PWD" quotest-gha '#quotest:matrix.org' "$QUOTEST_ORIGIN" -- cgit v1.2.3 From 1458d1fc856c33b25c07ac16a86bbc2096110ba1 Mon Sep 17 00:00:00 2001 From: Tobias Fella <9750016+TobiasFella@users.noreply.github.com> Date: Fri, 25 Feb 2022 15:15:34 +0100 Subject: Don't run e2ee on macos --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f622662b..0bbbc06c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: compiler: GCC - os: windows-2019 e2ee: e2ee # Not supported by the current CI script + - os: macos-10.15 + e2ee: e2ee # Missing OpenSSL include: - os: ubuntu-latest compiler: GCC -- cgit v1.2.3 From bb04635c6bc9e051f4bba311aafeb0b0d355f7f5 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 27 Feb 2022 08:33:12 +0100 Subject: CI: switch sonar CI config to include E2EE --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bbbc06c..24d58a4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,8 @@ jobs: - os: ubuntu-latest compiler: GCC qt-version: '5.12.12' - sonar: 'sonar' + e2ee: e2ee + sonar: sonar - os: windows-2019 compiler: MSVC platform: x64 -- cgit v1.2.3 From bcc8d2d6547e2efd595628a1528ed609eccddad6 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 27 Feb 2022 11:02:37 +0100 Subject: Build with shared libs for Sonar Building with static libs fails on QtKeychain apparently underlinking with glib when --coverage is passed. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24d58a4c..b704b3b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: # Build libQuotient as a shared library across platforms but also # check the static configuration somewhere CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBUILD_SHARED_LIBS=${{ !matrix.sonar && runner.os == 'Linux' }} \ + -DBUILD_SHARED_LIBS=${{ runner.os == 'Linux' }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" -- cgit v1.2.3 From 617514cf9da4d444c285ebb27ff1c7fd034a484f Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 20 May 2022 22:24:41 +0200 Subject: Adapt update-api target to matrix-doc split --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b704b3b9..9b9383db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,11 +179,11 @@ jobs: if: matrix.update-api working-directory: ${{ runner.workspace }} run: | - git clone https://github.com/matrix-org/matrix-doc.git + git clone https://github.com/quotient-im/matrix-spec.git git clone --recursive https://github.com/KitsuneRal/gtad.git 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 \ + echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_SPEC_PATH=${{ runner.workspace }}/matrix-spec \ -DGTAD_PATH=${{ runner.workspace }}/build/gtad/gtad" \ >>$GITHUB_ENV echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with API files regeneration" >>$GITHUB_ENV -- cgit v1.2.3 From 4e127d5f74c56b1e366de3e8afb7f07700a566b4 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 21 May 2022 16:29:00 +0200 Subject: Use branch of matrix-spec --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b9383db..bea9f436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,6 +180,9 @@ jobs: working-directory: ${{ runner.workspace }} run: | git clone https://github.com/quotient-im/matrix-spec.git + pushd matrix-spec + git checkout fixcompilation + popd git clone --recursive https://github.com/KitsuneRal/gtad.git cmake -S gtad -B build/gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF cmake --build build/gtad -- cgit v1.2.3 From 6e27a49fbbc58a7310753f882fe372ddb0f63e33 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 30 May 2022 17:41:41 +0200 Subject: CI: Build with QtKeychain 0.13.2 QtKeychain master suffers from https://github.com/frankosterfeld/qtkeychain/issues/213. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b704b3b9..c690745f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -171,7 +171,7 @@ jobs: - name: Build and install QtKeychain run: | cd .. - git clone https://github.com/frankosterfeld/qtkeychain.git + git clone -b v0.13.2 https://github.com/frankosterfeld/qtkeychain.git cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS cmake --build qtkeychain/build --target install -- cgit v1.2.3 From 3c6ca3c89d7b1a972d50ec4eb0b42ab350771f72 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 31 May 2022 17:36:17 +0200 Subject: Update gtad.yml to match v3 API definitions Also: use quotient-im/matrix-spec main branch again, now that it has adjusted definitions; drop un(der)used partials --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bea9f436..9b9383db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,9 +180,6 @@ jobs: working-directory: ${{ runner.workspace }} run: | git clone https://github.com/quotient-im/matrix-spec.git - pushd matrix-spec - git checkout fixcompilation - popd git clone --recursive https://github.com/KitsuneRal/gtad.git cmake -S gtad -B build/gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF cmake --build build/gtad -- cgit v1.2.3 From a2ba9119c6b20d227f75e9a3427df06b4923ee89 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 6 Jun 2022 14:01:39 +0200 Subject: CI: use GTAD submodule Also: make all cloning for update-api shallow, for optimisation. --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dac67b3b..9c777cbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,14 +175,13 @@ jobs: cmake -S qtkeychain -B qtkeychain/build $CMAKE_ARGS cmake --build qtkeychain/build --target install - - name: Pull CS API and build GTAD + - name: get CS API definitions; clone and build GTAD if: matrix.update-api - working-directory: ${{ runner.workspace }} run: | - git clone https://github.com/quotient-im/matrix-spec.git - git clone --recursive https://github.com/KitsuneRal/gtad.git - cmake -S gtad -B build/gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF - cmake --build build/gtad + git clone --depth=1 https://github.com/quotient-im/matrix-spec.git ../matrix-spec + git submodule update --init --recursive --depth=1 + cmake -S gtad/gtad -B ../build/gtad $CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF + cmake --build ../build/gtad echo "CMAKE_ARGS=$CMAKE_ARGS -DMATRIX_SPEC_PATH=${{ runner.workspace }}/matrix-spec \ -DGTAD_PATH=${{ runner.workspace }}/build/gtad/gtad" \ >>$GITHUB_ENV -- cgit v1.2.3 From 9e594bd1d49dc0e1fdb8b74cef11fe3bfa3fdc1e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 12 Jun 2022 10:32:40 +0200 Subject: CI: No more allow failure of update-api jobs --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c777cbc..3422b5b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ concurrency: ci-${{ github.ref }} jobs: CI: runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.update-api != '' }} # the current upstream API definitions are expected to fail the test + continue-on-error: false strategy: fail-fast: false max-parallel: 1 -- cgit v1.2.3 From 7d4b46e6daf656a1e97426cb1f2f8c99c68c4dda Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 12 Jun 2022 14:16:12 +0200 Subject: Reduce the number of CI jobs It takes well over an hour to build the whole lineup for now; while the single right fix for that is making quotest capable of running in parallel, a few GCC jobs can be safely dropped for now (and we'll see if they should be brought back when parallel quotest unleashes the CI). --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c777cbc..99fe7b7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: max-parallel: 1 matrix: os: [ ubuntu-20.04, macos-10.15 ] - compiler: [ GCC, Clang ] + compiler: [ Clang ] # GCC builds are added individually below qt-version: [ '5.12.12' ] # Not using binary values here, to make the job captions more readable e2ee: [ '', e2ee ] @@ -29,8 +29,6 @@ jobs: platform: [ '' ] qt-arch: [ '' ] exclude: - - os: macos-10.15 - compiler: GCC - os: windows-2019 e2ee: e2ee # Not supported by the current CI script - os: macos-10.15 @@ -41,6 +39,11 @@ jobs: qt-version: '5.12.12' e2ee: e2ee sonar: sonar + - os: ubuntu-20.04 + compiler: GCC + qt-version: '5.12.12' + e2ee: e2ee + update-api: update-api - os: windows-2019 compiler: MSVC platform: x64 -- cgit v1.2.3 From a4f0071395939a93bcb3afd72085415a25216701 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 14 Jun 2022 10:28:51 +0200 Subject: CI: bump used versions for GitHub Actions Also, use MSVC 2019 on Windows. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 172c027f..212273bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,12 +48,12 @@ jobs: compiler: MSVC platform: x64 qt-version: '5.12.12' - qt-arch: win64_msvc2017_64 + qt-arch: win64_msvc2019_64 - os: windows-2019 compiler: MSVC platform: x64 qt-version: '5.12.12' - qt-arch: win64_msvc2017_64 + qt-arch: win64_msvc2019_64 update-api: update-api env: @@ -72,7 +72,7 @@ jobs: key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache - name: Install Qt - uses: jurplel/install-qt-action@v2.11.1 + uses: jurplel/install-qt-action@v2.14.0 with: version: ${{ matrix.qt-version }} arch: ${{ matrix.qt-arch }} @@ -192,7 +192,7 @@ jobs: - name: Initialize CodeQL tools if: env.CODEQL_ANALYSIS - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: cpp # If you wish to specify custom queries, you can do so here or in a config file. @@ -235,7 +235,7 @@ jobs: - name: Perform CodeQL analysis if: env.CODEQL_ANALYSIS - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 - name: Run sonar-scanner if: matrix.sonar != '' -- cgit v1.2.3 From b55c110ecbca5ad41ac9ccb5647836709ac8f4a8 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 14 Jun 2022 11:40:34 +0200 Subject: CI: Switch to Qt 5.15 and introduce Qt 6 options Qt 6 builds are allowed to fail for now. --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 212273bd..d46cfb6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,14 +14,14 @@ concurrency: ci-${{ github.ref }} jobs: CI: runs-on: ${{ matrix.os }} - continue-on-error: false + continue-on-error: ${{ matrix.qt-version != '5.15.2' }} # Qt 6 will fail for now strategy: fail-fast: false max-parallel: 1 matrix: os: [ ubuntu-20.04, macos-10.15 ] compiler: [ Clang ] # GCC builds are added individually below - qt-version: [ '5.12.12' ] + qt-version: [ '5.15.2', '6.3.1' ] # Not using binary values here, to make the job captions more readable e2ee: [ '', e2ee ] update-api: [ '', update-api ] @@ -29,6 +29,8 @@ jobs: platform: [ '' ] qt-arch: [ '' ] exclude: + - qt-version: '6.3.1' + update-api: update-api - os: windows-2019 e2ee: e2ee # Not supported by the current CI script - os: macos-10.15 @@ -36,23 +38,23 @@ jobs: include: - os: ubuntu-latest compiler: GCC - qt-version: '5.12.12' + qt-version: '5.15.2' e2ee: e2ee sonar: sonar - os: ubuntu-20.04 compiler: GCC - qt-version: '5.12.12' + qt-version: '5.15.2' e2ee: e2ee update-api: update-api - os: windows-2019 compiler: MSVC platform: x64 - qt-version: '5.12.12' + qt-version: '5.15.2' qt-arch: win64_msvc2019_64 - os: windows-2019 compiler: MSVC platform: x64 - qt-version: '5.12.12' + qt-version: '5.15.2' qt-arch: win64_msvc2019_64 update-api: update-api -- cgit v1.2.3 From da5156f5e2da08123549b554d9eafcf366fa4e11 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 14 Jun 2022 18:13:39 +0200 Subject: Rearrange CI jobs to spend time more efficiently - CodeQL analysis was executed on every job that ran Clang, humping the total execution time by 10+ minutes alone. Now it only runs on a single job. - libolm is no more compiled but installed from the repo, along with libssl-dev; and both are installed in the same transaction as ninja and valgrind, shaving out one apt transaction - One more Windows job has been added to test building with Qt 6.3.1 on that OS. - Qt version is pushed earlier in the job matrix, as it becomes more significant than the compiler for a given platform. --- .github/workflows/ci.yml | 144 +++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 73 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d46cfb6c..ab581238 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,43 +20,59 @@ jobs: max-parallel: 1 matrix: os: [ ubuntu-20.04, macos-10.15 ] - compiler: [ Clang ] # GCC builds are added individually below qt-version: [ '5.15.2', '6.3.1' ] + compiler: [ LLVM ] # Not using binary values here, to make the job captions more readable e2ee: [ '', e2ee ] update-api: [ '', update-api ] - sonar: [ '' ] + static-analysis: [ '' ] platform: [ '' ] qt-arch: [ '' ] exclude: - qt-version: '6.3.1' - update-api: update-api - - os: windows-2019 - e2ee: e2ee # Not supported by the current CI script + update-api: update-api # Generated code is not specific to Qt version + - os: ubuntu-20.04 + e2ee: e2ee # Will be re-added with static analysis below + # TODO: Enable E2EE on Windows and macOS - os: macos-10.15 - e2ee: e2ee # Missing OpenSSL + e2ee: e2ee include: + - os: windows-2019 + qt-version: '5.15.2' + compiler: MSVC + platform: x64 + qt-arch: win64_msvc2019_64 + - os: ubuntu-20.04 + qt-version: '5.15.2' + compiler: LLVM + e2ee: e2ee + static-analysis: codeql - os: ubuntu-latest - compiler: GCC qt-version: '5.15.2' + compiler: GCC e2ee: e2ee - sonar: sonar + static-analysis: sonar - os: ubuntu-20.04 - compiler: GCC qt-version: '5.15.2' + compiler: GCC e2ee: e2ee update-api: update-api + - os: ubuntu-20.04 + qt-version: '5.15.2' + compiler: LLVM + update-api: update-api - os: windows-2019 + qt-version: '6.3.1' compiler: MSVC + # e2ee: e2ee # TODO platform: x64 - qt-version: '5.15.2' qt-arch: win64_msvc2019_64 - os: windows-2019 + qt-version: '5.15.2' compiler: MSVC + update-api: update-api platform: x64 - qt-version: '5.15.2' qt-arch: win64_msvc2019_64 - update-api: update-api env: SONAR_SERVER_URL: 'https://sonarcloud.io' @@ -66,44 +82,14 @@ jobs: with: fetch-depth: 0 - - name: Cache Qt - id: cache-qt - uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache - - - name: Install Qt - uses: jurplel/install-qt-action@v2.14.0 - with: - version: ${{ matrix.qt-version }} - arch: ${{ matrix.qt-arch }} - cached: ${{ steps.cache-qt.outputs.cache-hit }} - - - name: Install Ninja (macOS/Windows) - if: ${{ !startsWith(matrix.os, 'ubuntu') }} - uses: seanmiddleditch/gha-setup-ninja@v3 - - - name: Install Ninja and Valgrind (Linux) - 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=$GITHUB_WORKSPACE/quotest/.valgrind.supp" >>$GITHUB_ENV - - name: Setup build environment run: | - if [ "${{ matrix.compiler }}" == "GCC" ]; then - CXX_VERSION_POSTFIX='-10' - echo "CC=gcc$CXX_VERSION_POSTFIX" >>$GITHUB_ENV - echo "CXX=g++$CXX_VERSION_POSTFIX" >>$GITHUB_ENV - elif [[ '${{ matrix.compiler }}' == 'Clang' ]]; then - if [[ '${{ runner.os }}' == 'Linux' ]]; then - CXX_VERSION_POSTFIX='-11' - # Do CodeQL analysis on one of Linux branches - echo "CODEQL_ANALYSIS=true" >>$GITHUB_ENV - fi - echo "CC=clang$CXX_VERSION_POSTFIX" >>$GITHUB_ENV - echo "CXX=clang++$CXX_VERSION_POSTFIX" >>$GITHUB_ENV + if [ '${{ matrix.compiler }}' == 'GCC' ]; then + echo "CC=gcc-10" >>$GITHUB_ENV + echo "CXX=g++-10" >>$GITHUB_ENV + elif [[ '${{ runner.os }}' != 'Windows' ]]; then + echo "CC=clang" >>$GITHUB_ENV + echo "CXX=clang++" >>$GITHUB_ENV fi if grep -q 'refs/tags' <<<'${{ github.ref }}'; then VERSION="$(git describe --tags)" @@ -112,20 +98,18 @@ jobs: else VERSION="$(git describe --all --contains)-ci${{ github.run_number }}-$(git rev-parse --short HEAD)" fi - echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV - # Build libQuotient as a shared library across platforms but also - # check the static configuration somewhere + echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/Qt-${{ matrix.qt-version }}/${{ matrix.compiler }}" >>$GITHUB_ENV + CMAKE_ARGS="-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_SHARED_LIBS=${{ runner.os == 'Linux' }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" - if [ -n "${{ matrix.sonar }}" ]; then + if [ '${{ matrix.static-analysis }}' == 'sonar' ]; then mkdir -p $HOME/.sonar CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=--coverage" - echo "COV=gcov$CXX_VERSION_POSTFIX" >>$GITHUB_ENV fi echo "CMAKE_ARGS=$CMAKE_ARGS" >>$GITHUB_ENV @@ -139,14 +123,42 @@ jobs: cmake -E make_directory ${{ runner.workspace }}/build echo "BUILD_PATH=${{ runner.workspace }}/build/libQuotient" >>$GITHUB_ENV - - name: Setup MSVC environment + - name: Cache Qt + id: cache-qt + uses: actions/cache@v2 + with: + path: ${{ runner.workspace }}/Qt + key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache + + - name: Install Qt + uses: jurplel/install-qt-action@v2.14.0 + with: + version: ${{ matrix.qt-version }} + arch: ${{ matrix.qt-arch }} + cached: ${{ steps.cache-qt.outputs.cache-hit }} + + - name: Install Ninja (macOS/Windows) + if: ${{ !startsWith(matrix.os, 'ubuntu') }} + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Install dependencies (Linux) + if: startsWith(matrix.os, 'ubuntu') + run: | + if [ -n "${{ matrix.e2ee }}" ]; then + EXTRA_DEPS="libssl-dev libolm-dev" + echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV + fi + sudo apt-get -qq install ninja-build valgrind $EXTRA_DEPS + echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=$GITHUB_WORKSPACE/quotest/.valgrind.supp" >>$GITHUB_ENV + + - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 if: matrix.compiler == 'MSVC' with: arch: ${{ matrix.platform }} - name: Download and set up Sonar Cloud tools - if: matrix.sonar != '' + if: matrix.static-analysis == 'sonar' env: SONAR_SCANNER_VERSION: 4.6.2.2472 run: | @@ -159,20 +171,6 @@ jobs: unzip -o sonar-scanner-cli*.zip popd - - name: Install OpenSSL - if: ${{ contains(matrix.os, 'ubuntu') && matrix.e2ee }} - run: | - sudo apt-get install libssl-dev - - - name: Build and install olm - if: matrix.e2ee - working-directory: ${{ runner.workspace }} - run: | - git clone https://gitlab.matrix.org/matrix-org/olm.git - cmake -S olm -B build/olm $CMAKE_ARGS - cmake --build build/olm --target install - echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV - - name: Build and install QtKeychain run: | cd .. @@ -193,7 +191,7 @@ jobs: echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with API files regeneration" >>$GITHUB_ENV - name: Initialize CodeQL tools - if: env.CODEQL_ANALYSIS + if: matrix.static-analysis == 'codeql' uses: github/codeql-action/init@v2 with: languages: cpp @@ -236,18 +234,18 @@ jobs: timeout-minutes: 4 # quotest is supposed to finish within 3 minutes, actually - name: Perform CodeQL analysis - if: env.CODEQL_ANALYSIS + if: matrix.static-analysis == 'codeql' uses: github/codeql-action/analyze@v2 - name: Run sonar-scanner - if: matrix.sonar != '' + if: matrix.static-analysis == 'sonar' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | mkdir .coverage && pushd .coverage find $BUILD_PATH -name '*.gcda' -print0 \ - | xargs -0 $COV -s $GITHUB_WORKSPACE -pr + | xargs -0 gcov -s $GITHUB_WORKSPACE -pr # Coverage of the test source code is not tracked, as it is always 100% # (if not, some tests failed and broke the build at an earlier stage) rm -f quotest* autotests* -- cgit v1.2.3 From 2504e6e5f216e34fc9aabfda0c462b1b37620a5e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 17 Jun 2022 10:40:49 +0200 Subject: Further fix building with Qt 6 Also: build with Qt 6 first, so that it fails sooner. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab581238..f03af94b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: max-parallel: 1 matrix: os: [ ubuntu-20.04, macos-10.15 ] - qt-version: [ '5.15.2', '6.3.1' ] + qt-version: [ '6.3.1', '5.15.2' ] compiler: [ LLVM ] # Not using binary values here, to make the job captions more readable e2ee: [ '', e2ee ] @@ -105,7 +105,8 @@ jobs: -DBUILD_SHARED_LIBS=${{ runner.os == 'Linux' }} \ -DCMAKE_INSTALL_PREFIX=~/.local \ -DCMAKE_PREFIX_PATH=~/.local \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON" + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \ + -DBUILD_WITH_QT6=${{ startsWith(matrix.qt-version, '6') }}" if [ '${{ matrix.static-analysis }}' == 'sonar' ]; then mkdir -p $HOME/.sonar -- cgit v1.2.3 From 42f2d07fcb9f31b4e280a025472a6e810f36fb23 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 18 Jun 2022 22:51:01 +0200 Subject: CI: switch to macos-11 image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f03af94b..c71ce6c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - os: [ ubuntu-20.04, macos-10.15 ] + os: [ ubuntu-20.04, macos-11 ] qt-version: [ '6.3.1', '5.15.2' ] compiler: [ LLVM ] # Not using binary values here, to make the job captions more readable -- cgit v1.2.3 From 19e0251f02d547028583c2ebe9207885ff087dc4 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 19 Jun 2022 23:13:14 +0200 Subject: CI: fix macos-10.15 leftover --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c71ce6c3..d619385f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - os: ubuntu-20.04 e2ee: e2ee # Will be re-added with static analysis below # TODO: Enable E2EE on Windows and macOS - - os: macos-10.15 + - os: macos-11 e2ee: e2ee include: - os: windows-2019 -- cgit v1.2.3 From 955e1314ebfd83d6f44d88547159e6492035681e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 8 Jul 2022 09:28:58 +0200 Subject: CI: use GCC 11 and (therefore) ubuntu-22.04 GCC 10 ICE's[1] in qt_connection_util.h code; and ubuntu-20.04 doesn't have GCC 11. Also: patch a Qt 5.15 header when compiling with GCC because a combination of Qt 5.15 and GCC 11 in turn triggers QTBUG-91909/90568... Which in turn required moving Qt setup before the build environment setup. Life's fun. [1] Internal Compiler Error --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d619385f..f84356b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,12 +47,12 @@ jobs: compiler: LLVM e2ee: e2ee static-analysis: codeql - - os: ubuntu-latest + - os: ubuntu-22.04 qt-version: '5.15.2' compiler: GCC e2ee: e2ee static-analysis: sonar - - os: ubuntu-20.04 + - os: ubuntu-22.04 qt-version: '5.15.2' compiler: GCC e2ee: e2ee @@ -82,11 +82,30 @@ jobs: with: fetch-depth: 0 + - name: Cache Qt + id: cache-qt + uses: actions/cache@v2 + with: + path: ${{ runner.workspace }}/Qt + key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache + + - name: Install Qt + uses: jurplel/install-qt-action@v2.14.0 + with: + version: ${{ matrix.qt-version }} + arch: ${{ matrix.qt-arch }} + cached: ${{ steps.cache-qt.outputs.cache-hit }} + - name: Setup build environment run: | if [ '${{ matrix.compiler }}' == 'GCC' ]; then - echo "CC=gcc-10" >>$GITHUB_ENV - echo "CXX=g++-10" >>$GITHUB_ENV + echo "CC=gcc" >>$GITHUB_ENV + echo "CXX=g++" >>$GITHUB_ENV + if [ '${{ startsWith(matrix.qt-version, '5') }}' == 'true' ]; then + # Patch Qt to avoid GCC tumbling over QTBUG-90568/QTBUG-91909 + sed -i 's/ThreadEngineStarter(ThreadEngine \*_threadEngine)/ThreadEngineStarter(ThreadEngine \*_threadEngine)/' \ + $Qt5_DIR/include/QtConcurrent/qtconcurrentthreadengine.h + fi elif [[ '${{ runner.os }}' != 'Windows' ]]; then echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV @@ -124,20 +143,6 @@ jobs: cmake -E make_directory ${{ runner.workspace }}/build echo "BUILD_PATH=${{ runner.workspace }}/build/libQuotient" >>$GITHUB_ENV - - name: Cache Qt - id: cache-qt - uses: actions/cache@v2 - with: - path: ${{ runner.workspace }}/Qt - key: ${{ runner.os }}${{ matrix.platform }}-Qt${{ matrix.qt-version }}-cache - - - name: Install Qt - uses: jurplel/install-qt-action@v2.14.0 - with: - version: ${{ matrix.qt-version }} - arch: ${{ matrix.qt-arch }} - cached: ${{ steps.cache-qt.outputs.cache-hit }} - - name: Install Ninja (macOS/Windows) if: ${{ !startsWith(matrix.os, 'ubuntu') }} uses: seanmiddleditch/gha-setup-ninja@v3 -- cgit v1.2.3 From a0cc4eaf6af6f047e32713b2926f784fa4087a64 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 17 Sep 2022 13:21:35 +0200 Subject: Bump required Olm version to 3.2.5 This is the earliest version shipping olm/error.h. Conversely, stock libolm that comes with Ubuntu 20.04 (version 3.1.3) is no more enough so CI completely switches to jammy now. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f84356b0..1c0940eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - os: [ ubuntu-20.04, macos-11 ] + os: [ ubuntu-22.04, macos-11 ] qt-version: [ '6.3.1', '5.15.2' ] compiler: [ LLVM ] # Not using binary values here, to make the job captions more readable @@ -31,7 +31,7 @@ jobs: exclude: - qt-version: '6.3.1' update-api: update-api # Generated code is not specific to Qt version - - os: ubuntu-20.04 + - os: ubuntu-22.04 e2ee: e2ee # Will be re-added with static analysis below # TODO: Enable E2EE on Windows and macOS - os: macos-11 @@ -42,7 +42,7 @@ jobs: compiler: MSVC platform: x64 qt-arch: win64_msvc2019_64 - - os: ubuntu-20.04 + - os: ubuntu-22.04 qt-version: '5.15.2' compiler: LLVM e2ee: e2ee @@ -57,7 +57,7 @@ jobs: compiler: GCC e2ee: e2ee update-api: update-api - - os: ubuntu-20.04 + - os: ubuntu-22.04 qt-version: '5.15.2' compiler: LLVM update-api: update-api -- cgit v1.2.3 From a923750c7a1efadaa66f24dc17010063776e6246 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 18 Sep 2022 13:04:41 +0200 Subject: CI: only use Valgrind with GCC As of the current GHA jammy image, Valgrind cannot cope with some of Clang 14 output: https://bugs.kde.org/show_bug.cgi?id=452758 This is most likely a band-aid, before the work on switching from Valgrind to ASan. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c0940eb..40ed85d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,7 @@ jobs: sed -i 's/ThreadEngineStarter(ThreadEngine \*_threadEngine)/ThreadEngineStarter(ThreadEngine \*_threadEngine)/' \ $Qt5_DIR/include/QtConcurrent/qtconcurrentthreadengine.h fi + echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=$GITHUB_WORKSPACE/quotest/.valgrind.supp" >>$GITHUB_ENV elif [[ '${{ runner.os }}' != 'Windows' ]]; then echo "CC=clang" >>$GITHUB_ENV echo "CXX=clang++" >>$GITHUB_ENV @@ -155,7 +156,6 @@ jobs: echo "QUOTEST_ORIGIN=$QUOTEST_ORIGIN with E2EE" >>$GITHUB_ENV fi sudo apt-get -qq install ninja-build valgrind $EXTRA_DEPS - echo "VALGRIND=valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=$GITHUB_WORKSPACE/quotest/.valgrind.supp" >>$GITHUB_ENV - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1 -- cgit v1.2.3