summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-02-12 19:39:58 +0200
committerLars Wirzenius <liw@liw.fi>2024-02-12 19:39:58 +0200
commit1be501e9c9a776fdf05928fd0073cc74bca877a0 (patch)
tree177ab30d0be2c25864fc7f7e24ebda6e12a26d36
parent54a970925bdd6c23e489345aab269879f83271c6 (diff)
downloadliw-dot-files-1be501e9c9a776fdf05928fd0073cc74bca877a0.tar.gz
ambient.yaml: fix/add radicle, radicle-ci-broker, radicle-native-ci
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ambient.yaml79
1 files changed, 79 insertions, 0 deletions
diff --git a/ambient.yaml b/ambient.yaml
index 26d427f..74fa04a 100644
--- a/ambient.yaml
+++ b/ambient.yaml
@@ -446,6 +446,10 @@ projects:
# - action: cargo_test
- action: shell
shell: |
+ export HOME=/root
+ git config --global user.email "liw@liw.fi"
+ git config --global user.name "Lars Wirzenius"
+
git reset --hard
git checkout debian
git rebase master
@@ -465,6 +469,81 @@ projects:
post_plan:
- action: dput
+ radicle-ci-broker:
+ image: ~/tmp/ambient/ambient-boot.qcow2
+ source: ~/radicle/radicle-ci-broker
+ 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
+
radicle-native-ci:
image: ~/tmp/ambient/ambient-boot.qcow2
source: ~/radicle/radicle-native-ci