Browse Source

github: add workflow for Meson builds

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Brandon Maier 1 year ago committed by David Gibson
parent
commit
6c5e189fb9
  1. 30
      .github/workflows/build.yml
  2. 8
      scripts/install-deps.sh

30
.github/workflows/build.yml

@ -9,7 +9,7 @@ name: Build test
- main - main


jobs: jobs:
build: build-make:
runs-on: ubuntu-latest runs-on: ubuntu-latest


strategy: strategy:
@ -35,3 +35,31 @@ jobs:
- name: Run check - name: Run check
run: | run: |
make check 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

8
scripts/install-deps.sh

@ -12,20 +12,20 @@ fi
if [ "$NAME" = "Arch Linux" ] if [ "$NAME" = "Arch Linux" ]
then then
pacman -Syu --needed --noconfirm bison diffutils flex gcc git libyaml \ 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" ] elif [ "$NAME" = "Alpine Linux" ]
then then
apk add build-base bison coreutils flex git yaml yaml-dev python3-dev \ 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" ] elif [ "$NAME" = "Fedora Linux" ]
then then
dnf install -y bison diffutils flex gcc git libyaml libyaml-devel \ 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" ] elif [ "$NAME" = "Ubuntu" ]
then then
apt update apt update
apt install -yq build-essential bison flex git libyaml-dev pkg-config \ 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 else
echo "ERROR: OS name is not provided." echo "ERROR: OS name is not provided."
exit 1 exit 1

Loading…
Cancel
Save