Commit Graph

54 Commits

Author SHA1 Message Date
Willy Tarreau
d8ac3f5dbf CI: coverity: simplify debugging options
We used to rely on a call to "sed" to modify the DEBUG option in the
makefile when running under Coverity because it splits words around
spaces and does not allow to pass multi-word build options. As reported
by Tim in issue #1592, this broke with commit 8de7f2822 ("BUILD: makefile:
enable both DEBUG_STRICT and DEBUG_MEMORY_POOLS by default") when the
default DEBUG options changed.

Let's change this to pass all DEBUG options one at a time instead and
get rid of this sed.
2022-03-04 14:33:55 +01:00
Willy Tarreau
a0a6911bde CI: github: enable pool debugging by default
This enables DEBUG_MEMORY_POOLS and DEBUG_POOL_INTEGRITY so that by
default the tests run under stricter checks, which are likely to
catch more bugs. Note that these ones are permanently used in prod
on haproxy.org.
2022-02-23 18:14:49 +01:00
Ilya Shipitsin
6fed59c7c1 CI: enable QUIC for Coverity scan 2022-02-12 08:06:34 +01:00
Tim Duesterhus
f42ddf73fc CI: Consistently use actions/checkout@v2
v2 is the current version of the checkout action and faster than v1.
2022-01-29 15:24:06 +01:00
Ilya Shipitsin
27df87cc63 CI: github actions: use cache for SSL libs
we have two kinds of SSL libs built - git based and version based.
this commit introduces caching for version based SSL libs.
2022-01-25 12:02:08 +01:00
Ilya Shipitsin
e9efc3a5be CI: refactor OpenTracing build script
re-use scripts/build-ot.sh in CI again. Bump opentracing-cpp to 1.6.0
2022-01-19 07:37:40 +01:00
Ilya Shipitsin
b9e3fb7315 CI: github actions: use cache for OpenTracing
this caches OpenTracing libs between builds, should save couple of minutes
for each build.
2022-01-13 13:37:34 +01:00
Ilya Shipitsin
65eab587a2 CI: github actions: clean default step conditions
step condition "if: ${{ !failure() }}" was added in 2ef4c7c843
during my experiments. As Tim Düsterhus mentioned, that condition is default and may be omitted.
2022-01-11 15:00:55 +01:00
Ilya Shipitsin
6569de2b88 CI: refactor spelling check
let us switch to codespell github actions instead of invocation from cmdline.
also, "ifset,thrid,strack,ba,chck,hel,unx,mor" added to whitelist, those are
variable names and special terms widely used in HAProxy
2022-01-07 14:42:33 +01:00
Ilya Shipitsin
2ef4c7c843 CI: Github Actions: do not show VTest failures if build failed
this is mostly cleanup, issue is minor. If build failed, VTest execution
tried to be performed as well as VTest result show. This change ignores
those steps if build failed.
2021-12-25 15:09:06 +01:00
Willy Tarreau
4673c5e2c8 CI: github actions: add the output of $CC -dM -E-
Sometimes figuring what differs between platforms is useful to fix
build issues, to decide what ifdef to add for example. Let's always
call $CC -dM -E- before starting make.
2021-11-26 17:58:42 +01:00
Tim Duesterhus
662896e68e CI: Clean up formatting in GitHub Action definitions
This patch cleans up the formatting within the .yml definition files for GitHub
Actions to ensure a consistent look across all actions.
2021-10-18 07:17:04 +02:00
Tim Duesterhus
89c9d0a169 CI: Add permissions to GitHub Actions
This change locks down the permissions of the access token in GitHub Actions to
only allow reading the repository contents and nothing else.

