From 6c5e189fb9527c4f69f8bd80e34eb24878795c47 Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Sat, 2 Sep 2023 10:19:31 -0500 Subject: github: add workflow for Meson builds Signed-off-by: Brandon Maier Signed-off-by: David Gibson --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- scripts/install-deps.sh | 8 ++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8db026..be23b9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ name: Build test - main jobs: - build: + build-make: runs-on: ubuntu-latest strategy: @@ -35,3 +35,31 @@ jobs: - name: Run check run: | make check + + build-meson: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + os: [ "alpine", "archlinux", "fedora", "ubuntu" ] + + container: + image: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Dependencies + run: | + ./scripts/install-deps.sh + + - name: Setup + run: meson setup build + + - name: Build + run: meson compile -C build + + - name: Run check + run: meson test -C build diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index 4076310..12507de 100755 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -12,20 +12,20 @@ fi if [ "$NAME" = "Arch Linux" ] then pacman -Syu --needed --noconfirm bison diffutils flex gcc git libyaml \ - make pkgconf python python-setuptools-scm swig valgrind which + make meson pkgconf python python-setuptools-scm swig valgrind which elif [ "$NAME" = "Alpine Linux" ] then apk add build-base bison coreutils flex git yaml yaml-dev python3-dev \ - py3-setuptools_scm swig valgrind + meson py3-setuptools_scm swig valgrind elif [ "$NAME" = "Fedora Linux" ] then dnf install -y bison diffutils flex gcc git libyaml libyaml-devel \ - make python3-devel python3-setuptools swig valgrind which + make meson python3-devel python3-setuptools swig valgrind which elif [ "$NAME" = "Ubuntu" ] then apt update apt install -yq build-essential bison flex git libyaml-dev pkg-config \ - python3-dev python3-setuptools python3-setuptools-scm swig valgrind + meson python3-dev python3-setuptools python3-setuptools-scm swig valgrind else echo "ERROR: OS name is not provided." exit 1 -- cgit v1.1