aboutsummaryrefslogtreecommitdiff
path: root/ci/gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ci/gitlab-ci.yml')
-rw-r--r--ci/gitlab-ci.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/gitlab-ci.yml b/ci/gitlab-ci.yml
new file mode 100644
index 0000000..55f0ff6
--- /dev/null
+++ b/ci/gitlab-ci.yml
@@ -0,0 +1,26 @@
+# 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/3898d19194231639f1afc3096bd04702eaf555e7/1.40.0/buster/Dockerfile
+image: "rust:1.40.0"
+
+build-test:cargo:
+ script:
+ - apt-get update
+ - apt-get install --assume-yes libudev-dev libhidapi-dev
+ - rustc --version && cargo --version
+ - cargo build --all --verbose
+ - cargo test --all --verbose
+
+lint:clippy:
+ script:
+ - rustup component add clippy
+ - cargo clippy --all-targets --all-features -- -D warnings
+
+format:rustfmt:
+ script:
+ - rustup component add rustfmt
+ - cargo fmt --all -- --check