From be31cf59ff1ded6287e330553f55dee2d99ce362 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Fri, 15 Sep 2023 21:50:54 +0100 Subject: [PATCH] Create foundation for monorepo --- .github/workflows/ci.yml | 15 +++++++++++---- Cargo.toml | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1034a0a..c0d6919 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - master pull_request: {} name: Continuous integration @@ -9,6 +9,10 @@ name: Continuous integration env: MIRIFLAGS: -Zmiri-strict-provenance +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'push' && github.run_number }} + cancel-in-progress: true + jobs: check: name: Check @@ -26,6 +30,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check + args: --all test-matrix: name: Test Suite @@ -52,7 +57,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: ${{ matrix.features }} + args: --all ${{ matrix.features }} test-msrv: name: Test Suite @@ -74,6 +79,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test + args: --all ${{ matrix.features }} test-os: name: Test Suite @@ -91,6 +97,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test + args: --all fmt: name: Rustfmt @@ -109,7 +116,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: fmt - args: --all -- --check + args: --check clippy: name: Clippy @@ -128,7 +135,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: clippy - args: -- -D warnings + args: --all-targets --all-features -- -D warnings miri: name: Miri runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 8cdfcc3..9090fb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,20 +1,44 @@ +[workspace] +members = [ + "." +] + +[workspace.package] +authors = ["Jane Lusby "] +edition = "2018" +license = "MIT OR Apache-2.0" +repository = "https://github.com/eyre-rs/eyre" +readme = "README.md" +rust-version = "1.65.0" + +[workspace.dependencies] +indenter = "0.3.0" +once_cell = "1.18.0" + [package] name = "eyre" version = "0.6.8" authors = ["David Tolnay ", "Jane Lusby "] -edition = "2018" -license = "MIT OR Apache-2.0" description = "Flexible concrete Error Reporting type built on std::error::Error with customizable Reports" -repository = "https://github.com/yaahc/eyre" documentation = "https://docs.rs/eyre" -readme = "README.md" categories = ["rust-patterns"] +edition = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +readme = { workspace = true } +rust-version = { workspace = true } + [features] default = ["auto-install", "track-caller"] auto-install = [] track-caller = [] +[dependencies] +indenter = { workspace = true } +once_cell = { workspace = true } +pyo3 = { version = "0.13", optional = true, default-features = false } + [dev-dependencies] futures = { version = "0.3", default-features = false } rustversion = "1.0" @@ -25,11 +49,6 @@ anyhow = "1.0.28" syn = { version = "2.0", features = ["full"] } pyo3 = { version = "0.13", default-features = false, features = ["auto-initialize"] } -[dependencies] -indenter = "0.3.0" -once_cell = "1.18.0" -pyo3 = { version = "0.13", optional = true, default-features = false } - [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--cfg", "doc_cfg"]