From bae28bc4246a8d31daecbe1a48bd1a47df60239e Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 21 Aug 2024 10:21:43 -0400 Subject: [PATCH 1/3] Add ci workflow --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f1419cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +env: + TYPOS_LINK: "https://github.com/crate-ci/typos/releases/download" + TYPOS_VERSION: "1.23.4" + +on: + push: + branches: + - main + pull_request: {} + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - name: Setup Rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 + with: + rust-toolchain: stable + cache-key: stable-linux + # -------------------------------------------------------------------------------- + - name: Audit + run: cargo xtask check audit + # -------------------------------------------------------------------------------- + - name: Format + shell: bash + env: + # work around for colors + # see: https://github.com/rust-lang/rustfmt/issues/3385 + TERM: xterm-256color + run: cargo xtask check format + # -------------------------------------------------------------------------------- + - name: Lint + run: cargo xtask check lint + # -------------------------------------------------------------------------------- + - name: Typos + uses: tracel-ai/github-actions/actions/check-typos@v1 + # -------------------------------------------------------------------------------- + - name: Unit Tests + run: cargo xtask test unit + # -------------------------------------------------------------------------------- + - name: Integration Tests + run: cargo xtask test integration + # -------------------------------------------------------------------------------- + - name: Documentation Tests + run: cargo xtask doc tests + From de504eb8e0118c707e06138e357c5bf6b4bb09eb Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 21 Aug 2024 11:27:28 -0400 Subject: [PATCH 2/3] Add build command --- xtask/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 1317b7c..1e1cbb5 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -7,6 +7,7 @@ extern crate log; #[macros::base_commands( Bump, + Build, Check, Compile, Coverage, From 21c231bd4178db24a925c7c11e84f8ea72d026d8 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 21 Aug 2024 15:52:42 -0400 Subject: [PATCH 3/3] Add publish workflow --- .github/workflows/publish.yml | 21 +++++++++++++++++++++ Cargo.lock | 6 +++--- Cargo.toml | 2 +- crates/tracel-xtask/Cargo.toml | 2 +- xtask/Cargo.toml | 2 +- 5 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..67f0402 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: publish + +on: + push: + tags: + - "v*" + +jobs: + publish-tracel-xtask-macros: + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 + with: + crate: tracel-xtask-macros + secrets: inherit + # -------------------------------------------------------------------------------- + publish-tracel-xtask: + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 + with: + crate: tracel-xtask + needs: + - tracel-xtask-macros + secrets: inherit diff --git a/Cargo.lock b/Cargo.lock index f06c8dc..19532d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -686,7 +686,7 @@ dependencies = [ [[package]] name = "tracel-xtask" -version = "0.1.0" +version = "1.0.0" dependencies = [ "anyhow", "clap", @@ -704,7 +704,7 @@ dependencies = [ [[package]] name = "tracel-xtask-macros" -version = "0.1.0" +version = "1.0.0" dependencies = [ "proc-macro2", "quote", @@ -890,7 +890,7 @@ dependencies = [ [[package]] name = "xtask" -version = "0.1.0" +version = "1.0.0" dependencies = [ "log", "rstest", diff --git a/Cargo.toml b/Cargo.toml index bf287bd..939728d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ [workspace.package] edition = "2021" -version = "0.1.0" +version = "1.0.0" license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/crates/tracel-xtask/Cargo.toml b/crates/tracel-xtask/Cargo.toml index a15d175..73570be 100644 --- a/crates/tracel-xtask/Cargo.toml +++ b/crates/tracel-xtask/Cargo.toml @@ -16,7 +16,7 @@ regex = { workspace = true } serde_json = { workspace = true } strum = { workspace = true } tracing-subscriber = { workspace = true } -tracel-xtask-macros = { path = "../tracel-xtask-macros", version = "0.1.0" } +tracel-xtask-macros = { path = "../tracel-xtask-macros", version = "1.0.0" } [dev-dependencies] rstest = { workspace = true } \ No newline at end of file diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 3e4d046..2baff81 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtask" -version = "0.1.0" +version = "1.0.0" edition = "2021" [dependencies]