Improving CircleCI config and separate lint form tests

This commit is contained in:
Syrus 2019-01-18 11:27:16 -08:00
parent 6d55776b8e
commit eb9f3fd274

View File

@ -1,22 +1,32 @@
version: 2
jobs:
# Job used for testing
lint:
docker:
- image: circleci/rust:latest
steps:
- checkout
- run: rustup component add rustfmt
- run: rustup component add clippy
- run:
name: Execute lints
command: make lint
test:
docker:
- image: circleci/rust:latest
resource_class: medium+
steps:
- checkout
- restore_cache:
keys:
- v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: sudo apt-get install -y cmake
- run: sudo apt-get install texinfo
- run: sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
sudo apt-get install texinfo
sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run: make test
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: make lint
- save_cache:
paths:
- /usr/local/cargo/registry
@ -28,7 +38,6 @@ jobs:
test-macos:
macos:
xcode: "9.0"
resource_class: medium+
steps:
- checkout
- restore_cache:
@ -59,8 +68,6 @@ jobs:
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
cargo --version
rustup component add rustfmt
rustup component add clippy
- run:
name: Execute tests
command: |
@ -70,7 +77,6 @@ jobs:
ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test
make lint
- run:
name: Execute integration tests
command: |
@ -91,23 +97,20 @@ jobs:
test-and-build:
docker:
- image: circleci/rust:latest
resource_class: medium+
steps:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: sudo apt-get install -y cmake
- run: sudo apt-get install texinfo
- run: sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
sudo apt-get install texinfo
sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run:
name: Execute tests
command: make test
- run: rustup component add rustfmt
- run: rustup component add clippy
- run:
name: Execute lints
command: make lint
- run:
name: Make release build
command: |
@ -137,7 +140,6 @@ jobs:
test-and-build-macos:
macos:
xcode: "9.0"
resource_class: medium+
steps:
- checkout
- restore_cache:
@ -168,8 +170,6 @@ jobs:
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
cargo --version
rustup component add rustfmt
rustup component add clippy
- run:
name: Execute tests
command: |
@ -179,7 +179,6 @@ jobs:
ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test
make lint
- run:
name: Make release build
command: |
@ -208,7 +207,6 @@ jobs:
test-rust-nightly:
docker:
- image: circleci/rust:latest
resource_class: medium+
steps:
- checkout
- restore_cache:
@ -257,6 +255,7 @@ workflows:
version: 2
main:
jobs:
- lint
- test:
filters:
branches:
@ -284,6 +283,7 @@ workflows:
- publish-github-release:
requires:
- lint
- test-and-build
- test-and-build-macos
filters: