Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0b7ff77
bump cat-ci version
Mr-Leshiy Sep 30, 2024
d88f166
intentionally break the test
Mr-Leshiy Sep 30, 2024
25f645b
add .secret.template update gitignore
Mr-Leshiy Sep 30, 2024
66937e5
wip
Mr-Leshiy Sep 30, 2024
6538b34
fix
Mr-Leshiy Sep 30, 2024
c589499
try
Mr-Leshiy Sep 30, 2024
ef7d4ab
try
Mr-Leshiy Sep 30, 2024
a54acd9
prune cache for rust/+build target
Mr-Leshiy Sep 30, 2024
c3e9d69
try
Mr-Leshiy Sep 30, 2024
a4e5c2a
try
Mr-Leshiy Sep 30, 2024
eb01e65
try
Mr-Leshiy Sep 30, 2024
802ee8a
try
Mr-Leshiy Sep 30, 2024
0491ba9
try
Mr-Leshiy Sep 30, 2024
3382ab6
disable caching for build
Mr-Leshiy Sep 30, 2024
d1916b6
try new version
Mr-Leshiy Sep 30, 2024
06f3e75
fix(rust): test (#40)
stevenj Oct 1, 2024
5f23692
remove failed test
Mr-Leshiy Oct 1, 2024
7bf8a29
add failing test again
Mr-Leshiy Oct 1, 2024
3c77acb
disable caching for build target
Mr-Leshiy Oct 1, 2024
7206a66
Revert "disable caching for build target"
Mr-Leshiy Oct 1, 2024
81068c9
fix(rust): Try Rust cache fix
stevenj Oct 1, 2024
416f5ca
fix(rust): remove broken unit test test
stevenj Oct 1, 2024
64f113d
test(rust): Put the failing unit test test back
stevenj Oct 1, 2024
430f29a
fix(rust): Bump to cat-ci v3.2.12
stevenj Oct 1, 2024
3c45230
remove failed test
Mr-Leshiy Oct 1, 2024
1b7cc97
Merge branch 'main' into fix/rust-ci-build
stevenj Oct 1, 2024
bd0aa51
Change advisories to warnings, because they randomly break CI and we …
stevenj Oct 2, 2024
b056d95
Merge branch 'fix/rust-ci-build' of github.com:input-output-hk/cataly…
stevenj Oct 2, 2024
d49bdad
fix(rust): Use v3.2.13 of cat-ci
stevenj Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Secrets
**/.secret

### Linux ###
*~

Expand Down
1 change: 1 addition & 0 deletions .secret.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GITHUB_TOKEN=Make One at https://github.com/settings/tokens only need public repo, read packages permissions
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.05 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.05 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.13 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.13 AS cspell-ci

FROM debian:stable-slim

Expand Down
2 changes: 1 addition & 1 deletion docs/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.05 AS docs-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.13 AS docs-ci

IMPORT .. AS repo

Expand Down
67 changes: 53 additions & 14 deletions rust/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.05 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.13 AS rust-ci

COPY_SRC:
FUNCTION

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.
Expand All @@ -9,27 +22,31 @@ sync-cfg:

# builder : Set up our target toolchains, and copy our files.
builder:
DO rust-ci+SETUP

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 .
DO rust-ci+SETUP

builder-src:
FROM +builder

# Don't build the src in the home directory itself, because it contains stuff.
WORKDIR $HOME/build
RUN rm -rf *

# Cached copy of the source we build.
DO +COPY_SRC

# Generate Checksums of the source
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
FROM +builder-src

DO rust-ci+EXECUTE \
--cmd="/scripts/std_build.py" \
Expand All @@ -43,6 +60,28 @@ build:
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.
check-builder-src-cache:
FROM +builder

# Don't build the src in the home directory itself, because it contains stuff.
WORKDIR $HOME/build
RUN rm -rf *

COPY +builder-src/src_fingerprint.txt ..

RUN --no-cache echo "Cache Disabled"

# Uncached copy of the source we build.
DO +COPY_SRC

# Generate Checksums of the source
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) \
&& echo "Source fingerprints match. Caching OK."


# local-ci-run: This step simulates the full CI run for local purposes only.
local-ci-run:
Expand Down
2 changes: 1 addition & 1 deletion rust/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sync-cfg:

# Check Dependency licenses and CVE's
license-check:
cargo deny check --exclude-dev
cargo deny check --exclude-dev -W vulnerability

# Format the rust code
code-format:
Expand Down
2 changes: 1 addition & 1 deletion rust/c509-certificate/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.05 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.13 AS rust-ci

IMPORT .. AS rust-local
IMPORT ../.. AS repo
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.05 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.13 AS rust-ci

IMPORT .. AS rust-local

Expand Down