forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
version: 1 | ||
jobs: | ||
lint: | ||
docker: | ||
- image: circleci/rust:stretch | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version Information | ||
command: rustc --version; cargo --version; rustup --version | ||
- run: | ||
name: Install Rust Components | ||
command: rustup component add rustfmt clippy | ||
- run: | ||
name: Component Version Information | ||
command: cargo fmt -- --version; cargo clippy -- --version | ||
- run: | ||
name: Setup Env | ||
command: | | ||
echo 'export RUSTFLAGS="-D warnings"' >> $BASH_ENV | ||
- run: | ||
name: Lint (rustfmt) | ||
command: | | ||
cargo fmt -- --check | ||
- run: | ||
name: Lint (clippy) | ||
command: | | ||
cargo clippy | ||
build: | ||
docker: | ||
- image: circleci/rust:stretch | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version Information | ||
command: rustc --version; cargo --version; rustup --version; python3 --version; clang++ --version; javac -version | ||
- run: | ||
name: Setup Env | ||
command: | | ||
echo 'export RUSTFLAGS="-D warnings"' >> $BASH_ENV | ||
- run: | ||
name: Build and Test | ||
# Build all targets to ensure examples are built as well. | ||
command: | | ||
cargo build --all-targets | ||
cargo test | ||
# docs-build and docs-deploy are adapted from | ||
# https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/. | ||
docs-build: | ||
docker: | ||
- image: circleci/rust:stretch | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version Information | ||
command: rustc --version; cargo --version; rustup --version | ||
- run: | ||
name: Generate documentation | ||
command: | | ||
cargo doc | ||
- persist_to_workspace: | ||
root: target | ||
paths: doc | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- lint | ||
- build | ||
- docs-build |