1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

14 Commits

Author SHA1 Message Date
Viktor Szakats
c3de8626c1 CI: use --parallel for ctest
Go with 8-10 paralellism, which seems to be stable. If it introduces
flakiness, it possible to settle on ctest defaults, or low manual value.

It makes the test step take 2x-3x less time. Typically from 1m/1m30s to
~30s.

Also enable in AppVeyor, using the the CMake-default parallel value,
subject for refinement if we ever run tests there again.

Before: https://github.com/libssh2/libssh2/actions/runs/34788327227
After: https://github.com/libssh2/libssh2/actions/runs/34825431130?pr=2625

Closes #2625
2026-09-14 11:22:52 +02:00
Viktor Szakats
2a38092caf tests: add support to disable hex debug dumps
via new env `FIXTURE_TRACE_NO_DEBUGDUMP`.

Also:
- CI: set `FIXTURE_TRACE_NO_DEBUGDUMP` to make detailed logs (much)
  shorter and more readable for the common debug use-case.

- GHA: enable debug trace for clang-tidy OpenSSL jobs and simplify
  configuration.

Cherry-picked from #2485

Closes #2487
2026-08-02 22:19:50 +02:00
Viktor Szakats
a09dcbb673 appveyor: build tests again with old MSVC and related tidy-ups
To test build interactions between old-MSVC-specific `ssh2_snprintf()`
and its use in tests.

Also:
- rework configuring tests.
- fix ending up in unexpected pwd after docker install, failing disk
  space step.
- drop redundant condition in disk space step.
- skip `on_finish` step for non-test-run jobs.
- migrate `test_script` step from Powershell to bash.

Closes #2330
2026-07-16 17:40:38 +02:00
Viktor Szakats
111a6d1790 CI: minor fixes and improvements (Windows)
- re-sync UWP config with curl CI.
- drop accidental verbose mode for the recently added examples build step.
  Follow-up to 6bf392f627 #2276
- GHA: fix building examples in different Debug/Release config than main build step.
  Follow-up to 6bf392f627 #2276
- switch some jobs to Debug config (all were Release before this patch).
  Should be faster, while consuming more disk. The differences in libssh2
  are small.
- log disk space usage in Windows jobs.

Also tested `-INCREMENTAL:OFF`, but it did not make any measurable speed
or disk usage difference.

Closes #2314
2026-07-14 23:57:16 +02:00
Viktor Szakats
6bf392f627 build: make examples a separate target, add quick-build for cmake
- cmake: do not build examples automatically. This makes the
  `BUILD_EXAMPLES=OFF` option redundant.
- cmake: build all examples with target `libssh2-examples`.
- cmake: build-test all examples with target `libssh2-examples-build`.
  To save linking them 23 times in CI.
- autotools: add root `examples` build target to build examples.
- CI: build examples in a separate step.
  (for autotools, make them not build in the main build step by
  configuring with `--disable-examples-build`)

To make the build more transparent, scale better, be faster in CI, also
syncing with curl.

Slight downsides after this patch:
- cmake and autotools have different default behavior for building
  examples.
- cmake needs an extra step to build examples. (an explicit option is
  planned to restore the old behavior.)

Also:
- sync BSD matrix build-tool naming with rest of jobs.

Closes #2276
2026-07-12 16:27:58 +02:00
Viktor Szakats
4deba99cbc appveyor: silence cmake warning
```
CMake Warning:
  Manually-specified variables were not used by the project:

    RUN_SSHD_TESTS
```

Closes #2129
2026-06-28 10:23:00 +02:00
Viktor Szakats
d58a25a029 CI: pass --proto-redir =https alongside --location
Closes #2117
2026-06-22 13:03:40 +02:00
Viktor Szakats
7537c3e7c3 appveyor: really disable building tests for no-test jobs
Job                                                                  | Before | After
-------------------------------------------------------------------- | ------ | -------
VS2026, OpenSSL 3, x64, Server 2019, clang-cl                        | 1m22s  | 49s
VS2022, OpenSSL 3, x64, Server 2019, Shared-only, docs               | 1m29s  | 52s
VS2015, OpenSSL 1.1, x86, Server 2016, Static-only                   | 2m18s  | 51s
VS2015, OpenSSL 1.1, x64, Server 2012 R2, Shared-only, Debug-logging | 2m9s   | 50s
VS2013, OpenSSL 1.1, x64, Server 2012 R2                             | 54s    | 44s
VS2013, OpenSSL 1.1, x86, Server 2012 R2, Shared-only                | 45s    | 33s
VS2010, WinCNG, x64, Build-only, non-unity, examples, docs           | 49s    | 53s
VS2015, WinCNG, x64, Server 2012 R2                                  | 2mi19s | 1m28s
VS2015, WinCNG, x86, Server 2016                                     | 2mi23s | 51s
Total                                                                | 25m43s | 18m51s

