Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit c7f1d07

Browse files
committed
Attempt to use standard Circle-CI tooling for Rust versioning
1 parent 2e4de32 commit c7f1d07

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

.circleci/config.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
version: 2
2+
3+
parameters:
4+
toolchain:
5+
description: >-
6+
Rust toolchain to use. Overrides the default toolchain (stable) or any
7+
toolchain specified in the project via `rust-toolchain`.
8+
type: string
9+
default: '1.47'
10+
11+
executor: default
12+
213
jobs:
314
build:
415
branches:
@@ -9,28 +20,28 @@ jobs:
920
- image: rust:1.47
1021
steps:
1122
- checkout
12-
- run:
13-
name: Install tooling
14-
command: |
15-
rustup component add clippy
23+
- update_toolchain:
24+
toolchain: <<parameters.toolchain>>
1625

1726
- run:
1827
name: Version information
1928
command: |
2029
cargo --version
2130
cargo clippy --version
2231
23-
# We ship the Cargo.lock, to support Nix derivations
24-
# - run:
25-
# name: Calculate dependencies
26-
# command: cargo generate-lockfile
32+
- clippy
2733

28-
- restore_cache:
29-
keys:
30-
- v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
31-
- v1-bench-{{ .Branch }}-{{ .Revision }}
32-
- v1-bench-{{ .Branch }}
33-
- v1-bench-
34+
- run:
35+
# We ship the Cargo.lock, to support Nix derivations
36+
name: Calculate dependencies
37+
command: test -e Cargo.lock || cargo generate-lockfile
38+
39+
# - restore_cache:
40+
# keys:
41+
# - v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
42+
# - v1-bench-{{ .Branch }}-{{ .Revision }}
43+
# - v1-bench-{{ .Branch }}
44+
# - v1-bench-
3445

3546
# DISABLED:
3647
# running 11 tests
@@ -74,9 +85,14 @@ jobs:
7485
# name: Measure code coverage
7586
# command: cargo kcov
7687

77-
- run:
78-
name: Run lints
79-
command: cargo clippy
88+
# - run:
89+
# name: Run lints
90+
# command: |
91+
# if rustup component add clippy; then
92+
# cargo clippy
93+
# else
94+
# echo Skipping clippy
95+
# fi
8096

8197
- run:
8298
name: Run unit tests

0 commit comments

Comments
 (0)