From 3b76a0a46ce38eef7fe3e5a969cec6ffee47f227 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 27 Oct 2019 11:01:08 +0000 Subject: Add CI scripts for builds.sr.ht This patch adds three CI scripts: - archlinux builds dialog-rs on Arch with the latest rustc version. - debian builds dialog-rs on Debian Stable with an older rustc version. - lint checks the formatting, REUSE compliance and clippy warnings. These scripts are executed on each push. If a script fails, the committer will receive a mail. If a script fails on the master branch, a mail is sent to the mailing list instead. The builds are also listed in the web interface at: https://builds.sr.ht/~ireas/dialog-rs --- .builds/archlinux.yml | 14 ++++++++++++++ .builds/debian.yml | 14 ++++++++++++++ .builds/lint.yml | 27 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .builds/archlinux.yml create mode 100644 .builds/debian.yml create mode 100644 .builds/lint.yml diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml new file mode 100644 index 0000000..52e8156 --- /dev/null +++ b/.builds/archlinux.yml @@ -0,0 +1,14 @@ +# Copyright (C) 2019 Robin Krahl +# SPDX-License-Identifier: MIT +image: archlinux +packages: + - rust +sources: + - https://git.ireas.org/dialog-rs +tasks: + - build: | + cd dialog-rs + cargo build --release + - test: | + cd dialog-rs + cargo test diff --git a/.builds/debian.yml b/.builds/debian.yml new file mode 100644 index 0000000..9140c92 --- /dev/null +++ b/.builds/debian.yml @@ -0,0 +1,14 @@ +# Copyright (C) 2019 Robin Krahl +# SPDX-License-Identifier: MIT +image: debian/stable +packages: + - cargo +sources: + - https://git.ireas.org/dialog-rs +tasks: + - build: | + cd dialog-rs + cargo build --release + - test: | + cd dialog-rs + cargo test diff --git a/.builds/lint.yml b/.builds/lint.yml new file mode 100644 index 0000000..6b06f91 --- /dev/null +++ b/.builds/lint.yml @@ -0,0 +1,27 @@ +# Copyright (C) 2019 Robin Krahl +# SPDX-License-Identifier: MIT +image: archlinux +packages: + - rustup + - python + - python-pip + - python-pygit2 +sources: + - https://git.ireas.org/dialog-rs +tasks: + - setup: | + pip install --user fsfe-reuse + rustup update stable + rustup self upgrade-data + rustup default stable + rustup component add rustfmt + rustup component add clippy + - format: | + cd dialog-rs + cargo fmt -- --check + - reuse: | + cd dialog-rs + ~/.local/bin/reuse lint + - clippy: | + cd dialog-rs + cargo clippy -- -D warnings -- cgit v1.2.3