Commit Graph

20 Commits

Author SHA1 Message Date
David Marchand
bd93fc6830 ci: test minimum configuration
Disabling drivers and optional libraries was not tested.
Add a new target in test-meson-builds.sh and GHA with just the minimum
to run test-null.sh and any other optional component disabled.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2021-11-17 12:48:20 +01:00
David Christensen
91949f133d ci: add ppc64le cross compilation in GHA
Enable Github Actions to cross-compile code for POWER systems.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-11-10 11:48:01 +01:00
David Marchand
2cdca6ed63 ci: fix aarch64 cross compilation in GHA
CC_FOR_BUILD is a Travis env variable.
This results in GHA aarch64 cross compilation jobs building x86
binaries.

Example in a recent job on main branch:
2021-10-28T09:51:06.4976495Z + .ci/linux-build.sh
2021-10-28T09:51:06.4985674Z + [ -n build ]
2021-10-28T09:51:06.4987636Z + [ true = true ]
2021-10-28T09:51:06.4987991Z + [  = gcc ]
2021-10-28T09:51:06.4989419Z + [  = clang ]
2021-10-28T09:51:06.4990907Z + [ false = true ]
2021-10-28T09:51:06.4991348Z + [ false = true ]
2021-10-28T09:51:06.4992846Z + [ static = static ]
2021-10-28T09:51:06.4993550Z + OPTS= -Dexamples=l2fwd,l3fwd
2021-10-28T09:51:06.4995388Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic
2021-10-28T09:51:06.4996279Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static
2021-10-28T09:51:06.4998553Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
2021-10-28T09:51:06.4999949Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
-Dcheck_includes=true
2021-10-28T09:51:06.5002643Z + meson build --werror
-Dexamples=l2fwd,l3fwd -Dplatform=generic --default-library=static
--buildtype=debugoptimized -Dcheck_includes=true

