-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yml
51 lines (42 loc) · 1.85 KB
/
config.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
version: 2.1
# Define the jobs we want to run for this project
jobs:
build:
docker:
- image: cimg/rust:1.63.0
steps:
- run:
name: configure traceparent
command: curl "${HOOK_URL}/traceparent/${CIRCLE_WORKFLOW_ID}/${CIRCLE_WORKFLOW_JOB_ID}" >> "$BASH_ENV"
- run:
name: install otel-cli
command: |
curl -L https://github.com/equinix-labs/otel-cli/releases/download/v0.0.20/otel-cli-0.0.20-Linux-x86_64.tar.gz | sudo tar xvzf - -C /usr/local/bin
- run:
name: install protoc
command: |
sudo apt update
sudo apt install -y protobuf-compiler
- checkout
- restore_cache:
key: cargo-{{ checksum "Cargo.lock" }}
- run: otel-cli exec --service cargo --name "cargo check" -- cargo check --workspace
- run:
name: install cargo-nextest
command: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- run:
name: install circleci-junit-fix
command: curl -sSL https://github.com/conradludgate/circleci-junit-fix/releases/download/v0.2.0/circleci-junit-fix-v0.2.0-x86_64-unknown-linux-gnu.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- run: otel-cli exec --service cargo --name "cargo nextest" -- cargo nextest run --workspace --profile ci
- run: otel-cli exec --service cargo --name "cargo test" -- cargo test --workspace --doc
- run: otel-cli exec --service cargo --name "cargo build" -- cargo build --workspace
- run:
name: fix junit XML
command: cat target/nextest/ci/junit.xml | circleci-junit-fix > fixed-report.xml
- store_test_results:
path: fixed-report.xml
- save_cache:
key: cargo-{{ checksum "Cargo.lock" }}
paths:
- ~/.cargo
- target