1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
Commit Graph

226 Commits

Author SHA1 Message Date
Viktor Szakats
78ffc2d405 GHA: move config log dumps to their separate steps
To make configure step output more readable in case of a build error.
To expose configure logs for successful builds without adding clutter.

Also:
- set shell globally for Windows jobs.
- move all Cygwin files to `D:`.

Closes #1749
2025-11-28 13:10:27 +01:00
Viktor Szakats
c124c6a987 GHA: fix using mbedtls@3 in macOS jobs
mbedtls@3 is no longer installed to default locations. Point the builds
to it explicitly.

Follow-up to b098a3c434 #1744
Closes #1748
2025-11-28 12:25:34 +01:00
Viktor Szakats
b098a3c434 GHA: switch macOS jobs to versioned mbedtls@3 brew package
To avoid bumping to 4.x with the unversioned mbedtls package.

Closes #1744
2025-11-22 02:15:36 +01:00
Viktor Szakats
1045cfd033 GHA/codeql: limit cron job to the origin repository (#1741)
To avoid running it in every fork, every week.
2025-11-16 23:14:22 +01:00
Viktor Szakats
f61703cc98 GHA: add actionlint job, fix reported issues
Closes #1740
2025-11-10 19:06:11 +01:00
Viktor Szakats
26a78929ce GHA/dependabot: group updates, other tidy-ups 2025-11-02 17:45:02 +01:00
Viktor Szakats
455f062236 GHA: run fuzzer on master commits, bump upload-artifacts
Also adjust formatting to match curl workflows.

Closes #1736
2025-10-25 00:51:35 +02:00
Viktor Szakats
d4ebb524c5 GHA: replace deprecated set-output command with $GITHUB_OUTPUT
Fixing:
```
Image build and push
The `set-output` command is deprecated and will be disabled soon. Please upgrade
to using Environment Files. For more information
see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
```
Ref: https://github.com/libssh2/libssh2/actions/runs/18667440406

Ref: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Ref: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#environment-files

Closes #1735
2025-10-24 14:36:51 +02:00
Viktor Szakats
da6dec9319 GHA: set concurrency, zizmor Dependabot, set cooldown
Closes #1734
2025-10-24 14:27:34 +02:00
Viktor Szakats
8dd9da3261 GHA: drop HOMEBREW_NO_AUTO_UPDATE=1 [ci skip]
Doesn't seem to be fixing the initial delay.

Follow-up to ec5ba06276 #1678
2025-10-20 15:07:03 +02:00
Viktor Szakats
bb7b68dee8 build: quote a cmake variable, drop redundant step in Cygwin CI jobs
Drop the `git config --global core.autocrlf input` step in Cygwin jobs.
It's no longer necessary. Also saving ~10 seconds per job.

Quote the cmake variable for consistency.

Closes #1730
2025-10-19 23:04:04 +02:00
Viktor Szakats
7c92792fed GHA: bump crypto lib dependencies
Closes #1728
2025-10-18 11:03:26 +02:00
Viktor Szakats
6c6ea30d3d GHA/dependabot: minor fixes to prev
Follow-up to d223094467 #1724
2025-10-14 11:39:20 +02:00
dependabot[bot]
45d52d16c3 GHA: bump components
- bump debian from `c99c733` to `1caf1c7` in /tests/openssh_server
- bump github/codeql-action from 4.30.7 to 4.30.8

Closes #1726
Closes #1725
2025-10-14 03:24:42 +02:00
Viktor Szakats
d1ba043d0a GHA/dependabot: fix Dockerfile path
Follow-up to d223094467 #1724
2025-10-14 02:55:40 +02:00
Viktor Szakats
d223094467 Dockerfile: pin Debian trixie image, enable Dependabot
- pin Debian trixie Docker image to hash.
- set Dependabot to update the pin once every month.
- set Dependabot commit message prefixes to `GHA:` (to match curl).

Closes #1724
2025-10-14 02:39:15 +02:00
Viktor Szakats
51f6259d18 GHA: stop running tests with Libgcrypt
Tests started failing after touching `sshd_config`, which bumped
the test container from Debian Bookworm to Trixie, and openssh-server
from 9.2p1 to 10.0p1 with it. OpenSSH v10 no longer supports legacy KEX
algos `diffie-hellman-group*` and `diffie-hellman-group-exchange-*`,
making libssh2 require ECDSA or ED25519 to enable `curve25519-sha256*`
or `ecdh-sha2-*`, for the tests to succeed.

libgcrypt, stock Ubuntu wolfSSL, and WinCNG CI jobs broke.

- ED25519 is only supported with OpenSSL and LibreSSL 3.7+.
- ECDSA is supported by OpenSSL and mbedTLS (unless disabled),
  by wolfSSL in certain cases (but not on Ubuntu 24.04 with the stock
  v5.6.6 build), and by WinCNG when explicitly enabled, and targeting
  Windows 10/2016 Server.

Fixed by:

- wolfSSL support received an ECDSA detection fix, that resolved
  the issue with the stock Ubuntu builds, via:
  b807dac921 #1723

- WinCNG had ECDSA enabled in CI in the job running tests, via:
  0f5843874b #1721

- to make CI pass, disable running tests with Libgcrypt in this patch.

An alternate option is to downgrade to Bookworm, with the undesired
effect that its openssh-server doesn't support ML-KEM and other modern
SSH features, meaning those could not be tested once implemented in
libssh2, e.g. in #1644.

Ref: https://www.openssh.com/txt/release-10.0
Ref: https://packages.debian.org/trixie/openssh-server
Ref: https://packages.debian.org/bookworm/openssh-server
Ref: https://packages.ubuntu.com/noble/libwolfssl-dev

Bug: https://github.com/libssh2/libssh2/pull/1718#issuecomment-3397142351
Follow-up to 4f9e6e0bfb #1718

Closes #1720
2025-10-14 01:46:26 +02:00
Viktor Szakats
4f9e6e0bfb REUSE: add copyright headers to more files, and .gitignore updates
Also:
- rename a spellcheck file to match curl.
- editorconfig: fix line width.
- editorconfig: make it use UTF-8.
- editroconfig: apply some rules to all files.
- .gitignore: drop dupe, drop `.DS_Store` (not created by this repo),
   sort.
- .gitignore: add for tests executables.

Closes #1718
2025-10-13 13:35:25 +02:00
Viktor Szakats
b889b39945 docs: convert man page sources to "curldown" format
To render in Git webviews as-is, to make it easier to edit, verify,
and to sync up with curl.

- add options to not build the `.3` man pages:
  - autotools: `--disable-docs`
  - cmake: `LIBSSH2_BUILD_DOCS=OFF`
- building `.3` man pages requires Perl after this patch.
- drop `mansyntax` and the shell / `grep` / GNU `man` tool requirements with it.
- scripts and most logic were copied from curl.
- add `cd2nroff` from curl, with edits to relax curl-specific checks.
- used `nroff2cd` (from curl) to convert from `.3` to `.md`. Then
  manually fixed copyrights, inline function references and a couple
  of other things.

Credits-to: Daniel Stenberg

Ref: eefcc1bda4
Ref: https://github.com/curl/curl/pull/12730
Ref: https://github.com/libssh2/www/issues/25#issuecomment-3289431671

Closes #1660
2025-10-09 04:05:38 +02:00
Viktor Szakats
cea796fc2d openssl: drop support for OpenSSL <1.1.1, LibreSSL <2.7 (2018-03-21)
- OpenSSL 1.0.2 is officially not supported for open source,
  OpenSSL 1.1.0 is officially not supported at all.
  https://openssl-library.org/policies/releasestrat/index.html

- LibreSSL 2.6.x and older are just old. 2.7.0 was released on 2018-03-21.

Closes #1668
2025-10-09 03:41:33 +02:00
dependabot[bot]
9abb4e7872 GHA: bump reuse from 5.1.1 to 6.1.2
Closes #1716
2025-10-08 14:31:59 +02:00
dependabot[bot]
aa334c77d7 GHA: bump github/codeql-action from 3.30.5 to 4.30.7
Closes #1715
2025-10-08 14:31:58 +02:00
Viktor Szakats
5dd317fa19 GHA/dependabot: fix pip directory
Before this patch the Depenadabot updater picked up these two files:
- ci/spellcheck-words.txt
- LICENSES/FSFULLR.txt
2025-10-08 14:16:02 +02:00
Viktor Szakats
f29de5870b ci/GHA: show full versions next to pinned actions
Closes #1695
2025-10-03 14:24:16 +02:00
Viktor Szakats
ab7dd8999a ci/GHA: pass zizmor a GH token, fix warnings found
For a complete, online, check.

After this patch the check takes 25s, up from a fraction of a second.

Closes #1694
2025-10-03 11:56:54 +02:00
dependabot[bot]
af2de52f59 ci/GHA: bump actions
docker/login-action from 3.5.0 to 3.6.0
github/codeql-action from 3.30.4 to 3.30.5

Closes #1692
Closes #1693
2025-10-02 01:38:14 +02:00
Viktor Szakats
a7b3fdb416 ci/GHA: use --enable-option-checking=fatal, fix fallout
Follow-up to 1f79b00505 #1685

Closes #1689
2025-09-28 00:23:46 +02:00
Viktor Szakats
31f23ac017 ci/GHA: sync MSVC job names with others [ci skip]
i.e. drop 'cmake' from them.
2025-09-27 21:53:47 +02:00
Viktor Szakats
1f79b00505 ci/GHA: fix Linux autotools jobs to honor their zlib settings
Also rename `crossoptions` variables to `options`.

Closes #1685
2025-09-27 21:08:48 +02:00
Viktor Szakats
9ce9909df5 ci/GHA: merge cmake/autotools steps, other misc updates
- drop redundant `--parallel` cmake option for Ninja builds.
- use Ninja for aws-lc, also simplify the script.
- use global default `MAKEFLAGS`. This also makes certain
  steps faster due to missing parallelism before this patch.
- enable `-DBUILD_OSSFUZZ=ON` in a cmake job.
- split Cygwin job into steps. To sync with others.
- sync Cygwin build type name with other jobs.

Closes #1684
2025-09-27 20:04:02 +02:00
dependabot[bot]
08f5df3c0e ci/GHA: bump github/codeql-action and actions/cache
- bump github/codeql-action from 3.30.3 to 3.30.4
- bump actions/cache from 4.2.4 to 4.3.0

Closes #1681
Closes #1682
2025-09-26 01:38:28 +02:00
Viktor Szakats
cd37b7047f ci/GHA: enable Dependabot pip updates
Also switch to monthly from weekly for GHA updates.

Closes #1680
2025-09-25 21:40:15 +02:00
Viktor Szakats
e990562281 ci/GHA: drop spaces from requirements.txt 2025-09-25 13:53:08 +02:00
Viktor Szakats
ec5ba06276 GHA: use reuse linter tool directly, merge linters into a single workflow
Also pin `reuse` and `cmakelang` in `requirements.txt`.

Closes #1678
2025-09-25 11:45:58 +02:00
Viktor Szakats
d414292370 ci/GHA: pin codespell, use venv
Closes #1676
2025-09-24 23:11:41 +02:00
Viktor Szakats
a30ea29bc3 ci/GHA: merge Linux CodeQL jobs into one
Follow-up to b200b656b0
Follow-up to 63ae236f28 #1657

Closes #1666
2025-09-19 14:39:04 +02:00
Viktor Szakats
b200b656b0 ci/GHA: disable trap-caching in CodeQL
To avoid littering the Actions cache.

Another, libssh2-specific issue is that the cache is bound to codeql
version, master commit hash and platform. But in libssh2 we buidl 4
different configurations on Linux, which caused these caching failures:
```
C (OpenSSL) Failed to save: Unable to reserve cache with key codeql-trap-1-2.23.0-cpp-5bd1baed82ada192a2ae7e9801882813853e4d87, another job may be creating this cache.
C (wolfSSL) Failed to save: Unable to reserve cache with key codeql-trap-1-2.23.0-cpp-5bd1baed82ada192a2ae7e9801882813853e4d87, another job may be creating this cache.
C (mbedTLS) Failed to save: Unable to reserve cache with key codeql-trap-1-2.23.0-cpp-5bd1baed82ada192a2ae7e9801882813853e4d87, another job may be creating this cache.
```
Ref: https://github.com/libssh2/libssh2/actions/runs/17744827522

It's probably something to fix, because it suggests that it's unexpected
to build multiple configs in a matrix. Perhaps it's better to build them
after each other in the build step. Though it's not yet clear how
the CodeQL engine is considering coverage for different build
configurations of the same codebase.

Ref: https://github.com/curl/curl/pull/18613
Ref: 9618c337d1
2025-09-19 13:58:34 +02:00
Viktor Szakats
3389a125f3 ci/GHA: fixup comments after actions bump [ci skip] 2025-09-16 14:01:26 +02:00
dependabot[bot]
765c102f32 ci/GHA: bump actions/checkout from 4.2.2 to 5.0.0 (#1665) 2025-09-15 21:48:49 +02:00
Viktor Szakats
629904e4e4 ci/GHA: rename GHA CodeQL configuration
Follow-up to 1ec4e27f85 #1655
2025-09-15 15:16:47 +02:00
Viktor Szakats
746de2ad88 ci/GHA: test WinCNG with CodeQL
Closes #1659
2025-09-14 13:48:14 +02:00
Viktor Szakats
63ae236f28 ci/GHA: extend CodeQL to libgcrypt, mbedTLS, wolfSSL, zlib builds
Closes #1657
2025-09-14 01:18:00 +02:00
Viktor Szakats
1ec4e27f85 ci/GHA: add CodeQL jobs for GHA and C
Closes #1655
2025-09-14 00:13:39 +02:00
Viktor Szakats
4cb8398fa7 ci/GHA: document permissions as required by zizmor 1.13.0
Closes #1653
2025-09-13 18:01:12 +02:00
dependabot[bot]
a0dafb3197 ci/GHA: bump actions
actions/upload-artifact from 4.6.1 to 4.6.2
cygwin/cygwin-install-action from 5 to 6
msys2/setup-msys2 from 2.26.0 to 2.29.0

Closes #1649
Closes #1650
Closes #1651
2025-09-09 11:29:06 +02:00
Viktor Szakats
60c528be07 ci/GHA: enable Dependabot to bump GitHub Actions 2025-09-09 09:19:22 +02:00
Viktor Szakats
2fcba30a7e GHA: stay on windows-2022 runners
windows-latest is soon to bump to window-2025. windows-2025 drops
the fast D: drive and becomes slower overall. Stay on 2022.

Closes #1645
2025-08-30 11:30:54 +02:00
Viktor Szakats
0ec6b3e842 GHA: bumps, delete two jobs with fallouts
Bump GHA actions and locally built crypto libs to their latest versions.

Also delete:

- linux autotools libgcrypt i386 job that started failing
  around 2 weeks ago, unrelated to any recent libssh2 changes.
  Good: https://github.com/libssh2/libssh2/actions/runs/16805274874/job/47596007399
  Bad: https://github.com/libssh2/libssh2/actions/runs/16900307497/job/47877965823
  ```
  # TOTAL: 43
  # PASS:  8
  # SKIP:  0
  # XFAIL: 0
  # FAIL:  35

  FAIL: test_aa_warmup
  ====================
  [...]
  ```

- OmniOS job which started failing after bumping in this PR from
  vmactions/omnios-vm@16b5996777 # v1
  to
  vmactions/omnios-vm@c31844c7ab # v1
  ```
  1..2
  libssh2_userauth_list failed (0):
  ok 1 - sshd-test_ssh2
  PASS: test_sshd.test 1 - sshd-test_ssh2
  not ok 2 - sshd-test_auth_pubkey_ok_ed25519
  FAIL: test_sshd.test 2 - sshd-test_auth_pubkey_ok_ed25519
  ```

Closes #1642
2025-08-24 17:23:27 +02:00
Viktor Szakats
714fa876ee cmake: make the ExternalProject test work
By micromanaging the project dependency and its inclusion into the test
project. It feels like an awkward construct, but perhaps better than
nothing.

It's also fragile because it's a static build with no assistance from
the external project (curl in this case). Mitigated in test by disabling
all dependencies and some features.

Since there is no special core cmake logic to be tested here, in CI
the test is tested really. To keep CI jobs at minimum, only add 3 of
them, taking 26s in total. (All 6 would take 203s.)

Follow-up to 77df767784 #1589

Closes #1637
2025-08-07 10:38:18 +02:00
Viktor Szakats
dfe7aca9b0 ci/GHA: allow more time for 'CM integration' job
Sometime 5 minutes wasn't enough for the Windows platform.

Ref: https://github.com/libssh2/libssh2/actions/runs/16251541971/job/45881908411?pr=1622
Ref: https://github.com/libssh2/libssh2/actions/runs/15478243283/job/43578759660?pr=1600
2025-07-13 19:25:17 +02:00