common/cnxk has issues with Ubuntu 18.04 cross compiler.
It is a known issue (https://bugs.dpdk.org/show_bug.cgi?id=697), disable
it.

Fixes: 5d0b4ffa69 ("ci: add aarch64 clang cross-compilation Travis builds")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2021-11-01 18:15:24 +01:00
Juraj Linkeš
59e5e8abab ci: update Meson option for generic build
The way we're building DPDK in CI, with -Dmachine=default, has not been
updated when the option got replaced to preserve a backwards-complatible
build call to facilitate ABI verification between DPDK versions. Update
the call to use -Dplatform=generic, which is the most up to date way to
execute the same build which is now present in all DPDK versions the ABI
check verifies.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Aaron Conole <aconole@redhat.com>
2021-10-25 17:41:00 +02:00
David Marchand
7da138af1c ci: fix ABI reference generation
The machine=generic is not understood by older version of dpdk.
It is directly passed to gcc as -march=generic.

Since DPDK requires SSE 4.2, this results in an error when configuring
v21.02 sources for generating the reference ABI.

From GHA [1] logs:

"""
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-address-of-packed-member
-Waddress-of-packed-member: NO
Compiler for C supports arguments -Wno-packed-not-aligned
-Wpacked-not-aligned: NO
Compiler for C supports arguments -Wno-missing-field-initializers
-Wmissing-field-initializers: YES

config/x86/meson.build:14:6: ERROR:  Could not get define '__SSE4_2__'

A full log can be found at
/home/runner/work/dpdk/dpdk-v21.02/build/meson-logs/meson-log.txt
Error: Process completed with exit code 1.
"""

1: https://github.com/ovsrobot/dpdk/runs/2355005702

Stick to a compatible configuration passing -Dmachine=default.

Note: the breakage was not seen earlier this week as I guess the CI
workers are using a cached ABI reference for v20.11.

Fixes: 5b3a6ca6fd ("build: alias default build as generic")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-04-16 14:09:03 +02:00
Juraj Linkeš
5b3a6ca6fd build: alias default build as generic
The current machine='default' build name is not descriptive. The actual
default build is machine='native'. Add an alternative string which does
the same build and better describes what we're building:
machine='generic'. Leave machine='default' for backwards compatibility.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-04-09 19:11:26 +02:00
David Marchand
3cd7290c16 ci: catch coredumps
Parts of the unit tests code rely on forked/secondary processes
(expectedly) failing.
A crash in those situations could be missed so add a check on coredumps
presence after unit tests have run.
When unit tests fail, it can also help checking for coredumps as it
could give more insights on what happened.

In some situations (like explicit call to rte_panic), coredump generation
must be disabled to avoid false positives.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2021-03-03 10:05:23 +01:00
Bruce Richardson
727414e20e ci: enable header includes check
For CI builds, turn on the checking of includes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2021-01-29 20:59:37 +01:00
Juraj Linkeš
5d0b4ffa69 ci: add aarch64 clang cross-compilation Travis builds
Mirror the existing gcc jobs - build static and shared libs.
Use arm64_armv8_linux_clang_ubuntu1804 meson cross file.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-01-26 12:43:04 +01:00
David Marchand
443267090e ci: enable v21 ABI checks
v21 ABI will be maintained until v21.11.

Let's use the latest released libabigail 1.8.

In GitHub Actions, libabigail binaries and the ABI reference are stored
in two shared caches as all branches can use the same.

While at it, we can reproduce changes from the commit 0b8086ce3f
("devtools: remove useless files from ABI reference").
This will save some space in the CI caches.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-14 15:34:04 +01:00
David Marchand
87009585e2 ci: hook to GitHub Actions
With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.

Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
  Instead, they are gathered in a "catch-all" step and attached as
  artifacts.
- A cache entry is stored once and for all, but if no cache is found you
  can inherit from the default branch cache. The cache is 5GB large, for
  the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
  starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
  processors that don't have the same capabilities. For DPDK, this
  impacts the ccache content since everything was built with
  -march=native so far, and we will end up with binaries that can't run
  in a later build. The problem has not been seen in Travis CI (?) but
  it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
  crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
  default ccache for the week (useful for the ovsrobot).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-12-14 15:34:00 +01:00
Bruce Richardson
4e648fb70c ci: reduce examples in static builds
Static builds can take a lot of space, so reduce the number of examples
built when doing those static builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2020-04-17 23:34:08 +02:00
David Marchand
b5030c733a ci: build and use libabigail 1.6
libabigail 1.2 (at least) reports changes in 'const' property as an ABI
breakage [1].
This was fixed upstream in libabigail 1.4 [2], and a bug has been opened
in launchpad [3].

But for now, build and use the last version 1.6 so that the ABI checks
can be kept.

1: https://travis-ci.com/DPDK/dpdk/jobs/287872118#L2242
2: https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commitdiff;h=215b7eb4fe8b
3: https://bugs.launchpad.net/ubuntu/+source/libabigail/+bug/1863607

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
2020-02-18 21:36:30 +01:00
David Marchand
777014e56d devtools: add ABI checks
For normal developers, those checks are disabled.

Enabling them requires a configuration that will trigger the ABI dumps
generation as part of the existing devtools/test-build.sh and
devtools/test-meson-builds.sh scripts.

Those checks are enabled in the CI for the default meson options on x86
and aarch64 so that proposed patches are validated via our CI robot.
A cache of the ABI is stored in travis jobs to avoid rebuilding too
often.

Checks can be informational only, by setting ABI_CHECKS_WARN_ONLY when
breaking the ABI in a future release.

Explicit suppression rules have been added on internal structures
exposed to crypto drivers as the current ABI policy does not apply to
them.
This could be improved in the future by carefully splitting the headers
content with application and driver "users" in mind.

We currently have issues reported for librte_crypto recent changes for
which suppression rules have been added too.

Mellanox glue libraries are explicitly skipped as they are not part of
the application ABI.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2020-02-05 15:14:46 +01:00
David Marchand
1e3acc6f70 ci: add minimal check on testpmd
Try to start testpmd with two vdevs without hugepages.
This is a really basic check, but better than nothing.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-11-27 00:00:24 +01:00
Bruce Richardson
3be76aa929 ci: add 32-bit travis builds
Add a travis job to build for 32-bit on 64-bit systems to catch additional
build errors, for example, incorrect use of printf specifiers with uint64_t
types.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-11-19 22:23:31 +01:00
David Marchand
7632da0b87 ci: add missing dependencies for documentation
Install missing dependencies so that doc can be generated.
While at it, explicitly configure that we want the doc to be generated.
Missing dependencies are then reported as an error rather than silently
ignored.

Because of these extra dependencies, only build them in dedicated travis
jobs.

Fixes: ad2b2cfb1e ("ci: enable unit tests with Travis")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-09-13 13:04:13 +02:00
Aaron Conole
ad2b2cfb1e ci: enable unit tests with Travis
When building under Travis (or another linux CI service), enable
running the fast-tests when the RUN_TESTS environment variable is set.

For the Travis service, introduce two new shared builds, since the
shared builds are the ones passing.  Builds that are statically
linked still show some issues in some of the eal_flags tests.  We make
new builds for this, rather than piggybacking, because 'at a glance'
it is difficult to determine why a build fails, and if tests were
enabled for all builds, then looking at the logs for any build would
take a significant amount of time.

Finally, the command to invoke fast tests includes a timeout
multiplier, since some CI environments don't have enough resources to
complete the tests in the default 10s timeout period.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-08-02 23:54:44 +02:00
David Marchand
76f8486e16 ci: fix arm64 config filename
The ARM64 config file has been renamed in the commit
ae2f2fee24 ("build: rename linuxapp to linux in meson cross files").

Fixes: 99889bd852 ("ci: introduce Travis builds for GitHub repositories")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2019-03-30 00:01:35 +01:00
Michael Santana
99889bd852 ci: introduce Travis builds for GitHub repositories
GitHub is a service used by developers to store repositories.  GitHub
provides service integrations that allow 3rd party services to access
developer repositories and perform actions.  One of these services is
Travis-CI, a simple continuous integration platform.

This series introduces the ability for any github mirrors of the DPDK
project, including developer mirrors, to kick off builds under the
travis CI infrastructure.  For now, this just means compilation - no
other kinds of automated run exists yet.  In the future, this can be
expanded to execute and report results for any test-suites that might
exist.

This is a simple initial implementation of a travis build for the DPDK
project.  It doesn't require any changes from individual developers to
enable, but will allow those developers who opt-in to GitHub and the
travis service to get automatic builds for every push they make.

The files added under .ci/ exist so that in the future, other CI
support platforms (such as cirrus, appveyor, etc.) could have a common
place to put their requisite scripts without polluting the main tree.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-03-26 22:31:40 +01:00