see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
2021-10-18 07:17:04 +02:00
Tim Duesterhus
8a91fa4219 CI: Replace the requirement for 'sudo' with a call to 'ulimit -n'
Using 'sudo' required quite a few workarounds in various places. Setting an
explicit 'ulimit -n' removes the requirement for 'sudo', resulting in a cleaner
workflow configuration.
2021-06-17 14:57:43 +02:00
Ilya Shipitsin
b89c0e4635 CI: github actions: enable alpine/musl builds
on push builds are added. based on cirrus-ci patch sent by William Lallemand
2021-06-12 18:23:22 +02:00
Ilya Shipitsin
75c95aa649 CI: github actions: add OpenTracing builds
let us add OpenTracing module to "all features" builds
2021-05-18 18:37:37 +02:00
Ilya Shipitsin
0b03895620 CI: introduce scripts/build-vtest.sh for installing VTest
we install VTest for all CI systems, let us unify instalation
2021-05-18 10:48:30 +02:00
Tim Duesterhus
b38b5c3d0d Revert "CI: Build VTest with clang"
The issue with VTest not building properly in gcc is fixed since commit
vtest/VTest@0730540c43. Revert the patch to keep
the CI configuration simple.

This reverts commit e61f53eb44.
2021-05-12 21:28:08 +02:00
Ilya Shipitsin
9c0fcea898 CI: extend spellchecker whitelist, add "ists" as well
codespell does not handle plurals, we already whitelusted "ist", let us
whitelist "ists" as well
2021-05-10 23:04:55 +02:00
Tim Duesterhus
e61f53eb44 CI: Build VTest with clang
Current VTest master fails to build using gcc, see vtest/VTest#27.

This patch is to be reverted once VTest is fixed.
2021-05-10 23:00:59 +02:00
Willy Tarreau
aca389a483 CI: github: do not build libslz any more
As hinted by Tim, it's not needed any more since it's now integrated,
let's get rid of this step.
2021-04-22 16:10:32 +02:00
Willy Tarreau
57610c694e CONTRIB: move src/wurfl.c and contrib/wurfl to addons/wurfl
Both the source file and the dummy library are now at the same place.
Maybe the build howto could be moved there as well to make things even
cleaner.

The Makefile, MAINTAINERS, doc, and vtest matrix were updated.
2021-04-02 17:48:42 +02:00
Willy Tarreau
f8d9ec57f0 CONTRIB: move src/da.c and contrib/deviceatlas to addons/deviceatlas
Both the source file and the dummy library are now at the same place.
Maybe the build howto could be moved there as well to make things even
cleaner.

The Makefile, MAINTAINERS, doc, github build matrix, coverity checks
and travis CI's build were updated.
2021-04-02 17:48:42 +02:00
Willy Tarreau
977209d1d8 CONTRIB: move 51Degrees to addons/51degrees
Now it's much cleaner, both 51d.c and the dummy library live together and
are easier to spot and maintain. The build howto probably ought to be moved
there as well. Makefile, docs and MAINTAINERS were updated, as well as
the github CI's build matrix, travis CI's, and coverity checks.
2021-04-02 17:48:42 +02:00
Willy Tarreau
d798889a5d CONTRIB: move halog to admin/
halog is an admin tool, so let's move it to admin/ as well. The makefile
was updated to build from the new directory.
2021-04-02 17:48:42 +02:00
Willy Tarreau
21ef8b9064 BUILD: makefile: integrate the hpack tools
The few hpack development tools are now integrated into the main
makefile, which allows to remove the original one which was causing
lots of build warnings. A README was added to explain how to build
instead.
2021-04-02 17:48:42 +02:00
Willy Tarreau
074ebcde29 CONTRIB: move some dev-specific tools to dev/
The following directories were moved from contrib/ to dev/ to make their
use case a bit clearer. In short, only developers are expected to ever
go there. The makefile was updated to build and clean from these ones.

base64/  flags/  hpack/  plug_qdisc/  poll/  tcploop/  trace/
2021-04-02 17:48:42 +02:00
Willy Tarreau
34b4369709 CONTRIB: debug: split poll from flags
Now poll is its own project and doesn't share the "flags" Makefile
any more. One of the issues was that it was making references to the
haproxy include path which is not needed here.
2021-04-02 17:48:42 +02:00
Ilya Shipitsin
88288e47ca CI: codespell: whitelist "Dragan Dosen"
let us tell codespell that "Dosen" is legitimate spelling
2021-03-20 09:28:53 +01:00
Tim Duesterhus
2ca0bbc7d8 Revert "CI: Pin VTest to a known good commit"
The issue with VTest now is fixed in VTest master since commit
vtest/VTest@040bb6737a.

