mirror of
https://seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE.git
synced 2026-11-02 01:40:34 +08:00
ci: use custom dch action for Ambient
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export DEBEMAIL="$AMBIENT_CI_debemail"
|
||||
export DEBFULLNAME="$AMBIENT_CI_debfullname"
|
||||
export CARGO_TARGET_DIR=/workspace/cache
|
||||
export CARGO_HOME=/workspace/deps
|
||||
export HOME=/root
|
||||
export PATH="/root/.cargo/bin:$PATH"
|
||||
|
||||
git reset --hard
|
||||
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 ''
|
||||
+7
-39
@@ -3,45 +3,13 @@ pre_plan:
|
||||
plan:
|
||||
- action: cargo_fmt
|
||||
- action: cargo_clippy
|
||||
|
||||
# Not using the built-on `cargo_test` action, as the test suite
|
||||
# requires HOME to be set and Ambient doesn't yet have a way to do
|
||||
# that. So we use the `shell` action instead, even if that is more
|
||||
# tedious and requires setting up the relevant environment variables
|
||||
# manually.
|
||||
- action: shell
|
||||
shell: |
|
||||
export CARGO_TARGET_DIR=/workspace/cache
|
||||
export CARGO_HOME=/workspace/deps
|
||||
export HOME=/root
|
||||
export PATH="/root/.cargo/bin:/root/.radicle/bin:$PATH"
|
||||
|
||||
rad --version # make sure rad can be executed
|
||||
|
||||
# Configure Git so that it can be used in the tests for this
|
||||
# project.
|
||||
git config --global user.email "test@example.com"
|
||||
git config --global user.name "Testy McTestface"
|
||||
|
||||
cargo test
|
||||
|
||||
- action: shell
|
||||
shell: |
|
||||
export DEBEMAIL=liw@liw.fi
|
||||
export DEBFULLNAME="Lars Wirzenius"
|
||||
export CARGO_TARGET_DIR=/workspace/cache
|
||||
|
||||
# git reset --hard
|
||||
# git clean -fdx
|
||||
# git switch main
|
||||
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 ''
|
||||
- action: cargo_test
|
||||
- action: cargo_doc
|
||||
- action: custom
|
||||
name: dch
|
||||
args:
|
||||
debemail: liw@liw.fi
|
||||
debfullname: "Lars Wirzenius"
|
||||
- action: deb
|
||||
post_plan:
|
||||
- action: dput
|
||||
|
||||
Reference in New Issue
Block a user