From 9d645f2c41a9d450c2a971aea99e4898f36e7276 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Wed, 18 Dec 2024 13:58:21 +0700 Subject: [PATCH 01/10] test(rust): doc artifact Signed-off-by: bkioshn --- rust/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index e673e1eb228..4a2a2a06267 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -64,7 +64,7 @@ build: --coverage="cat-libs.coverage.info" \ --docs="true" - SAVE ARTIFACT target/$TARGETARCH/doc doc + SAVE ARTIFACT target/doc doc SAVE ARTIFACT target/release/cbork cbork # build-src-check: Check for any caching issues with the source we are building against. From 2d12aff04e710f47f6ff5785d9a5f688d854c946 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Wed, 18 Dec 2024 14:05:40 +0700 Subject: [PATCH 02/10] test(rust): revert back change Signed-off-by: bkioshn --- rust/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index 4a2a2a06267..e673e1eb228 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -64,7 +64,7 @@ build: --coverage="cat-libs.coverage.info" \ --docs="true" - SAVE ARTIFACT target/doc doc + SAVE ARTIFACT target/$TARGETARCH/doc doc SAVE ARTIFACT target/release/cbork cbork # build-src-check: Check for any caching issues with the source we are building against. From 331e56a5ffc0241fce58d4c01d94b8b05a15de83 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Wed, 18 Dec 2024 14:28:39 +0700 Subject: [PATCH 03/10] test(rust): remove no-cache Signed-off-by: bkioshn --- rust/Earthfile | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index 6b970a74791..4a2a2a06267 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -52,7 +52,6 @@ check: build: FROM +builder-src - RUN --no-cache DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --args1="--libs=c509-certificate --libs=cardano-blockchain-types --libs=cardano-chain-follower --libs=hermes-ipfs" \ From 53ae498cea6d5c4311b276ce74b3e88931305a46 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 11:17:43 +0700 Subject: [PATCH 04/10] test ci --- rust/Earthfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/Earthfile b/rust/Earthfile index f54126114af..090f4fcf6de 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -51,6 +51,8 @@ check: # build : Build crates. build: FROM +builder-src + RUN --no-cache echo "Cache Disabled" + RUN rm -rf ~/build/target/release DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ From 74fc2ca733202e209bc90f37fa193fd240dab7b2 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 11:50:41 +0700 Subject: [PATCH 05/10] test ci --- rust/Earthfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index 090f4fcf6de..0bd76b17a6e 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -52,8 +52,6 @@ check: build: FROM +builder-src RUN --no-cache echo "Cache Disabled" - - RUN rm -rf ~/build/target/release DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --args1="--libs=c509-certificate --libs=cardano-blockchain-types --libs=cardano-chain-follower --libs=hermes-ipfs" \ @@ -68,6 +66,7 @@ build: SAVE ARTIFACT target/doc doc SAVE ARTIFACT target/release/cbork cbork + SAVE ARTIFACT ~/build/target build # build-src-check: Check for any caching issues with the source we are building against. check-builder-src-cache: From 8b1e08c7e9261d48f50d743fd0992775943cec56 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 12:06:55 +0700 Subject: [PATCH 06/10] test ci --- rust/Earthfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index 0bd76b17a6e..24269f75bf2 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -52,6 +52,7 @@ check: build: FROM +builder-src RUN --no-cache echo "Cache Disabled" + WAIT DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --args1="--libs=c509-certificate --libs=cardano-blockchain-types --libs=cardano-chain-follower --libs=hermes-ipfs" \ @@ -63,7 +64,7 @@ build: --junit="cat-libs.junit-report.xml" \ --coverage="cat-libs.coverage.info" \ --docs="true" - + END SAVE ARTIFACT target/doc doc SAVE ARTIFACT target/release/cbork cbork SAVE ARTIFACT ~/build/target build From 2f52702497cc287a844aa805f82a49187b76d553 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 12:14:04 +0700 Subject: [PATCH 07/10] test ci --- rust/Earthfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index 24269f75bf2..1dcffb9db0f 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -52,7 +52,7 @@ check: build: FROM +builder-src RUN --no-cache echo "Cache Disabled" - WAIT + DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ --args1="--libs=c509-certificate --libs=cardano-blockchain-types --libs=cardano-chain-follower --libs=hermes-ipfs" \ @@ -64,10 +64,8 @@ build: --junit="cat-libs.junit-report.xml" \ --coverage="cat-libs.coverage.info" \ --docs="true" - END + SAVE ARTIFACT target/doc doc - SAVE ARTIFACT target/release/cbork cbork - SAVE ARTIFACT ~/build/target build # build-src-check: Check for any caching issues with the source we are building against. check-builder-src-cache: From 4b4fa9d316464e376a5beaa5b0bcb92697cac183 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 12:57:36 +0700 Subject: [PATCH 08/10] test ci --- rust/Earthfile | 3 ++- rust/c509-certificate/Earthfile | 1 + rust/cbork/Earthfile | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index 1dcffb9db0f..f1d21eb7672 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -33,8 +33,10 @@ builder-src: # Don't build the src in the home directory itself, because it contains stuff. WORKDIR $HOME/build + RUN --no-cache echo "Cache Disabled" RUN rm -rf * + # Cached copy of the source we build. DO +COPY_SRC @@ -51,7 +53,6 @@ check: # build : Build crates. build: FROM +builder-src - RUN --no-cache echo "Cache Disabled" DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index a2235832e69..ad4f508d4a8 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -15,6 +15,7 @@ IMPORT ../.. AS repo # test it after publishing. build-wasm: FROM rust-local+build + RUN --no-cache echo "Cache Disabled" COPY repo+repo-docs/repo/LICENSE-APACHE c509-certificate/. COPY repo+repo-docs/repo/LICENSE-MIT c509-certificate/. diff --git a/rust/cbork/Earthfile b/rust/cbork/Earthfile index e32f5fbb19d..d7157917323 100644 --- a/rust/cbork/Earthfile +++ b/rust/cbork/Earthfile @@ -9,5 +9,6 @@ IMPORT .. AS rust-local # CI Automated Entry point. build: FROM rust-local+build + RUN --no-cache echo "Cache Disabled" SAVE ARTIFACT target/release/cbork cbork From b5d442b697f7ab26ac8d98259ef9c33fb113cda7 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 15:57:31 +0700 Subject: [PATCH 09/10] test ci --- rust/Earthfile | 10 +++++++--- rust/c509-certificate/Earthfile | 7 +++---- rust/cbork/Earthfile | 5 ++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index f1d21eb7672..1de6000a59d 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -36,7 +36,6 @@ builder-src: RUN --no-cache echo "Cache Disabled" RUN rm -rf * - # Cached copy of the source we build. DO +COPY_SRC @@ -50,8 +49,8 @@ check: DO rust-ci+EXECUTE --cmd="/scripts/std_checks.py" -# build : Build crates. -build: +# base-build : Build crates. +base-build: FROM +builder-src DO rust-ci+EXECUTE \ @@ -68,6 +67,11 @@ build: SAVE ARTIFACT target/doc doc +build: + BUILD +base-build + BUILD ./cbork/+cbork-build + BUILD ./c509-certificate/+c509-wasm-build + # build-src-check: Check for any caching issues with the source we are building against. check-builder-src-cache: FROM +builder diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index ad4f508d4a8..800896d3c5a 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -6,16 +6,15 @@ IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.23 AS rust-ci IMPORT .. AS rust-local IMPORT ../.. AS repo -# build-wasm: Build wasm binaries for browser integration. +# c509-wasm-build: Build wasm binaries for browser integration. # TODO: # - Create a `test` target which Executes tests for browsers (chrome/firefox) and also nodejs # with the built wasm from this target. # - Create a publish target which can publish the library to NPM for both Web and NodeJS. # - Create a simple example web app and nodejs app which uses the library, and can be used to # test it after publishing. -build-wasm: - FROM rust-local+build - RUN --no-cache echo "Cache Disabled" +c509-wasm-build: + FROM rust-local+base-build COPY repo+repo-docs/repo/LICENSE-APACHE c509-certificate/. COPY repo+repo-docs/repo/LICENSE-MIT c509-certificate/. diff --git a/rust/cbork/Earthfile b/rust/cbork/Earthfile index d7157917323..f1db9f4af68 100644 --- a/rust/cbork/Earthfile +++ b/rust/cbork/Earthfile @@ -7,8 +7,7 @@ IMPORT .. AS rust-local # Run build using the most efficient host tooling # CI Automated Entry point. -build: - FROM rust-local+build - RUN --no-cache echo "Cache Disabled" +cbork-build: + FROM rust-local+base-build SAVE ARTIFACT target/release/cbork cbork From a3e8f775f0955f74c8663a55f5ed497ee4d42a67 Mon Sep 17 00:00:00 2001 From: bkioshn Date: Mon, 23 Dec 2024 16:17:57 +0700 Subject: [PATCH 10/10] test ci --- rust/Earthfile | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/Earthfile b/rust/Earthfile index 1de6000a59d..fd4f99319ba 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -33,7 +33,6 @@ builder-src: # Don't build the src in the home directory itself, because it contains stuff. WORKDIR $HOME/build - RUN --no-cache echo "Cache Disabled" RUN rm -rf * # Cached copy of the source we build.