]> git.proxmox.com Git - mirror_lxc.git/commitdiff
github: Update build test for meson
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 3 Jun 2022 19:43:42 +0000 (15:43 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 8 Jun 2022 04:47:03 +0000 (00:47 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
.github/workflows/build.yml

index 291fa58223a0de7e7b1ae2b84e69ed1c5ad61546..e077154f43e013c06467820dd70e8f793ee0dcf8 100644 (file)
@@ -11,17 +11,18 @@ jobs:
           - gcc
           - clang
         os:
-          - ubuntu-18.04
-          - ubuntu-20.04
+          - ubuntu-22.04
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
 
       - name: Install dependencies
         run: |
           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
 
       - name: Compiler version
@@ -42,22 +43,12 @@ jobs:
         env:
           CC: ${{ matrix.compiler }}
         run: |
-          # Configure
-          export CFLAGS="-Wall -Werror"
-          export LDFLAGS="-pthread -lpthread"
-          ./autogen.sh
-
-          BUILD="$(pwd)/build"
-          SAN_BUILD="$(pwd)/san_build"
-          mkdir -p "${BUILD}" "${SAN_BUILD}"
-          cd "${BUILD}"
-          ../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
+          # Standard build
+          meson setup build -Dtests=true -Dpam-cgroup=true -Dwerror=true
+          ninja -C build
+          DESTDIR=build_install ninja -C build install
+
+          # Sanitized build
+          meson setup san_build -Dtests=true -Dpam-cgroup=true -Dwerror=true -Db_sanitize=address,undefined
+          ninja -C san_build
+          DESTDIR=san_build_install ninja -C san_build install