forked from jerry73204/realsense-rust
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
45 lines (40 loc) · 1.25 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# CONFIGURATION
default:
image: "registry.gitlab.com/tangram-vision/oss/ci-oss/public-ci:latest"
before_script:
# Update rust in case the latest version isn't built into our docker image.
- rustup update stable
# Run pipeline for MRs and main branch
# https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
stages:
- test
- doc
- build_artifacts
##### ########## ########## ########## ########## #####
# TEST STAGE
# - [PASS REQ] runs all unit tests in the build
# - [PASS REQ] runs a lint checker over every piece of code
test-and-lint:
stage: test
script:
- rustc --version
- cargo --version
- cargo test --features buildtime-bindgen --verbose
- cargo clippy --all-targets --features=buildtime-bindgen,test-single-device
build_badges:
stage: build_artifacts
script:
- rustc --version
- cargo --version
- tangram-badge-generator -d $CI_PROJECT_DIR
artifacts:
paths:
- ./ci/*.svg
when: always
expire_in: 4 weeks
only:
- main