numam-dpdk/.ci/linux-setup.sh
David Marchand b35c4b0aa2 ci: add Fedora 35 container in GHA
Build DPDK with Fedora 35 containers.

GHA container support does not allow caching images and docker hub
seems to limit image pulls.
On the other hand, the Fedora project hub does not seem to limit them,
so prefer this hub.
Nevertheless, let's try to be good citizens and cache (once a day) a
prepared image for subsequent builds.
This preparation is done in a first prepare-container-images job.
The rpm-container-builds job then depends on it with a 'needs:' tag.

Differences with builds in Ubuntu GHA vm images:
- tasks are run as root in containers, no need for sudo,
- compiler must be explicitly installed,
- GHA artifacts can't contain a ':' in their name, and must be filtered,
- environment variables are not inherited and must be passed explicitly,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2022-04-06 20:57:33 +02:00

13 lines
413 B
Bash
Executable File

#!/bin/sh -xe
# Builds are run as root in containers, no need for sudo
[ "$(id -u)" != '0' ] || alias sudo=
# need to install as 'root' since some of the unit tests won't run without it
sudo python3 -m pip install --upgrade 'meson==0.49.2'
# setup hugepages. error ignored because having hugepage is not mandatory.
cat /proc/meminfo
sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages' || true
cat /proc/meminfo