-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathevergreen.yml
More file actions
95 lines (78 loc) · 2.05 KB
/
evergreen.yml
File metadata and controls
95 lines (78 loc) · 2.05 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
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
buildvariants:
- name: ubuntu2404
tasks:
- name: build
- name: unit_tests
- name: lint
- name: format
- name: check_version
display_name: Ubuntu 24.04
run_on:
- ubuntu2404-small
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
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}
pre:
- command: git.get_project
params:
directory: src
- func: cargo_install rust
vars:
rust_version: 1.81.0
- func: cargo_enable nextest
post:
- command: attach.xunit_results
params:
file: src/target/nextest/ci/*_junit.xml