summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-16 20:28:36 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-16 20:28:36 -0800
commit6d0db4ef0d3c1cde9cc98606cbbb32977ece4218 (patch)
treef0a96ec200f2326d2cebb81e735b1f11ab1035d2
parent5116ac035a5ea5994ffadb8a497531fd1f3f4f3b (diff)
downloadnitrocli-6d0db4ef0d3c1cde9cc98606cbbb32977ece4218.tar.gz
nitrocli-6d0db4ef0d3c1cde9cc98606cbbb32977ece4218.tar.bz2
Add gitlab-ci.yml configuration file
This change adds a configuration file for the Gitlab CI/CD pipeline to the repository. This file (directly or indirectly) controls the environment in which to build, what exactly to build, and ultimately would also be used to define what tests to run. With the pipeline in place the change also adds a badge indicating the status of the build on the project's front page. The following other CI services have been evaluated or tested and found to be insufficient for the needs at hand: - Travis CI: Does not support configuration in a directory other than the repository root - Cirrus CI: Has the same problem - Semaphore: Does not support Rust - Circle CI: Does not support Rust - Google Cloud Build: Pretty much strictly a paid service
-rw-r--r--nitrocli/Cargo.toml3
-rw-r--r--nitrocli/README.md2
-rw-r--r--nitrocli/ci/gitlab-ci.yml15
3 files changed, 20 insertions, 0 deletions
diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml
index 895043b..0c9f0f4 100644
--- a/nitrocli/Cargo.toml
+++ b/nitrocli/Cargo.toml
@@ -32,6 +32,9 @@ description = """
A command line tool for interacting with the Nitrokey Storage device.
"""
+[badges]
+gitlab = { repository = "d-e-s-o/nitrocli", branch = "devel" }
+
[dependencies.nitrokey]
version = "0.2.1"
path = "../nitrokey"
diff --git a/nitrocli/README.md b/nitrocli/README.md
index 69c3073..694d016 100644
--- a/nitrocli/README.md
+++ b/nitrocli/README.md
@@ -1,3 +1,5 @@
+[![pipeline](https://gitlab.com/d-e-s-o/nitrocli/badges/devel/pipeline.svg)](https://gitlab.com/d-e-s-o/nitrocli/commits/devel)
+
nitrocli
========
diff --git a/nitrocli/ci/gitlab-ci.yml b/nitrocli/ci/gitlab-ci.yml
new file mode 100644
index 0000000..2da774c
--- /dev/null
+++ b/nitrocli/ci/gitlab-ci.yml
@@ -0,0 +1,15 @@
+# The documentation for the contents of this file can be found at:
+# https://docs.gitlab.com/ce/ci/yaml/README.html
+
+# Official language image. Look for the different tagged releases at:
+# https://hub.docker.com/r/library/rust/tags/
+# The recipe for this docker image can be found at:
+# https://github.com/rust-lang/docker-rust/blob/e7703b2cf525f2525bdf8d131cd66b5b38b1513c/1.31.0/stretch/Dockerfile
+image: "rust:1.31.0"
+
+build:cargo:
+ script:
+ - apt-get update
+ - apt-get install --assume-yes libudev-dev libhidapi-dev
+ - rustc --version && cargo --version
+ - cd nitrocli && cargo build --all --verbose