forked from kardianos/service
-
Notifications
You must be signed in to change notification settings - Fork 3
/
evergreen.yaml
101 lines (93 loc) · 2.34 KB
/
evergreen.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
command_type: test
stepback: false
ignore:
- "*.md"
- "*.rst"
- ".github/*"
#######################################
# YAML Templates #
#######################################
variables:
- &run-build
# runs a build operation. The task name in evergreen should
# correspond to a make target for the build operation.
name: test
must_have_test_results: true
commands:
- func: get-project-and-modules
- func: run-make
vars: { target: "${task_name}" }
#######################################
# Functions #
#######################################
functions:
get-project-and-modules:
- command: git.get_project
type: system
params:
directory: ${workdir}/baobab
- command: subprocess.exec
type: setup
params:
working_dir: ${workdir}/baobab
binary: make
args: ["mod-tidy"]
include_expansions_in_env: ["GOROOT"]
run-make:
command: subprocess.exec
type: test
params:
working_dir: ${workdir}/baobab
binary: make
args: ["${target}"]
include_expansions_in_env: ["GOROOT", "RACE_DETECTOR"]
parse-results:
command: gotest.parse_files
type: setup
params:
files:
- "baobab/build/output.*"
#######################################
# Post #
#######################################
post:
- func: parse-results
#######################################
# Tasks #
#######################################
tasks:
- <<: *run-build
tags: ["test"]
name: test-baobab
- <<: *run-build
tags: ["report"]
name: lint-baobab
- name: verify-mod-tidy
tags: ["report"]
commands:
- command: git.get_project
type: system
params:
directory: baobab
- func: run-make
vars: { target: "${task_name}" }
#######################################
# Buildvariants #
#######################################
buildvariants:
- name: lint
display_name: Lint
expansions:
GOROOT: /opt/golang/go1.16
run_on:
- ubuntu2204-small
tasks:
- name: ".report"
- name: ubuntu
display_name: Ubuntu 22.04
expansions:
GOROOT: /opt/golang/go1.16
run_on:
- ubuntu2204-small
tasks:
- name: ".test"