forked from mongodb/mongo-task-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
evergreen.yml
115 lines (95 loc) · 2.68 KB
/
evergreen.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
buildvariants:
- name: ubuntu1804
tasks:
- name: build
- name: unit_tests
- name: lint
- name: format
- name: check_version
display_name: Ubuntu 18.04
run_on:
- ubuntu1804-test
tasks:
- name: unit_tests
commands:
- func: cargo_run
vars:
target_dir: src
cargo_command: nextest run --profile ci
- name: format
commands:
- func: cargo_run
vars:
cargo_command: fmt --check
target_dir: src
- name: lint
commands:
- func: cargo_run
vars:
cargo_command: clippy -- -D warnings
target_dir: src
- name: build
commands:
- func: cargo_run
vars:
target_dir: src
cargo_command: build
- name: check_version
commands:
- func: version-check_run
vars:
package_type: rust
publish_type: github-release
target_dir: src
functions:
cargo_enable nextest:
- command: shell.exec
params:
script: |
set -o errexit
export RUSTUP_HOME="$PWD/bonsai/rustup"
export CARGO_HOME="$PWD/bonsai/cargo"
export PATH="$PATH:$CARGO_HOME/bin"
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "$CARGO_HOME/bin"
cargo_run:
- command: shell.exec
params:
script: |
set -o errexit
export RUSTUP_HOME="$PWD/bonsai/rustup"
export CARGO_HOME="$PWD/bonsai/cargo"
export PATH="$PATH:$CARGO_HOME/bin:$HOME:/"
cd ${target_dir}
cargo ${cargo_command}
cargo_install rust:
- command: shell.exec
params:
script: |
set -o errexit
export RUSTUP_HOME="$PWD/bonsai/rustup"
export CARGO_HOME="$PWD/bonsai/cargo"
export PATH="$PATH:$CARGO_HOME/bin"
curl https://sh.rustup.rs -sSf | sh -s -- -y
rustup default ${rust_version}
version-check_run:
- command: shell.exec
params:
script: |
set -o errexit
if [ "${is_patch}" = "true" ]; then
wget -q https://github.com/dbradf/pypi-version-check/releases/download/v0.3.0/pypi-version-check
chmod +x pypi-version-check
./pypi-version-check --package-type ${package_type} --publish-type ${publish_type} --project-path ${target_dir} --check-changelog
fi
pre:
- command: git.get_project
params:
directory: src
- func: cargo_install rust
vars:
rust_version: 1.66.1
- func: cargo_enable nextest
post:
- command: attach.xunit_results
params:
file: src/target/nextest/ci/*_junit.xml