From 8aa1ca859f751cc4911881dc10c73c69e2f9fa28 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 3 May 2023 14:52:43 +0000 Subject: [PATCH] ci: make sure to run tests after all builds in GHA Whenever possible. Due to flakiness/hangs/timeouts, keep sshd tests disabled on Windows and macOS. Also keep Docker tests disabled on these platforms, they do not work: GHA Windows: ``` no matching manifest for windows/amd64 in the manifest list entries ``` GHA macOS: ``` sh: docker: command not found ``` It's not possible to run UWP and ARM64 binaries: UWP: ``` Test #2: test_simple ......................Exit code 0xc0000135 ``` Needs but doesn't find: `VCRUNTIME140_APP.dll`. ARM64 ``` D:/a/libssh2/libssh2/bld/tests/Release/test_ssh2.exe: cannot execute binary file: Exec format error ``` Cherry-picked from #1017 --- .github/workflows/ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1e0b917..40eb88b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,10 +197,17 @@ jobs: -DENABLE_DEBUG_LOGGING=${{ matrix.log }} \ -DBUILD_SHARED_LIBS=${{ matrix.shared }} \ -DCRYPTO_BACKEND=${{ matrix.crypto }} \ - -DENABLE_ZLIB_COMPRESSION=${{ matrix.zlib }} + -DENABLE_ZLIB_COMPRESSION=${{ matrix.zlib }} \ + -DRUN_DOCKER_TESTS=OFF \ + -DRUN_SSHD_TESTS=OFF - name: 'cmake build' run: cmake --build bld --parallel 3 --target package --config Release + - name: 'cmake tests' + # UWP binaries require a CRT DLL that is not found. Static CRT not supported. + if: ${{ matrix.arch != 'arm64' && matrix.plat != 'uwp' }} + timeout-minutes: 10 + run: cd bld && ctest -VV -C Release --output-on-failure build_macos: name: 'macOS (${{ matrix.build }}, ${{ matrix.crypto.name }})' @@ -246,19 +253,30 @@ jobs: if: ${{ matrix.build == 'autotools' }} run: | mkdir bld && cd bld && ../configure --enable-werror --enable-debug \ - --with-libz ${{ matrix.crypto.configure }} + --with-libz ${{ matrix.crypto.configure }} \ + --disable-docker-tests \ + --disable-sshd-tests - name: 'autotools build' if: ${{ matrix.build == 'autotools' }} run: make -C bld -j3 + - name: 'autotools tests' + if: ${{ matrix.build == 'autotools' }} + run: make -C bld check VERBOSE=1 - name: 'cmake configure' if: ${{ matrix.build == 'cmake' }} run: | cmake . -B bld ${{ matrix.crypto.cmake }} \ -DENABLE_WERROR=ON \ -DENABLE_DEBUG_LOGGING=ON \ - -DENABLE_ZLIB_COMPRESSION=ON + -DENABLE_ZLIB_COMPRESSION=ON \ + -DRUN_DOCKER_TESTS=OFF \ + -DRUN_SSHD_TESTS=OFF - name: 'cmake build' if: ${{ matrix.build == 'cmake' }} run: cmake --build bld --parallel 3 + - name: 'cmake tests' + if: ${{ matrix.build == 'cmake' }} + timeout-minutes: 10 + run: cd bld && ctest -VV --output-on-failure