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

Commit

Permalink
Attempt to use standard Circle-CI tooling for Rust versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
pjkundert committed Dec 10, 2020
1 parent 2e4de32 commit c7f1d07
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
version: 2

parameters:
toolchain:
description: >-
Rust toolchain to use. Overrides the default toolchain (stable) or any
toolchain specified in the project via `rust-toolchain`.
type: string
default: '1.47'

executor: default

jobs:
build:
branches:
Expand All @@ -9,28 +20,28 @@ jobs:
- image: rust:1.47
steps:
- checkout
- run:
name: Install tooling
command: |
rustup component add clippy
- update_toolchain:
toolchain: <<parameters.toolchain>>

- run:
name: Version information
command: |
cargo --version
cargo clippy --version
# We ship the Cargo.lock, to support Nix derivations
# - run:
# name: Calculate dependencies
# command: cargo generate-lockfile
- clippy

- restore_cache:
keys:
- v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- v1-bench-{{ .Branch }}-{{ .Revision }}
- v1-bench-{{ .Branch }}
- v1-bench-
- run:
# We ship the Cargo.lock, to support Nix derivations
name: Calculate dependencies
command: test -e Cargo.lock || cargo generate-lockfile

# - restore_cache:
# keys:
# - v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
# - v1-bench-{{ .Branch }}-{{ .Revision }}
# - v1-bench-{{ .Branch }}
# - v1-bench-

# DISABLED:
# running 11 tests
Expand Down Expand Up @@ -74,9 +85,14 @@ jobs:
# name: Measure code coverage
# command: cargo kcov

- run:
name: Run lints
command: cargo clippy
# - run:
# name: Run lints
# command: |
# if rustup component add clippy; then
# cargo clippy
# else
# echo Skipping clippy
# fi

- run:
name: Run unit tests
Expand Down

0 comments on commit c7f1d07

Please sign in to comment.