From 7201e443e19b45a2feb24ef470c6380b0859e52f Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Thu, 1 Jun 2023 16:22:10 -0500 Subject: build: improve build tooling and add CD Implement a xtask pattern tool for packaging into distributable. Add build script to generate completion scripts and man page. Improve PKGBUILDs and CI to use new tooling and upload artifact to tag after successful CI build. Make minor changes in cli config to facilitate the new build.rs script. --- .builds/ci.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to '.builds') diff --git a/.builds/ci.yml b/.builds/ci.yml index a085bcd..9f6e9e5 100644 --- a/.builds/ci.yml +++ b/.builds/ci.yml @@ -1,18 +1,30 @@ image: archlinux +oauth: git.sr.ht/OBJECTS:RW packages: - rust + - hut sources: - https://git.sr.ht/~tobyvin/projectr +environment: + CARCH: x86_64 tasks: + - fmt: | + cd projectr + cargo fmt --frozen --all --check + - prepare: | + cd projectr + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" - build: | cd projectr - cargo build --workspace --all-features + cargo build --frozen --release --all-features - test: | cd projectr - cargo test --workspace --all-features - - clippy: | + cargo check --frozen --all-targets --all-features + cargo test --frozen --all-targets --all-features + git describe --exact-match HEAD > pkgver || complete-build + - package: | cd projectr - cargo clippy --workspace --all-features --no-deps -- -D warnings - - fmt: | + cargo xtask dist --tag=$( pkgdist + - publish: | cd projectr - cargo fmt --all -- --check + hut git artifact upload $(