-
Notifications
You must be signed in to change notification settings - Fork 75
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
21 changed files
with
2,032 additions
and
780 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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
version: 2.1 | ||
orbs: | ||
# codecov: codecov/codecov@3.2.4 | ||
rust: circleci/[email protected].0 | ||
# codecov: codecov/codecov@3.3.0 | ||
rust: circleci/[email protected].1 | ||
|
||
jobs: | ||
build-and-test: | ||
parameters: | ||
rust-version: | ||
type: string | ||
default: "1.69.0" | ||
default: "1.75.0" | ||
debian-version: | ||
type: string | ||
default: "buster" | ||
default: "bookworm" | ||
rust-features: | ||
type: string | ||
default: "--all-targets" | ||
proptest-enable: | ||
type: boolean | ||
default: false | ||
docker: | ||
- image: rust:<< parameters.rust-version >>-<< parameters.debian-version >> | ||
environment: | ||
|
@@ -25,17 +28,26 @@ jobs: | |
- run: | ||
name: Rust Version | ||
command: rustc --version; cargo --version | ||
- when: | ||
condition: << parameters.proptest-enable >> | ||
steps: | ||
- run: | ||
name: Enable Running Property Tests | ||
command: scripts/bigdecimal-property-tests enable | ||
- run: | ||
name: Generate cargo.lock | ||
command: cargo generate-lockfile | ||
- restore_cache: | ||
keys: | ||
- bigdecimal-cargo-<< parameters.rust-version >>-{{ checksum "Cargo.toml" }} | ||
- bigdecimal-cargo-<< parameters.rust-version >>-{{ checksum "Cargo.lock" }} | ||
- bigdecimal-cargo- | ||
- run: | ||
name: Check | ||
command: cargo check << parameters.rust-features >> | ||
- save_cache: | ||
paths: | ||
- /usr/local/cargo | ||
key: bigdecimal-cargo-<< parameters.rust-version >>-{{ checksum "Cargo.toml" }} | ||
key: bigdecimal-cargo-<< parameters.rust-version >>-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Build | ||
command: cargo build << parameters.rust-features >> | ||
|
@@ -49,7 +61,7 @@ jobs: | |
type: string | ||
debian-version: | ||
type: string | ||
default: "bullseye" | ||
default: "bookworm" | ||
machine: true | ||
steps: | ||
- checkout | ||
|
@@ -65,54 +77,93 @@ jobs: | |
sh -c 'cargo test -q --no-run && kcov-rust && upload-kcov-results-to-codecov' | ||
- store_artifacts: | ||
path: target/cov | ||
# - store_test_results: | ||
# path: target | ||
|
||
lint-check: | ||
docker: | ||
- image: cimg/rust:1.69 | ||
- image: cimg/rust:1.75 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Generate cargo.lock | ||
command: cargo generate-lockfile | ||
- rust/build: | ||
with_cache: false | ||
# - rust/format | ||
# - rust/clippy | ||
- rust/clippy | ||
- rust/test | ||
- run: | ||
name: Build examples | ||
command: cargo build --examples | ||
|
||
cargo-semver-check: | ||
docker: | ||
- image: "akubera/rust:stable" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Tool Versions | ||
command: > | ||
rustc --version | ||
&& cargo --version | ||
&& cargo semver-checks --version | ||
- run: | ||
name: cargo semver-checks | ||
command: cargo semver-checks --verbose | ||
- run: | ||
name: cargo semver-checks (no-std) | ||
command: cargo semver-checks --verbose --only-explicit-features | ||
|
||
workflows: | ||
version: 2 | ||
cargo:build-and-test: | ||
jobs: | ||
- rust/lint-test-build: | ||
name: "lint-test-build:stable" | ||
release: true | ||
version: "1.75" | ||
pre-steps: | ||
- checkout | ||
- run: | ||
command: cargo generate-lockfile | ||
- rust/lint-test-build: | ||
name: "lint-test-build:1.56" | ||
release: true | ||
version: "1.56" | ||
|
||
- lint-check | ||
|
||
- build-and-test: | ||
name: build-and-test:MSRV | ||
rust-version: "1.43.1" | ||
debian-version: "buster" | ||
|
||
- build-and-test: | ||
matrix: | ||
parameters: | ||
rust-version: | ||
- "1.43.1" | ||
- "1.54.0" | ||
name: build-and-test:MSRV:serde | ||
rust-version: "1.43.1" | ||
debian-version: "buster" | ||
rust-features: "--all-targets --features='serde'" | ||
|
||
- build-and-test: | ||
name: build-and-test:latest | ||
debian-version: "bullseye" | ||
name: build-and-test:latest | ||
|
||
- build-and-test: | ||
matrix: | ||
parameters: | ||
rust-version: | ||
- "1.43.1" | ||
- "1.69.0" | ||
rust-features: | ||
- "--features='serde'" | ||
- "--features='serde,string-only'" | ||
name: build-and-test:latest:serde | ||
rust-features: "--all-targets --features='serde'" | ||
proptest-enable: true | ||
|
||
- build-and-test: | ||
name: build-and-test:no-default-features | ||
rust-features: "--no-default-features" | ||
name: build-and-test:no_std | ||
rust-features: "--no-default-features" | ||
|
||
- build-and-test: | ||
name: build-and-test:serde+no_std | ||
rust-features: "--no-default-features --features='serde'" | ||
|
||
- cargo-semver-check: | ||
requires: | ||
- build-and-test:latest:serde | ||
|
||
- upload-coverage: | ||
rust-version: "1.69.0" | ||
rust-version: "1.75.0" | ||
requires: | ||
- build-and-test:latest | ||
- build-and-test:latest:serde |
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
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
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
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
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
Oops, something went wrong.