From 2c4d2c5debe7749c48e96ed687cba520c13baf58 Mon Sep 17 00:00:00 2001 From: Andrei Lascu Date: Wed, 9 Feb 2022 15:58:49 +0000 Subject: [PATCH] First try at bors --- .buildbot.sh | 28 ++++++++++++++++++++++++++++ bors.toml | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .buildbot.sh create mode 100644 bors.toml diff --git a/.buildbot.sh b/.buildbot.sh new file mode 100644 index 0000000..a8a26c6 --- /dev/null +++ b/.buildbot.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +export CC=/home/cheriworker/cheri/output/morello-sdk/bin/clang +export CFLAGS="--config cheribsd-morello-hybrid.cfg" +export ASMFLAGS="--config cheribsd-morello-hybrid.cfg" + +build_dir="$(pwd)/build" +src_dir="$(pwd)/" + +# Build project locally +cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=DEBUG \ + -DLLVM_DIR=/home/cheriworker/cheri/output/morello-sdk/lib/cmake/llvm \ + -DClang_DIR=/home/cheriworker/cheri/output/morello-sdk/lib/cmake/clang \ + -B $build_dir \ + -S $src_dir +cmake --build $build_dir + +# Spawn CHERI QEMU instance +NETDEV="user,id=net0,hostfwd=tcp::10086-:22" +$HOME/cheri/output/morello-sdk/bin/qemu-system-morello -M virt,gic-version=3 -cpu morello -m 2048 -nographic -bios edk2-aarch64-code.fd -drive if=none,file=$HOME/cheri/output/cheribsd-morello-hybrid.img,id=drv,format=raw -device virtio-blk-device,drive=drv -device virtio-net-device,netdev=net0 -netdev $NETDEV -device virtio-rng-pci + +# Execute tests via CMake +cd $build_dir +ctest diff --git a/bors.toml b/bors.toml new file mode 100644 index 0000000..db1bdaa --- /dev/null +++ b/bors.toml @@ -0,0 +1,10 @@ +# Sourced from +# https://github.com/capablevms/cheri-examples/blob/master/bors.toml +status = ["buildbot/capablevms-test-script"] + +timeout_sec = 600 # 10 minutes + +# Have bors delete auto-merged branches +delete_merged_branches = true + +cut_body_after = ""