From b52bdc193651cf35be1024acbab958164842ca24 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 9 Jan 2024 21:51:56 +0200 Subject: ambient.yaml: add obnam Signed-off-by: Lars Wirzenius Sponsored-by: author --- ambient.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/ambient.yaml b/ambient.yaml index 50b4a1d..621109f 100644 --- a/ambient.yaml +++ b/ambient.yaml @@ -58,6 +58,66 @@ projects: dch -r '' - action: deb + obnam: + image: ~/tmp/ambient/ambient-boot.qcow2 + source: ~/pers/obnam/git + publish_artifacts: true + pre_plan: + - action: cargo_fetch + plan: + - action: rustup_setup + - action: cargo_clippy + - action: cargo_build + - action: cargo_test + # - action: shell + # shell: | + # require_cmd() { + # if ! command -v "$1" >/dev/null; then + # echo "Need to have $1 installed, but can't find it" 1>&2 + # return 1 + # fi + # } + + # got_cargo_cmd() { + # cargo "$1" --help >/dev/null + # } + + # require_cmd rustc + # require_cmd cc + # require_cmd cargo + # require_cmd python3 + # require_cmd subplot + # require_cmd summain + # require_cmd pkg-config + + # # daemonize installation location changed from Debian 10 to 11. + # require_cmd daemonize || require_cmd /usr/sbin/daemonize + + # got_cargo_cmd fmt && cargo fmt --check + + # subplot docgen obnam.subplot -o /workspace/artifacts/obnam.html + # subplot codegen obnam.subplot -o /workspace/test.py + + # target="$(cargo metadata --format-version=1 | python3 -c 'import sys, json; o = json.load(sys.stdin); print(o["target_directory"])')" + # rm -f test.log + # if [ "$(id -un)" = root ]; then + # echo Not running tests as root. + # else + # python3 /workspace/test.py --log /workspace/artifacts/test.log --env "CARGO_TARGET_DIR=$target" "$@" + # fi + + # echo "Everything seems to be in order." + - action: shell + shell: | + export PATH="/root/.cargo/bin:$PATH" + + V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')" + T="$(date -u "+%Y%m%dT%H%M%S")" + version="$V.ci$T-1" + dch -v "$version" "CI build under Ambient." + dch -r '' + - action: deb + summain: image: ~/tmp/ambient/ambient-boot.qcow2 source: ~/pers/obnam/summain -- cgit v1.2.1