Before: https://ci.appveyor.com/project/libssh2org/libssh2/builds/54220007
After: https://ci.appveyor.com/project/libssh2org/libssh2/builds/54220033

There is delay (between) starting up the jobs, hence the longer total
than the sum of the individual job times. The runtime itself is below 8
minutes after this patch (vs. 15m before, and 27m before #2051). It
looks like the total time is around double the raw runtime.

Follow-up to 39cd3a82c7 #2051

Closes #2055
2026-06-15 20:21:29 +02:00
Viktor Szakats
39cd3a82c7 CI: drop redundant AppVeyor build jobs, limit building tests and examples
- drop 2 jobs that were build-only and also run on GHA.
  (Saving 4 minutes)
- comment out a job that's only interesting when running tests.
  (Saving 2 minutes)
- limit three jobs to build either shared/static lib.
- limit building documentation to two (old, new) jobs.
- limit building tests to jobs also running them (currently none).
  Tests are kept being built on GHA.
- limit building example to the oldest supported MSVC version.
- adjust GHA setting to replace dropped AppVeyor CI combinations.

To reduce CI turnaround time. AppVeyor CI jobs are sequential, and may
take hours till they finish when queued up due to multiple PRs or a
merge to master. One run took 45-60 minutes before this patch. After,
it's about half of that.

Before:
```
VS2026, OpenSSL 3, x64, Server 2019, clang-cl            2m16s
VS2022, OpenSSL 3, x64, Server 2019                      2m2s
VS2015, OpenSSL 1.1, x86, Server 2016                    4m13s
VS2015, OpenSSL 1.1, x64, Server 2012 R2, Debug-logging  3m50s
VS2013, OpenSSL 1.1, x64, Server 2012 R2                 53s
VS2013, OpenSSL 1.1, x86, Server 2012 R2, Shared-only    49s
VS2013, OpenSSL 1.1, x64, Build-only, Static-only        53s
VS2010, WinCNG, x64, Build-only, non-unity               48s
VS2026, WinCNG, x64, Server 2019, Debug-logging          1m58s
VS2022, WinCNG, ARM64, Build-only                        2m
VS2015, WinCNG, x64, Server 2012 R2                      3m43s
VS2015, WinCNG, x86, Server 2016                         3m29s
```
Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/54205019

After:
```
VS2026, OpenSSL 3, x64, Server 2019, clang-cl                         1m45s
VS2022, OpenSSL 3, x64, Server 2019, Shared-only, docs                1m50s
VS2015, OpenSSL 1.1, x86, Server 2016, Static-only                    2m20s
VS2015, OpenSSL 1.1, x64, Server 2012 R2, Shared-only, Debug-logging  2m15s
VS2013, OpenSSL 1.1, x64, Server 2012 R2                              46s
VS2013, OpenSSL 1.1, x86, Server 2012 R2, Shared-only                 41s
VS2010, WinCNG, x64, Build-only, non-unity, examples, docs            48s
VS2015, WinCNG, x64, Server 2012 R2                                   2m21s
VS2015, WinCNG, x86, Server 2016                                      2m22s
```
Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/54205461

Closes #2051
2026-06-12 14:36:49 +02:00
Viktor Szakats
e8c58d8748 appveyor: bump clang-cl job to VS2026, add native VS2026 job
Also:
- install CMake 4.2.1 manually for VS2026 jobs, because the preinstalled
  version (4.1.2) does not yet support the compatible generator.

Refs:
9ef4152eda
https://github.com/appveyor/website/pull/912
fa7f7b928e
https://github.com/appveyor/build-images/pull/175
https://www.appveyor.com/docs/windows-images-software/
https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2018%202026.html

Closes #2005
2026-06-09 22:26:49 +02:00
Viktor Szakats
a62f315861 appveyor: rename/shorten out-of-tree directory
To sync with curl.

Closes #1976
2026-06-05 02:56:02 +02:00
Viktor Szakats
7e5b263b45 CI: dump libssh2_config.h to log
To ease debugging.

Closes #1975
2026-06-05 00:51:07 +02:00
Viktor Szakats
c71ff14f3b appveyor: replace choco with pinned/hashed direct download for docker
To avoid chocolatey as a dependency, to add hash verification, and to
control version bumps. The latter is also the slight downside, it needs
to be bumped manually.

Note: With tests disabled docker-cli isn't actually used in CI at the
moment.

Cherry-picked from #1892

Closes #1894
2026-04-26 10:33:09 +02:00
Viktor Szakats
6d516af7eb ci/appveyor: rework, simplify, use more bash and modern CMake
Also to prepare dropping support for old CMake version installed by
default on old runner images.

Cherry-picked from #1839

Closes #1841
2026-04-09 15:14:49 +02:00