-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(ci): added circle ci config * refactor(ci): checkout before running test * refactor(ci): install stable toolchain for stable test * refactor(README): added ci badge to README [ci skip]
- Loading branch information
1 parent
79099ef
commit 0d35020
Showing
2 changed files
with
63 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,61 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/rust:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: project-cache | ||
- run: | ||
name: Check formatting | ||
command: | | ||
rustfmt --version | ||
cargo fmt -- --check | ||
- run: | ||
name: Nightly Build | ||
command: | | ||
rustup toolchain install nightly | ||
rustup run nightly rustc --version --verbose | ||
rustup run nightly cargo --version --verbose | ||
rustup run nightly cargo build | ||
- run: | ||
name: Stable Build | ||
command: | | ||
rustup toolchain install stable | ||
rustup run stable rustc --version --verbose | ||
rustup run stable cargo --version --verbose | ||
rustup run stable cargo build | ||
- run: | ||
name: Wasm Build | ||
command: | | ||
rustup toolchain install nightly | ||
rustup update | ||
rustup target add wasm32-unknown-unknown --toolchain nightly | ||
rustup run nightly cargo build --release --target wasm32-unknown-unknown | ||
- save_cache: | ||
key: project-cache | ||
paths: | ||
- "~/.cargo" | ||
- "./target" | ||
test: | ||
docker: | ||
- image: circleci/rust:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: Test | ||
command: | | ||
rustup toolchain install nightly | ||
rustup run nightly cargo test | ||
rustup toolchain install stable | ||
rustup run stable cargo test | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- build | ||
- test: | ||
requires: | ||
- build |
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