diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-06-01 16:22:10 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-06-01 19:03:25 -0500 |
commit | 7201e443e19b45a2feb24ef470c6380b0859e52f (patch) | |
tree | 6c5fc66926db06faa29101cb8f57793ed9e9ba2c /.builds | |
parent | eaf5c71873705b9593ec0e6b34d7e529d74a9269 (diff) |
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.
Diffstat (limited to '.builds')
-rw-r--r-- | .builds/ci.yml | 24 |
1 files changed, 18 insertions, 6 deletions
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=$(<pkgver) > pkgdist + - publish: | cd projectr - cargo fmt --all -- --check + hut git artifact upload $(<pkgdist) --rev=$(<pkgver) |