summaryrefslogtreecommitdiff
path: root/ci-prod-obnam.ick
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-15 11:42:36 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-15 11:42:36 +0200
commitfe176635894875c13f267e2454c6293f84e6640b (patch)
tree7fe2dc0f11f07931f38ab66f7ddde5b57a11fc27 /ci-prod-obnam.ick
parentedccc2eb8d20f018beb6b84c7df3e081fe0a461f (diff)
downloadliw-ci-fe176635894875c13f267e2454c6293f84e6640b.tar.gz
change obnam to use rustup
Diffstat (limited to 'ci-prod-obnam.ick')
-rw-r--r--ci-prod-obnam.ick41
1 files changed, 38 insertions, 3 deletions
diff --git a/ci-prod-obnam.ick b/ci-prod-obnam.ick
index f3982ec..6a2824b 100644
--- a/ci-prod-obnam.ick
+++ b/ci-prod-obnam.ick
@@ -229,7 +229,6 @@ projects:
- rustup
- ick/install_debian_build_dependencies
- build_obnam_deb
-# - ick/build_deb_ci
- ick/upload_debs
- ick/save_workspace
@@ -241,6 +240,24 @@ pipelines:
actions:
- where: container
shell: |
+ export HOME=/workspace
+ export PATH="$HOME/.cargo/bin:$PATH"
+
+ if command -v rustup > /dev/null
+ then
+ touch -d yesterday rustup-timestamp
+ if [ "$HOME/.cargo/bin/rustc" -ot rustup-timestamp ]
+ then
+ rustup update
+ else
+ echo nothing to do to update Rust with rustup
+ fi
+ else
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
+ sh rustup.sh -y
+ fi
+
+ type --all rustc
- pipeline: build_obnam_deb
actions:
@@ -252,10 +269,28 @@ pipelines:
cd /workspace/src
name="$(dpkg-parsechangelog -S Source)"
version="$(dpkg-parsechangelog -S Version)"
- upstream="$(echo "$version" | sed 's/-.*$//')"
+ distribution="$(dpkg-parsechangelog -S Distribution)"
- git clean -fdxq
+ case "$version" in
+ *-*)
+ upstream="$(echo "$version" | sed 's/-[^-]*$//')"
+ debian="$(echo "$version" | sed 's/^.*-//')"
+ ;;
+ *)
+ upstream="$version"
+ debian=0
+ ;;
+ esac
+
+ upstream="${upstream}.ci0.${BUILD_NUMBER}"
+ civersion="${upstream}-${debian}"
+
+ rm -f ../*_*
+ git clean -fdx -e target
git archive HEAD | xz > "../${name}_${upstream}.orig.tar.xz"
+
+ dch --no-conf -v "$civersion" -D "${distribution}-ci" --force-distribution "CI build"
+
dpkg-buildpackage -us -uc -sa || cat /tmp/subplot_*.diff.* 2>&1
apt-get update