From 17118f9b24eedb3380dad260dbd6a517392aaedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 4 May 2022 16:16:47 +0100 Subject: github: add 'pull_request.sh' script to replicate 'prepush' make target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of 'Makefile' will go away, but the 'prepush' target has a set of commands that are used to run a full build and test check from GitHub workflows, or manually by contributors. Putting this sequence of commands in a shell script removes the dep on 'make'. Signed-off-by: Daniel P. Berrangé --- .github/workflows/pull_request.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 .github/workflows/pull_request.sh diff --git a/.github/workflows/pull_request.sh b/.github/workflows/pull_request.sh new file mode 100755 index 0000000..688ca0c --- /dev/null +++ b/.github/workflows/pull_request.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e +set -v + +test -z "$BUILD" && BUILD=build + +rm -rf $BUILD + +# ASAN build with clang +CC=clang meson $BUILD/asan -Db_sanitize=address -Db_lundef=false +ninja -C $BUILD/asan -v +meson test -C $BUILD/asan --suite style --print-errorlogs +meson test -C $BUILD/asan --no-suite style --print-errorlogs + +# debug build with clang +CC=clang meson build/clang-debug -Dtran-pipe=true +ninja -C $BUILD/clang-debug -v +meson test -C $BUILD/clang-debug --no-suite style --print-errorlogs + +# plain build with clang +CC=clang meson build/clang-plain -Dtran-pipe=true -Dbuildtype=plain +ninja -C $BUILD/clang-plain -v +meson test -C $BUILD/clang-plain --no-suite style --print-errorlogs + +# debug build with gcc +CC=gcc meson build/gcc-debug -Dtran-pipe=true +ninja -C $BUILD/gcc-debug -v +meson test -C $BUILD/gcc-debug --no-suite style --print-errorlogs + +# plain build with gcc +CC=gcc meson build/gcc-plain -Dtran-pipe=true -Dbuildtype=plain +ninja -C $BUILD/gcc-plain -v +meson test -C $BUILD/gcc-plain --no-suite style --print-errorlogs + +meson test -C $BUILD/gcc-plain --suite unit --setup valgrind --print-errorlogs +meson test -C $BUILD/gcc-plain --suite pyunit --setup pyvalgrind --print-errorlogs + +DESTDIR=tmp.install meson install -C $BUILD/gcc-plain -- cgit v1.1