-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
57 lines (48 loc) · 1.16 KB
/
.gitlab-ci.yml
File metadata and controls
57 lines (48 loc) · 1.16 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
workflow:
auto_cancel:
on_new_commit: conservative
on_job_failure: all
default:
tags:
- docker-52-1-21
- rust
#setup:
# stage: .pre
# script:
# - sudo apt-get update -y
# - sudo apt-get install -y unzip
# - curl -OL https://github.com/google/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip
# - unzip protoc-3.20.3-linux-x86_64.zip -d protoc3
# - sudo mv protoc3/bin/* /usr/local/bin/
# - sudo rm -rf /usr/local/include/google
# - sudo mv protoc3/include/* /usr/local/include/
clean-docker:
stage: .pre
script:
- docker system prune -a -f --volumes
- docker compose rm -f -s -v
update-rust:
stage: .pre
script:
- rustup update
fmt:
script:
- cargo fmt --all -- --check
build:
script:
- cargo build --verbose
clippy:
script:
- cargo clippy -- -D warnings
test:
script:
- SSL_CERT_FILE="./tls/ca.pem" cargo test -- --nocapture
timeout: 10 minutes
push-image:
stage: deploy
script:
- echo VERSION_TAG=$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID > .env
- echo >> .env
- echo IP_INFO_API_KEY=$IP_INFO_API_KEY >> .env
- docker compose build
- docker compose push