summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-02-07 21:15:07 +0200
committerLars Wirzenius <liw@liw.fi>2024-02-07 21:15:07 +0200
commit75101465c4f349d26b046b6ce93ac431f6a071ac (patch)
tree02cec21e8409584659618051f489cdf79baaa240
parent78103f725e032c2d54610935a804440cc2af901e (diff)
downloadliw-dot-files-75101465c4f349d26b046b6ce93ac431f6a071ac.tar.gz
ambient.yaml: enable obnam
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ambient.yaml96
1 files changed, 58 insertions, 38 deletions
diff --git a/ambient.yaml b/ambient.yaml
index 320aa47..d5f7e07 100644
--- a/ambient.yaml
+++ b/ambient.yaml
@@ -32,6 +32,8 @@ projects:
plan:
# Note: no auto-incrementing version number for this package
- action: deb
+ post_plan:
+ - action: dput
cachedir:
image: ~/tmp/ambient/ambient-boot.qcow2
@@ -303,44 +305,42 @@ projects:
- 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: |
+ 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 test.py
+
+ rm -f test.log
+ export CARGO_TARGET_DIR=/workspace/cache
+ ls -l "$CARGO_TARGET_DIR/debug"
+ python3 test.py --log test.log --env "CARGO_TARGET_DIR=$CARGO_TARGET_DIR"
+
+ rm -f test.py test.log
+ echo "Everything seems to be in order."
- action: shell
shell: |
export PATH="/root/.cargo/bin:$PATH"
@@ -499,6 +499,26 @@ projects:
post_plan:
- action: rsync
+ # starship:
+ # image: ~/tmp/ambient/ambient-boot.qcow2
+ # source: ~/pers/starship
+ # pre_plan:
+ # - action: cargo_fetch
+ # plan:
+ # - action: rustup_setup
+ # - 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
+ # # post_plan:
+ # # - action: dput
+
subplot:
image: ~/tmp/ambient/ambient-boot.qcow2
source: ~/pers/subplot/git