From a290dcccc5e52bb853d6bb475bca9376c22f98f3 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 23 Jan 2019 16:39:24 +0100 Subject: Move format checks into lint build While we want to test the code on multiple platforms and with different configurations, it is sufficient to execute the linting once. Therefore we move the formatting checks into a new lint build. --- .builds/lint.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .builds/lint.yml (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml new file mode 100644 index 0000000..acada7b --- /dev/null +++ b/.builds/lint.yml @@ -0,0 +1,15 @@ +# Copyright (C) 2019 Robin Krahl +# SPDX-License-Identifier: MIT +image: archlinux +packages: + - rust +sources: + - https://git.sr.ht/~ireas/nitrokey-rs +tasks: + - format: | + cd nitrokey-rs + cargo fmt -- --check +triggers: + - action: email + condition: failure + to: nitrokey-rs-dev -- cgit v1.2.1 From 846c34226572d53bf93bb4191f4742eb6eaa37b1 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 23 Jan 2019 17:02:24 +0100 Subject: Add reuse linter to the lint build The reuse linter verifies that nitrokey-rs complies with the REUSE specification 2.0. --- .builds/lint.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index acada7b..698a529 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -3,12 +3,19 @@ image: archlinux packages: - rust + - python + - python-pip + - python-pygit2 sources: - https://git.sr.ht/~ireas/nitrokey-rs tasks: + - setup: pip install --user fsfe-reuse - format: | cd nitrokey-rs cargo fmt -- --check + - reuse: | + cd nitrokey-rs + ~/.local/bin/reuse lint triggers: - action: email condition: failure -- cgit v1.2.1 From 04220982d4808c402b1a5cdda2b83e81f099a1ad Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 25 Jan 2019 20:25:42 +0100 Subject: Remove triggers from build scripts I changed the build setup so that the trigger is determined by the branch being pushed to. Therefore the triggers in the build scripts are no longer needed and removed in this patch. --- .builds/lint.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index 698a529..a3aa5ed 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -16,7 +16,3 @@ tasks: - reuse: | cd nitrokey-rs ~/.local/bin/reuse lint -triggers: - - action: email - condition: failure - to: nitrokey-rs-dev -- cgit v1.2.1 From 325161da3a3b6e391bdd83233e6705c5d266e65c Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 27 Jan 2019 15:06:37 +0100 Subject: Add clippy to lint build --- .builds/lint.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index a3aa5ed..747db6d 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -2,17 +2,26 @@ # SPDX-License-Identifier: MIT image: archlinux packages: - - rust + - rustup - python - python-pip - python-pygit2 sources: - https://git.sr.ht/~ireas/nitrokey-rs tasks: - - setup: pip install --user fsfe-reuse + - 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 nitrokey-rs cargo fmt -- --check - reuse: | cd nitrokey-rs ~/.local/bin/reuse lint + - clippy: | + cd nitrokey-rs + cargo clippy -- -D warnings -- cgit v1.2.1 From 7402b99010458d7bc5d977e4e62a08132ef4a65e Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 27 Jan 2019 15:21:39 +0100 Subject: Update sources URL in build files --- .builds/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index 747db6d..86a27cd 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -7,7 +7,7 @@ packages: - python-pip - python-pygit2 sources: - - https://git.sr.ht/~ireas/nitrokey-rs + - https://git.ireas.org/nitrokey-rs tasks: - setup: | pip install --user fsfe-reuse -- cgit v1.2.1 From 977151d2e56e63ab15e47155457761d7b76b69fc Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 27 Dec 2019 23:02:54 +0100 Subject: Change license for configuration and documentation to CC0-1.0 --- .builds/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index 86a27cd..1299af4 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -1,5 +1,5 @@ # Copyright (C) 2019 Robin Krahl -# SPDX-License-Identifier: MIT +# SPDX-License-Identifier: CC0-1.0 image: archlinux packages: - rustup -- cgit v1.2.1 From 56cc12c779744fb88bb115b55cd80fd2270589c9 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 27 Dec 2019 23:03:50 +0100 Subject: Move format and clippy checks to archlinux-*.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Rust package for Arch includes rustfmt and clippy, so we don’t have to use rustup for it. To make the builds simpler and faster, we move the format and clippy tasks to the archlinux-*.yml build that already has Rust installed. --- .builds/lint.yml | 12 ------------ 1 file changed, 12 deletions(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index 1299af4..e055071 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: CC0-1.0 image: archlinux packages: - - rustup - python - python-pip - python-pygit2 @@ -11,17 +10,6 @@ sources: 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 nitrokey-rs - cargo fmt -- --check - reuse: | cd nitrokey-rs ~/.local/bin/reuse lint - - clippy: | - cd nitrokey-rs - cargo clippy -- -D warnings -- cgit v1.2.1 From d2cc90d540dee5a35bd70a9d44347e20b121054e Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 27 Dec 2019 23:04:43 +0100 Subject: Use the AUR package for reuse in the lint build Previously, we used pip to manually install the fsfe-reuse package. Now we can use the new AUR package reuse. --- .builds/lint.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index e055071..026f5da 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -2,14 +2,10 @@ # SPDX-License-Identifier: CC0-1.0 image: archlinux packages: - - python - - python-pip - - python-pygit2 + - reuse sources: - https://git.ireas.org/nitrokey-rs tasks: - - setup: | - pip install --user fsfe-reuse - reuse: | cd nitrokey-rs - ~/.local/bin/reuse lint + reuse lint -- cgit v1.2.1 From e82bcb9c8a7ffd0b3387de242c552c84839eaa17 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 27 Dec 2019 23:05:19 +0100 Subject: Add verify task to lint build This patch adds a verify task to the lint build that checks the OpenPGP signature of the last commit. --- .builds/lint.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.builds/lint.yml') diff --git a/.builds/lint.yml b/.builds/lint.yml index 026f5da..678cde8 100644 --- a/.builds/lint.yml +++ b/.builds/lint.yml @@ -2,10 +2,15 @@ # SPDX-License-Identifier: CC0-1.0 image: archlinux packages: + - gnupg - reuse sources: - https://git.ireas.org/nitrokey-rs tasks: + - verify: | + cd nitrokey-rs + curl -s "https://pgp.ireas.org/0x6D533958F070C57C.txt" | gpg --import + git verify-commit HEAD - reuse: | cd nitrokey-rs reuse lint -- cgit v1.2.1