summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-02-14 13:41:57 +0200
committerLars Wirzenius <liw@liw.fi>2024-02-14 13:41:57 +0200
commitc4b79d03852dc4668473a078057bf2f63feae7b6 (patch)
treeb8694d1eb9c08b3ca9db4aa3d99827b181d5c2c8
parentc643e2cc902dc186178010878fa5fad7eb68ccd5 (diff)
downloadliw-dot-files-c4b79d03852dc4668473a078057bf2f63feae7b6.tar.gz
ambient.yaml: add ambient-driver project
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ambient.yaml75
1 files changed, 75 insertions, 0 deletions
diff --git a/ambient.yaml b/ambient.yaml
index 74fa04a..42655f7 100644
--- a/ambient.yaml
+++ b/ambient.yaml
@@ -13,6 +13,81 @@ projects:
post_plan:
- action: rsync
+ ambient-driver:
+ image: ~/tmp/ambient/ambient-boot.qcow2
+ source: ~/pers/ambient-ci/ambient-driver
+ pre_plan:
+ - action: cargo_fetch
+ plan:
+# - action: rustup_setup
+# - action: cargo_fmt
+# - action: cargo_clippy
+# - action: cargo_build
+# - action: cargo_test
+ - action: shell
+ shell: |
+
+ # FIXME: Put this in the Ambient `deb` action.
+
+ export PATH="/root/.cargo/bin:$PATH"
+ export CARGO_HOME=/workspace/deps
+ mkdir /workspace/cargo
+ export CARGO_TARGET_DIR=/workspace/cargo
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
+ env
+
+ command -v cargo
+ command -v rustc
+
+ cargo --version
+ rustc --version
+
+ cargo check --offline
+
+ git status --ignored
+ git clean -fdx
+
+ 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 ''
+
+ # Get name and version of source package.
+ name="$(dpkg-parsechangelog -SSource)"
+ version="$(dpkg-parsechangelog -SVersion)"
+
+ # Get upstream version: everything before the last dash.
+ uv="$(echo "$version" | sed 's/-[^-]*$//')"
+ orig="${name}_${uv}.orig.tar.xz"
+
+ # Create a tar ball without the Debian packaging.
+ tmp="$(mktemp -d)"
+ trap 'rm -rf "$tmp"' EXIT
+ git archive HEAD | tar -C "$tmp" -xf -
+ rm -rf "$tmp/debian"
+ tar -C "$tmp" -cf - . | xz >"../$orig"
+
+ # Actually build the package, without signing the .changes file.
+ dpkg-buildpackage -us -uc
+
+ # Dump some information to make it easier to visually verify
+ # everything looks OK. Also, test the package with the lintian tool.
+ arch="$(dpkg --print-architecture)"
+ deb="../${name}_${version}_${arch}.deb"
+ changes="../${name}_${version}_${arch}.changes"
+
+ ls -l "$deb"
+ dpkg -c "$deb"
+ lintian -i "$changes"
+
+ mv ../*_* /workspace/artifacts
+
+# - action: deb
+ post_plan:
+ - action: dput
+
ambient-web:
image: ~/tmp/ambient/ambient-boot.qcow2
source: ~/pers/ambient-ci/ambient-web/src/