summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-02-24 13:15:06 +0200
committerLars Wirzenius <liw@liw.fi>2024-02-24 13:15:06 +0200
commitb9975c0775c9c7bcebc598545edf26794cd61967 (patch)
tree660e9893a2efae9f177755e6e4754491c11a1242
parent106cd022ea43638132a354c8916c3c116a6cf780 (diff)
downloadliw-dot-files-b9975c0775c9c7bcebc598545edf26794cd61967.tar.gz
ambient.yaml: new deb actions
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--ambient.yaml277
1 files changed, 80 insertions, 197 deletions
diff --git a/ambient.yaml b/ambient.yaml
index cc1246d..89da6d3 100644
--- a/ambient.yaml
+++ b/ambient.yaml
@@ -19,31 +19,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
-# - action: rustup_setup
-# - action: cargo_fmt
-# - action: cargo_clippy
-# - action: cargo_build
-# - action: cargo_test
+ - 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
@@ -54,37 +37,8 @@ projects:
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
+ head debian/changelog
+ - action: deb
post_plan:
- action: dput
@@ -116,20 +70,22 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
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 ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput
@@ -150,15 +106,16 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
export CARGO_TARGET_DIR=/workspace/cache
+
subplot codegen clab.subplot -o test.py
rm -f test.log
if ! python3 test.py --log test.log; then
@@ -174,6 +131,8 @@ projects:
version="$V.ci$T-1"
dch -v "$version" "CI build under Ambient."
dch -r ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput
@@ -194,7 +153,6 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_build
- action: shell
shell: |
@@ -249,14 +207,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
@@ -264,6 +222,8 @@ projects:
dch -v "$version" "CI build under Ambient."
dch -r ''
+ head debian/changelog
+
git status --ignored
git clean -fdx
- action: deb
@@ -299,13 +259,16 @@ projects:
plan:
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
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 ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput
@@ -327,7 +290,6 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
@@ -339,14 +301,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
@@ -354,6 +316,8 @@ projects:
dch -v "$version" "CI build under Ambient."
dch -r ''
+ head debian/changelog
+
git status --ignored
git clean -fdx
- action: deb
@@ -415,13 +379,16 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
+ export CARGO_TARGET_DIR=/workspace/cache
+
require_cmd() {
if ! command -v "$1" >/dev/null; then
echo "Need to have $1 installed, but can't find it" 1>&2
@@ -450,7 +417,6 @@ projects:
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"
@@ -458,13 +424,16 @@ projects:
echo "Everything seems to be in order."
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
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 ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput
@@ -517,13 +486,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
export PATH="/root/.cargo/bin:$PATH"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
@@ -531,6 +501,8 @@ projects:
version="$V.ci$T-1"
dch -v "$version" "CI build under Ambient."
dch -r ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput
@@ -572,13 +544,17 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- # - action: cargo_fmt
- # - action: cargo_clippy
- # - action: cargo_build
-# - action: cargo_test
+ - action: cargo_fmt
+ - action: cargo_clippy
+ - action: cargo_build
+ # disable tests while they're flaky
+ # - action: cargo_test
- action: shell
shell: |
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
+ export CARGO_TARGET_DIR=/workspace/cache
+
export HOME=/root
git config --global user.email "liw@liw.fi"
git config --global user.name "Lars Wirzenius"
@@ -608,31 +584,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
-# - action: rustup_setup
-# - action: cargo_fmt
-# - action: cargo_clippy
-# - action: cargo_build
-# - action: cargo_test
+ - 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
@@ -642,38 +601,7 @@ projects:
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
+ - action: deb
post_plan:
- action: dput
@@ -683,31 +611,15 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
-# - action: rustup_setup
-# - action: cargo_fmt
-# - action: cargo_clippy
-# - action: cargo_build
-# - action: cargo_test
+ - 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
+ export CARGO_TARGET_DIR=/workspace/cache
git status --ignored
git clean -fdx
@@ -717,38 +629,7 @@ projects:
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
+ - action: deb
post_plan:
- action: dput
@@ -771,7 +652,6 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
@@ -783,24 +663,20 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
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 ''
-
- ls -l /usr/bin/cargo
- ls -l /usr/bin/rustc
- ls -l /root/.cargo/bin
- action: deb
post_plan:
- action: dput
@@ -854,15 +730,19 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- - action: cargo_fmt
- - action: cargo_clippy
- - action: cargo_build
+ # - action: cargo_fmt
+ # - action: cargo_clippy
+ # - action: cargo_build
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
- ./check --offline -v
- rm -rf test-outputs
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
+ #export PATH="/root/.cargo/bin:$PATH"
+ #export CARGO_TARGET_DIR=/workspace/cache
+ #export CARGO_HOME=/workspace/deps
+
+ #./check --offline -v
+ #rm -rf test-outputs
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
@@ -895,14 +775,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
@@ -970,14 +850,14 @@ projects:
pre_plan:
- action: cargo_fetch
plan:
- - action: rustup_setup
- action: cargo_fmt
- action: cargo_clippy
- action: cargo_build
- action: cargo_test
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
@@ -1017,7 +897,8 @@ projects:
plan:
- action: shell
shell: |
- export PATH="/root/.cargo/bin:$PATH"
+ export DEBEMAIL=liw@liw.fi
+ export DEBFULLNAME="Lars Wirzenius"
mkdir debian
git archive debian/unstable | tar -C debian -xf -
@@ -1027,6 +908,8 @@ projects:
version="$V.ci$T-1"
dch -v "$version" "CI build under Ambient."
dch -r ''
+
+ head debian/changelog
- action: deb
post_plan:
- action: dput