diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-05-04 16:16:47 +0100 |
---|---|---|
committer | John Levon <levon@movementarian.org> | 2022-05-09 23:28:10 +0100 |
commit | 17118f9b24eedb3380dad260dbd6a517392aaedb (patch) | |
tree | 6e02e9fe122a73e36071c2c67fedf4264bde4d59 /.github | |
parent | 5b69b60c197695579fd48abaa81c39b9984f1cab (diff) | |
download | libvfio-user-17118f9b24eedb3380dad260dbd6a517392aaedb.zip libvfio-user-17118f9b24eedb3380dad260dbd6a517392aaedb.tar.gz libvfio-user-17118f9b24eedb3380dad260dbd6a517392aaedb.tar.bz2 |
github: add 'pull_request.sh' script to replicate 'prepush' make target
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é <berrange@redhat.com>
Diffstat (limited to '.github')
-rwxr-xr-x | .github/workflows/pull_request.sh | 39 |
1 files changed, 39 insertions, 0 deletions
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 |