This reverts commit 24105300b8.
2021-03-03 05:07:10 +01:00
Ilya Shipitsin
0879c22723 CI: codespell: skip Makefile for spell check
checking Makefile is noisy, we do not benefit from it
2021-02-27 09:01:36 +01:00
Tim Duesterhus
66d28e7045 CI: Fix the coverity builds
In an attempt to fix the use of DEBUG_STRICT commit
7f0f4786d1 unfortunately broke the Coverity
builds completely.

It turns out that Coverity does not properly handle quoting within
`COVERITY_SCAN_BUILD_COMMAND`, instead breaking up single arguments at
whitespace, thus passing `-DDEBUG_USE_ABORT=1` to `make` as-is.

Fix this issue by hijacking the Makefile within the Coverity workflow. We
simply replace the default value of the `DEBUG` option with whatever values we
need. The build command now only includes the TARGET and USE_* flags, each of
which works without any spaces.
2021-01-28 20:40:14 +01:00
Tim Duesterhus
7f0f4786d1 CI: Fix DEBUG_STRICT definition for Coverity
The DEBUG_STRICT define needs to be passed as part of `DEBUG`, not as a bare
parameter.
2021-01-27 12:45:07 +01:00
Tim Duesterhus
24105300b8 CI: Pin VTest to a known good commit
As of January, 11th the macOS builds fail due to regression introduced in
VTest. This patch pins VTest to the newest good commit.

This patch should be reverted once VTest's 'master' is stable again.

see vtest/VTest#26
2021-01-20 19:23:57 +01:00
Thayne McCombs
ffa21224c0 CI: github: add a few more words to the codespell ignore list
This adds "referer,ot,uint,iif,fo,keep-alives" to the ignore list:
  - "referer" is the well-known HTTP header field name (with its
    spelling error)
  - "ot" appears a lot in the opentracing contrib.
  - "iff" often stands for "if and only if"
  - "fo" appears as a test string in tests/ist.c (could possibly be
     changed)
  - "keep-alives" appears as a noon in "...enable TCP keep-alives".
2021-01-08 15:03:13 +01:00
Ilya Shipitsin
ce94a948fb CI: github actions: build several popular "contrib" tools
this adds "halog", "flags" and "poll" builds. builds are done in
separate steps for better failure identification
2021-01-05 17:44:00 +01:00
Ilya Shipitsin
64b6f36788 CI: GitHub Actions: enable daily Coverity scan
That scan was previously implemented on Travis. Let us migrate
it to GitHub Actions.

Co-authored-by: Tim Duesterhus <tim@bastelstu.be>
2020-12-28 12:02:09 +01:00
Ilya Shipitsin
5a6347fe3f CI: codespell: whitelist "te" and "nd" words
te is widely used abbrevation for "transfer encoding"
nd is variable name "name description"

we need to teach codespell those are legitimate
2020-12-21 11:54:06 +01:00
Tim Duesterhus
9fee7e02d1 CI: Set DEBUG=-DDEBUG_STRICT=1 in GitHub Actions
This was missing when migrating from Travis.
2020-11-21 18:27:33 +01:00
Tim Duesterhus
ed54c3baa5 CI: Clean up Windows CI
This patch cleans up the Windows CI to look more similar to the refactored
Linux CI on GitHub Actions.

It switches the environment set-up from some manual cygwin setup via choco to
the msys2/setup-msys2@v2 action which just works and allows later steps to look
like any others without need to manually specify the shell.

This new setup is much faster than before where a single Windows build required
more than 10 minutes with more than 5 minutes just spent setting up the
environment and more than 6 minutes compiling HAProxy.

With this patch the setting of of the environment is done in less than a minute
and HAProxy is compiled in less than 2 minutes.

The only drawback is that Lua does not appear to be readily available. I expect
this to be acceptable and that the benefits far outweight this small drawback.
2020-11-21 11:05:16 +01:00
Tim Duesterhus
8d173e17c0 CI: Pass the github.event_name to matrix.py
This is a preparation to later run some matrix entries on schedule only.

Within the matrix.py script it can now be detected whether the workflow is
running on schedule by using:

    if build_type == "schedule":
        matrix.append(...)
