From 05af5104bca1b2f0879fded9a4194ed1dc6b08c3 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 13:24:33 +0300 Subject: [PATCH 1/7] initialize a new crate --- .github/workflows/semantic_pull_request.yml | 1 + rust/Cargo.toml | 1 + rust/catalyst-voting/Cargo.toml | 13 +++++++++++++ rust/catalyst-voting/src/lib.rs | 1 + 4 files changed, 16 insertions(+) create mode 100644 rust/catalyst-voting/Cargo.toml create mode 100644 rust/catalyst-voting/src/lib.rs diff --git a/.github/workflows/semantic_pull_request.yml b/.github/workflows/semantic_pull_request.yml index 85cd0539ea9..b788d8a508f 100644 --- a/.github/workflows/semantic_pull_request.yml +++ b/.github/workflows/semantic_pull_request.yml @@ -18,6 +18,7 @@ jobs: rust rust/c509-certificate rust/cardano-chain-follower + rust/catalyst-voting rust/cbork rust/hermes-ipfs dart diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 45da0f472dc..930e2fc19cd 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,6 +7,7 @@ members = [ "cbork", "cbork-abnf-parser", "cbork-cddl-parser", + "catalyst-voting", ] [workspace.package] diff --git a/rust/catalyst-voting/Cargo.toml b/rust/catalyst-voting/Cargo.toml new file mode 100644 index 00000000000..c064da2c513 --- /dev/null +++ b/rust/catalyst-voting/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "catalyst-voting" +version = "0.1.0" +edition.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] diff --git a/rust/catalyst-voting/src/lib.rs b/rust/catalyst-voting/src/lib.rs new file mode 100644 index 00000000000..d207001f1b6 --- /dev/null +++ b/rust/catalyst-voting/src/lib.rs @@ -0,0 +1 @@ +//! Voting primitives which are used among Catalyst ecosystem. From 6935a1b573260f6d35a65f3ea802600eb9347dd5 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 14:22:21 +0300 Subject: [PATCH 2/7] add intentionally failed test --- rust/catalyst-voting/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/catalyst-voting/src/lib.rs b/rust/catalyst-voting/src/lib.rs index d207001f1b6..62a2608fd67 100644 --- a/rust/catalyst-voting/src/lib.rs +++ b/rust/catalyst-voting/src/lib.rs @@ -1 +1,6 @@ //! Voting primitives which are used among Catalyst ecosystem. + +#[test] +fn test() { + assert!(false); +} \ No newline at end of file From 78f601fb843d1043ded855895aab1849caac6c18 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 14:36:56 +0300 Subject: [PATCH 3/7] fix CI --- rust/Earthfile | 6 +----- rust/catalyst-voting/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index 2a74f564b91..ec7f9946e58 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -29,11 +29,7 @@ build: DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --output="release/[^\./]+" \ - --args1="--libs=c509-certificate" \ - --args2="--libs=cardano-chain-follower" \ - --args3="--libs=cbork-cddl-parser" \ - --args4="--libs=cbork-abnf-parser" \ - --args5="--libs=hermes-ipfs" \ + --args1="--libs=c509-certificate --libs=cardano-chain-follower --libs=cbork-cddl-parser --libs=cbork-abnf-parser --libs=hermes-ipfs --libs=catalyst-voting" \ --args6="--bins=cbork/cbork" \ --docs="true" diff --git a/rust/catalyst-voting/src/lib.rs b/rust/catalyst-voting/src/lib.rs index 62a2608fd67..25ce6c07c7d 100644 --- a/rust/catalyst-voting/src/lib.rs +++ b/rust/catalyst-voting/src/lib.rs @@ -3,4 +3,4 @@ #[test] fn test() { assert!(false); -} \ No newline at end of file +} From 9423567039113e5406ee9dc62bdd087a219d37bd Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 14:38:40 +0300 Subject: [PATCH 4/7] fix --- rust/Earthfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index ec7f9946e58..1dd50692fab 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -12,9 +12,14 @@ builder: DO rust-ci+SETUP COPY Cargo.toml clippy.toml deny.toml rustfmt.toml . - COPY --dir .cargo .config c509-certificate cardano-chain-follower \ - cbork cbork-abnf-parser cbork-cddl-parser \ - hermes-ipfs . + COPY --dir .cargo .config \ + c509-certificate \ + cardano-chain-follower \ + catalyst-voting \ + cbork \ + cbork-abnf-parser \ + cbork-cddl-parser \ + hermes-ipfs . # check : Run basic check. check: From 5d6b95bfedabab661cd3b2346af585626f9311b9 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 14:44:27 +0300 Subject: [PATCH 5/7] fix --- rust/catalyst-voting/src/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rust/catalyst-voting/src/lib.rs b/rust/catalyst-voting/src/lib.rs index 25ce6c07c7d..d207001f1b6 100644 --- a/rust/catalyst-voting/src/lib.rs +++ b/rust/catalyst-voting/src/lib.rs @@ -1,6 +1 @@ //! Voting primitives which are used among Catalyst ecosystem. - -#[test] -fn test() { - assert!(false); -} From b8d7ece11a2e7556a2838036dee20be6d7e27ffc Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 24 Sep 2024 14:52:58 +0300 Subject: [PATCH 6/7] update vscode setting.recommended.json --- .vscode/settings.recommended.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vscode/settings.recommended.json b/.vscode/settings.recommended.json index 03f0ee4a800..c152c545fde 100644 --- a/.vscode/settings.recommended.json +++ b/.vscode/settings.recommended.json @@ -37,6 +37,7 @@ "rust", "rust/c509-certificate", "rust/cardano-chain-follower", + "rust/catalyst-voting", "rust/cbork", "rust/hermes-ipfs", "dart", @@ -55,6 +56,9 @@ "-c", "cargo lint-vscode" ], + "rust-analyzer.linkedProjects": [ + "./rust/Cargo.toml" + ], "yaml.schemas": { "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" }, From a7b4b2ec45e22f4c83ff684d540479864b671066 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Wed, 25 Sep 2024 11:00:46 +0300 Subject: [PATCH 7/7] fix earthly --- rust/Earthfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index 1dd50692fab..cd1d38dfe02 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -34,8 +34,10 @@ build: DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --output="release/[^\./]+" \ - --args1="--libs=c509-certificate --libs=cardano-chain-follower --libs=cbork-cddl-parser --libs=cbork-abnf-parser --libs=hermes-ipfs --libs=catalyst-voting" \ - --args6="--bins=cbork/cbork" \ + --args1="--libs=c509-certificate --libs=cardano-chain-follower --libs=hermes-ipfs" \ + --args2="--libs=cbork-cddl-parser --libs=cbork-abnf-parser" \ + --args3="--libs=catalyst-voting" \ + --args4="--bins=cbork/cbork" \ --docs="true" SAVE ARTIFACT target/$TARGETARCH/doc doc