aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-08-14 13:13:36 -0700
committerMicah Elizabeth Scott <beth@torproject.org>2023-08-15 09:52:30 -0700
commit41dac5e2d1434cd1be431468ff1192bb88130ef4 (patch)
tree94d0d841d7b7853950b82a350be9f7df52865e22 /.gitlab-ci.yml
parent824e9c6e164fc44ae5f1469cb3664f34e609c9cc (diff)
downloadtor-41dac5e2d1434cd1be431468ff1192bb88130ef4.tar.gz
tor-41dac5e2d1434cd1be431468ff1192bb88130ef4.zip
CI: Add Rust tests and clippy
This adds a new "rust-latest" CI target that runs tests and clippy for everything in the workspace. It's a subset of the equivalent on Arti.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 789f6c4840..45142671aa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -253,3 +253,19 @@ debian-packaging-0.4.6:
rules:
- if: $CI_PROJECT_NAMESPACE == "tpo/core" &&
$CI_COMMIT_BRANCH == "maint-0.4.6"
+
+#####
+# Run tests written in Rust, and run clippy on all Rust code here.
+rust-latest:
+ image: rust:latest
+ <<: *debian-template
+ script:
+ - apt-get install llvm-dev libclang-dev clang
+ - rustup show
+ - cargo build --locked --verbose
+ - cargo test --verbose
+ - rustup component add clippy
+ - rustup show
+ - cargo clippy --all-features --all-targets -- -D warnings
+ after_script:
+ - cargo clean \ No newline at end of file