summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-09 21:51:56 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-09 21:51:56 +0200
commitb52bdc193651cf35be1024acbab958164842ca24 (patch)
tree688ee9135fa288ce1e3b980ed1e130ee31aee43b
parentd2ca6e9d43349395446f56250d1c392062703bb3 (diff)
downloadliw-dot-files-b52bdc193651cf35be1024acbab958164842ca24.tar.gz
ambient.yaml: add obnam
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ambient.yaml60
1 files changed, 60 insertions, 0 deletions
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