2020-11-21 11:05:16 +01:00
Ilya Shipitsin
e48853aaf4 CI: Github Action: run "apt-get update" before packages restore
ubuntu somehow needs it, no idea why does not apt-get do it itself.
2020-11-21 10:44:16 +01:00
Tim Duesterhus
cdaa38ea6e CI: Make the h2spec workflow more consistent with the VTest workflow
This PR aims to make the workflow more consistent, by reusing the same wording
for the step names and the same commands to make it look like the vtest
workflow as much as possible.

It was renamed to compliance.yml to match the human readable name better. This
also allows to extend the workflow with other compliance tools later on, nicely
grouping those jobs together in a single file.

No functional changes have been made.
2020-11-17 11:55:48 +01:00
Tim Duesterhus
fa1747dc7d CI: Stop hijacking the hosts file
vtest/VTest#24 is merged now. This step is no longer required.
2020-11-17 11:55:07 +01:00
Tim Duesterhus
288c0772e6 CI: Expand use of GitHub Actions for CI
Travis is becoming overall increasingly unreliable lately. We've already
seen that the timing sensitive tests regularly fail and thus they were
disabled.

Additionally they recently announced a new pricing model that caps the number
of minutes for Open Source projects:
https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing

GitHub Actions VMs are working well, possibly allowing to use custom runners
for special tasks in the future.

In addition to this better performance its workflow configuration language
is more expressive compared to the Travis CI one. Specifically the build
matrix does not need to be specified in YAML. Instead it can be generated
ad-hoc using a script. This allows us to cleanly define the various build
configurations without having an unreadable 80 line mess where the flags
are inconsistently activated. As an example in the current Travis CI
configuration the prometheus exporter is tested together with LibreSSL 2.9.2
for whatever reason.

In addition to all the previous points the UI of Travis is not that nice.
On GitHub you are just seeing that "Travis failed" without any details which
exact job failed. This requires you to visit the slow Travis page and look
up the details there. GitHub Actions creates a single entry for each
configuration that is tested, allowing you to see the details without needing
to leave GitHub.

This new GitHub Actions workflow aims to reproduce the configurations tested
in Travis. It comes close, but is not completely there, yet. Consider this
patch a proof of concept that will evolve in the future, ideally with Ilya's
expertise.

The current configurations are as follows. Each one is tested with both gcc
and clang.
- All features disabled (no USE flags)
- All features enabled (all USE flags)
- Standalone test of each of the supported compression libraries:
  - USE_ZLIB=1
  - USE_SLZ=1
- Standalone test of various SSL libraries:
  - stock (the SSL installed by default on the VM)
  - OpenSSL 1.0.2u
  - LibreSSL 2.9.2, 3.0.2, 3.1.1
- All features enabled with ASAN (clang only)

Future additions of new tests should take care to not test unrelated stuff.
Instead a distinct configuration should be added.

Additionally there is a Mac OS test with clang and all features disabled.

Known issues:
- Apparently the git commit is not properly detected during build. The HEAD
  currently shows as 2.4-dev0.
2020-11-10 10:15:17 +01:00
Ilya Shipitsin
f9bc6e4968 CI: github actions: limit OpenSSL no-deprecated builds to "default,bug,devel" reg-tests 2020-11-04 16:14:09 +01:00
Ilya Shipitsin
787c63c816 CI: github actions: update h2spec to 2.6.0 2020-10-27 13:13:23 +01:00
Ilya Shipitsin
dafc56413c CI: extend spellchecker whitelist
let us ignore *.pem files
2020-06-26 11:26:52 +02:00
Ilya Shipitsin
4289f7525a CI: extend spellchecker whitelist
let us ignore *.fig files as well as "que" and "ans" words
2020-05-11 10:10:26 +02:00
Ilya Shipitsin
82e01b9437 CI: run weekly OpenSSL "no-deprecated" builds
OpenWRT uses such OpenSSL builds (those builds are smaller)

some details might be found at ML: https://www.mail-archive.com/haproxy@formilux.org/msg35759.html
                               GH: https://github.com/haproxy/haproxy/issues/367
2020-04-21 10:27:41 +02:00