mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 02:18:41 +00:00
github/workflows/sanitizers: port sanitizers builds to meson
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
This commit is contained in:
parent
0ab1a63461
commit
b4b1f1498c
49
.github/workflows/sanitizers.sh
vendored
49
.github/workflows/sanitizers.sh
vendored
@ -11,58 +11,23 @@ export UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
|
|||||||
|
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install --yes --no-install-recommends \
|
apt-get install --yes --no-install-recommends \
|
||||||
apparmor automake autoconf bash-completion bridge-utils build-essential \
|
apparmor bash-completion bridge-utils build-essential \
|
||||||
busybox-static clang cloud-image-utils curl dbus debhelper debootstrap \
|
busybox-static clang cloud-image-utils curl dbus debhelper debootstrap \
|
||||||
devscripts dnsmasq-base docbook2x doxygen ed fakeroot file gcc graphviz \
|
devscripts dnsmasq-base docbook2x doxygen ed fakeroot file gcc graphviz \
|
||||||
git iptables net-tools libapparmor-dev libcap-dev libgnutls28-dev liblua5.2-dev \
|
git iptables meson net-tools libapparmor-dev libcap-dev libgnutls28-dev liblua5.2-dev \
|
||||||
libpam0g-dev libseccomp-dev libselinux1-dev libtool linux-libc-dev \
|
libpam0g-dev libseccomp-dev libselinux1-dev libtool linux-libc-dev \
|
||||||
llvm lsb-release make openssl pkg-config python3-all-dev \
|
llvm lsb-release make openssl pkg-config python3-all-dev \
|
||||||
python3-setuptools rsync squashfs-tools uidmap unzip uuid-runtime \
|
python3-setuptools rsync squashfs-tools uidmap unzip uuid-runtime \
|
||||||
wget xz-utils systemd-coredump
|
wget xz-utils systemd-coredump
|
||||||
apt-get remove --yes lxc-utils liblxc-common liblxc1 liblxc-dev
|
apt-get remove --yes lxc-utils liblxc-common liblxc1 liblxc-dev
|
||||||
|
|
||||||
ARGS="--enable-sanitizers \
|
ARGS="-Dprefix=/usr -Dtests=true -Dpam-cgroup=false -Dwerror=true -Dio-uring-event-loop=false -Db_lto_mode=default -Db_lundef=false"
|
||||||
--prefix=/usr/ \
|
|
||||||
--disable-no-undefined \
|
|
||||||
--build=x86_64-linux-gnu \
|
|
||||||
--includedir=\${prefix}/include \
|
|
||||||
--mandir=\${prefix}/share/man \
|
|
||||||
--infodir=\${prefix}/share/info \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
--localstatedir=/var \
|
|
||||||
--disable-silent-rules \
|
|
||||||
--libdir=\${prefix}/lib/x86_64-linux-gnu \
|
|
||||||
--libexecdir=\${prefix}/lib/x86_64-linux-gnu \
|
|
||||||
--disable-maintainer-mode \
|
|
||||||
--disable-dependency-tracking \
|
|
||||||
--libdir=\${prefix}/lib/x86_64-linux-gnu \
|
|
||||||
--libexecdir=\${prefix}/lib/x86_64-linux-gnu \
|
|
||||||
--with-rootfs-path=\${prefix}/lib/x86_64-linux-gnu/lxc \
|
|
||||||
--enable-doc \
|
|
||||||
--disable-rpath \
|
|
||||||
--with-distro=ubuntu \
|
|
||||||
--enable-commands \
|
|
||||||
--enable-pam \
|
|
||||||
--enable-tests \
|
|
||||||
--enable-memfd-rexec \
|
|
||||||
--disable-static-binaries \
|
|
||||||
--enable-static \
|
|
||||||
--enable-silent-rules \
|
|
||||||
--enable-apparmor \
|
|
||||||
--enable-capabilities \
|
|
||||||
--enable-seccomp \
|
|
||||||
--enable-selinux \
|
|
||||||
--disable-liburing \
|
|
||||||
--enable-werror"
|
|
||||||
|
|
||||||
case "$CC" in clang*)
|
case "$CC" in clang*)
|
||||||
ARGS="$ARGS --enable-fuzzers"
|
ARGS="$ARGS -Db_sanitize=address,undefined"
|
||||||
esac
|
esac
|
||||||
|
meson setup san_build $ARGS
|
||||||
./autogen.sh
|
ninja -C san_build
|
||||||
CFLAGS="-Wall -Werror" ./configure $ARGS
|
ninja -C san_build install
|
||||||
make -j$(nproc)
|
|
||||||
make install
|
|
||||||
|
|
||||||
cat <<'EOF' >/usr/bin/lxc-test-share-ns
|
cat <<'EOF' >/usr/bin/lxc-test-share-ns
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
6
.github/workflows/sanitizers.yml
vendored
6
.github/workflows/sanitizers.yml
vendored
@ -15,6 +15,12 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -qq gcc clang meson llvm
|
||||||
|
sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev libselinux1-dev linux-libc-dev libpam0g-dev docbook2x
|
||||||
|
|
||||||
- name: Compiler version
|
- name: Compiler version
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.compiler }}
|
CC: ${{ matrix.compiler }}
|
||||||
|
Loading…
Reference in New Issue
Block a user