1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

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
This commit is contained in:
Viktor Szakats
2023-05-03 14:52:43 +00:00
parent 8d076c0f0c
commit 8aa1ca859f

View File

@@ -197,10 +197,17 @@ jobs:
-DENABLE_DEBUG_LOGGING=${{ matrix.log }} \ -DENABLE_DEBUG_LOGGING=${{ matrix.log }} \
-DBUILD_SHARED_LIBS=${{ matrix.shared }} \ -DBUILD_SHARED_LIBS=${{ matrix.shared }} \
-DCRYPTO_BACKEND=${{ matrix.crypto }} \ -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' - name: 'cmake build'
run: cmake --build bld --parallel 3 --target package --config Release 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: build_macos:
name: 'macOS (${{ matrix.build }}, ${{ matrix.crypto.name }})' name: 'macOS (${{ matrix.build }}, ${{ matrix.crypto.name }})'
@@ -246,19 +253,30 @@ jobs:
if: ${{ matrix.build == 'autotools' }} if: ${{ matrix.build == 'autotools' }}
run: | run: |
mkdir bld && cd bld && ../configure --enable-werror --enable-debug \ 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' - name: 'autotools build'
if: ${{ matrix.build == 'autotools' }} if: ${{ matrix.build == 'autotools' }}
run: make -C bld -j3 run: make -C bld -j3
- name: 'autotools tests'
if: ${{ matrix.build == 'autotools' }}
run: make -C bld check VERBOSE=1
- name: 'cmake configure' - name: 'cmake configure'
if: ${{ matrix.build == 'cmake' }} if: ${{ matrix.build == 'cmake' }}
run: | run: |
cmake . -B bld ${{ matrix.crypto.cmake }} \ cmake . -B bld ${{ matrix.crypto.cmake }} \
-DENABLE_WERROR=ON \ -DENABLE_WERROR=ON \
-DENABLE_DEBUG_LOGGING=ON \ -DENABLE_DEBUG_LOGGING=ON \
-DENABLE_ZLIB_COMPRESSION=ON -DENABLE_ZLIB_COMPRESSION=ON \
-DRUN_DOCKER_TESTS=OFF \
-DRUN_SSHD_TESTS=OFF
- name: 'cmake build' - name: 'cmake build'
if: ${{ matrix.build == 'cmake' }} if: ${{ matrix.build == 'cmake' }}
run: cmake --build bld --parallel 3 run: cmake --build bld --parallel 3
- name: 'cmake tests'
if: ${{ matrix.build == 'cmake' }}
timeout-minutes: 10
run: cd bld && ctest -VV --output-on-failure