-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
81 lines (76 loc) · 2.04 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright (C) 2022 Nitrokey GmbH
# SPDX-License-Identifier: CC0-1.0
include:
- project: 'nitrokey/gitlab-ci'
file:
- 'common-jobs/common_jobs.yml'
stages:
- pull-github
- build
- fuzz
- deploy
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
GIT_SUBMODULE_STRATEGY: recursive
REPO_NAME: opcard-rs
MAIN_BRANCH: main
COMMON_PULL: "true"
COMMON_UPLOAD_NIGHTLY: "false"
COMMON_GITHUB_RELEASE: "false"
COMMON_UPLOAD_FILES: "false"
build:
image: registry.git.nitrokey.com/nitrokey/opcard-rs/opcard-rs-build:latest
rules:
- if: '$CI_PIPELINE_SHOULD_NOT_BUILD == "true"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
tags:
- docker
stage: build
before_script:
- !reference [notify_github, script]
- cargo --version
script:
- make ci
after_script:
- cp /app/.cache/scdaemon.log scdaemon.log
- !reference [notify_github, script]
coverage: '/^\d+.\d+% coverage/'
artifacts:
when: always
paths:
- "scdaemon.log"
- "cobertura.xml"
- "tarpaulin-report.html"
reports:
coverage_report:
coverage_format: cobertura
path: cobertura.xml
fuzz:
variables:
FUZZ_JOBS: "1"
FUZZ_DURATION: "3600"
image: registry.git.nitrokey.com/nitrokey/opcard-rs/opcard-rs-build:latest
timeout: 5 hours 30 minutes
rules:
- if: '$CI_PIPELINE_SHOULD_FUZZ == "true"'
tags:
- docker
stage: fuzz
before_script:
- !reference [notify_github, script]
- cargo --version
script:
- make fuzz FUZZ_JOBS="$FUZZ_JOBS" FUZZ_DURATION="$FUZZ_DURATION"
artifacts:
when: always
paths:
- "fuzz/artifacts"
- "fuzz/corpus"
cache:
key: fuzz-corpus
paths:
- "fuzz/corpus"