diff --git a/Earthfile b/Earthfile index 7a5a3c75dd0..8cdb62309da 100644 --- a/Earthfile +++ b/Earthfile @@ -1,7 +1,7 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.10 AS mdlint-ci -IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.10 AS cspell-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.11 AS mdlint-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.11 AS cspell-ci FROM debian:stable-slim diff --git a/docs/Earthfile b/docs/Earthfile index 4c76fb7c516..32c3cb59dfc 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.10 AS docs-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.11 AS docs-ci IMPORT .. AS repo diff --git a/rust/Earthfile b/rust/Earthfile index af84cf1404d..49200d45bbe 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -1,31 +1,19 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:fix/rust-cache-updates AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.11 AS rust-ci COPY_SRC: FUNCTION - COPY Cargo.toml clippy.toml deny.toml rustfmt.toml . - COPY --dir .cargo .config \ - c509-certificate \ - cardano-chain-follower \ - catalyst-voting \ - cbork \ - cbork-abnf-parser \ - cbork-cddl-parser \ - hermes-ipfs . - -FINGERPRINT_SRC: - FUNCTION - - ARG WHENCE=.. - ARG DIR=build - ARG FINGERPRINT=src_fingerprint.txt - - RUN cd $WHENCE; \ - tar -C ./ -cf - --sort=name --mtime='UTC 2019-01-01' --group=0 --owner=0 --numeric-owner $DIR \ - | sha256sum > $FINGERPRINT - RUN cat $WHENCE/$FINGERPRINT + COPY --keep-ts --dir \ + Cargo.toml clippy.toml deny.toml rustfmt.toml \ + .cargo .config \ + c509-certificate \ + cardano-chain-follower \ + catalyst-voting \ + cbork cbork-abnf-parser cbork-cddl-parser \ + hermes-ipfs \ + . # sync-cfg: Synchronize local config with CI version. # Must be run by the developer manually. @@ -36,29 +24,25 @@ sync-cfg: builder: DO rust-ci+SETUP +builder-src: + FROM +builder + # Cached copy of the source we build. DO +COPY_SRC # Generate Checksums of the source - DO +FINGERPRINT_SRC + DO rust-ci+FINGERPRINT_SRC SAVE ARTIFACT ../src_fingerprint.txt # check : Run basic check. check: - FROM +builder + FROM +builder-src DO rust-ci+EXECUTE --cmd="/scripts/std_checks.py" # build : Build crates. build: - FROM +builder - - RUN --no-cache echo "Cache Disabled" - - # RUN /scripts/std_build.py \ - # --libs=c509-certificate --libs=cardano-chain-follower --libs=hermes-ipfs \ - # --libs=cbork-cddl-parser --libs=cbork-abnf-parser \ - # --bins=cbork/cbork + FROM +builder-src DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ @@ -74,9 +58,9 @@ build: # build-src-check: Check for any caching issues with the source we are building against. check-builder-src-cache: - DO rust-ci+SETUP + FROM +builder - COPY +builder/src_fingerprint.txt . + COPY +builder-src/src_fingerprint.txt . RUN --no-cache echo "Cache Disabled" @@ -84,7 +68,7 @@ check-builder-src-cache: DO +COPY_SRC # Generate Checksums of the source - DO +FINGERPRINT_SRC --FINGERPRINT=src_fingerprint_uncached.txt + DO rust-ci+FINGERPRINT_SRC --FINGERPRINT=src_fingerprint_uncached.txt RUN diff src_fingerprint.txt ../src_fingerprint_uncached.txt \ || (echo "ERROR: Source fingerprints do not match. Caching Error Detected!!" && exit 1) \ diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index 035e6d42337..b1295317da7 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.10 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.11 AS rust-ci IMPORT .. AS rust-local IMPORT ../.. AS repo diff --git a/rust/cbork/Earthfile b/rust/cbork/Earthfile index 4399e006883..f0a641f556b 100644 --- a/rust/cbork/Earthfile +++ b/rust/cbork/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.10 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.11 AS rust-ci IMPORT .. AS rust-local