mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 19:35:59 +00:00
github: Update build test for meson
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
826cc3ddca
commit
6f9fabfcb8
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@ -11,17 +11,18 @@ jobs:
|
|||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-22.04
|
||||||
- ubuntu-20.04
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -qq gcc clang
|
sudo apt-get install -qq gcc clang meson
|
||||||
sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev libselinux1-dev linux-libc-dev libpam0g-dev docbook2x
|
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
|
||||||
@ -42,22 +43,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CC: ${{ matrix.compiler }}
|
CC: ${{ matrix.compiler }}
|
||||||
run: |
|
run: |
|
||||||
# Configure
|
# Standard build
|
||||||
export CFLAGS="-Wall -Werror"
|
meson setup build -Dtests=true -Dpam-cgroup=true -Dwerror=true
|
||||||
export LDFLAGS="-pthread -lpthread"
|
ninja -C build
|
||||||
./autogen.sh
|
DESTDIR=build_install ninja -C build install
|
||||||
|
|
||||||
BUILD="$(pwd)/build"
|
# Sanitized build
|
||||||
SAN_BUILD="$(pwd)/san_build"
|
meson setup san_build -Dtests=true -Dpam-cgroup=true -Dwerror=true -Db_sanitize=address,undefined
|
||||||
mkdir -p "${BUILD}" "${SAN_BUILD}"
|
ninja -C san_build
|
||||||
cd "${BUILD}"
|
DESTDIR=san_build_install ninja -C san_build install
|
||||||
../configure --enable-tests --with-distro=unknown
|
|
||||||
|
|
||||||
# Build
|
|
||||||
make -j4
|
|
||||||
make DESTDIR="${BUILD}/install" install
|
|
||||||
|
|
||||||
cd "${SAN_BUILD}"
|
|
||||||
CFLAGS="$CFLAGS -fsanitize=address,undefined" ../configure --disable-no-undefined --enable-pam --enable-tests --with-distro=unknown
|
|
||||||
make -j4
|
|
||||||
make DESTDIR="${SAN_BUILD}/install" install
|
|
||||||
|
Loading…
Reference in New Issue
Block a user